diff options
author | rtk0c <[email protected]> | 2021-06-10 18:07:30 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-06-10 18:07:30 -0700 |
commit | 222cfec6ad882196d8927f73e30d905daae89556 (patch) | |
tree | 9347bb0ebf99cc79e4ee629d0edf7fd744bdeb1b /core/src/Model/Assets.hpp | |
parent | dc09ba073744292a4d4af0445e5095f424fffa22 (diff) |
Polish UI and add translations
Diffstat (limited to 'core/src/Model/Assets.hpp')
-rw-r--r-- | core/src/Model/Assets.hpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/core/src/Model/Assets.hpp b/core/src/Model/Assets.hpp index e035f51..adde97b 100644 --- a/core/src/Model/Assets.hpp +++ b/core/src/Model/Assets.hpp @@ -48,6 +48,7 @@ public: // TODO support file watches void Reload(); + int GetCount() const; const SavedAsset* FindByName(std::string_view name) const; const SavedAsset& Create(SavedAsset asset); std::unique_ptr<Asset> CreateAndLoad(SavedAsset asset); @@ -66,16 +67,9 @@ public: { const SavedAsset* SelectedAsset = nullptr; }; - void DisplayBigIconsList(ListState& state); - void DisplayDetailsTable(ListState& state); - - struct PopupState : public ListState - { - }; - void OpenBigIconsPopup(); - void DisplayBigIconsPopup(PopupState& state); - void OpenDetailsPopup(); - void DisplayDetailsPopup(PopupState& state); + void DisplayIconsList(ListState& state); + void DisplayDetailsList(ListState& state); + void DisplayControls(ListState& state); protected: virtual void DiscoverFiles(const std::function<void(SavedAsset)>& callback) const = 0; @@ -93,15 +87,12 @@ protected: virtual uuids::uuid RetrieveUuidFromFile(const std::filesystem::path& file) const = 0; virtual std::filesystem::path RetrievePathFromAsset(const SavedAsset& asset) const = 0; - virtual void DisplayAssetCreator(PopupState& state) = 0; + virtual void DisplayAssetCreator(ListState& state) = 0; /// This should call ImGui::BeginTable() along with other accessories such as setting up the header row. virtual void SetupDetailsTable(const char* tableId) const = 0; virtual void DrawBigIcon(ListState& state, const SavedAsset& asset) const = 0; virtual void DrawDetailsTableRow(ListState& state, const SavedAsset& asset) const = 0; - -private: - void DisplayPopupControls(PopupState& state); }; template <class T> |