99#include < variant>
1010
1111#include < OvTools/Filesystem/IniFile.h>
12+ #include < OvTools/Eventing/Event.h>
1213
1314#include < OvUI/Widgets/Texts/Text.h>
1415#include < OvUI/Panels/PanelWindow.h>
2021
2122namespace OvEditor ::Panels
2223{
23- class AssetMetadataEditor : public OvUI ::Panels::PanelWindow
24+ class AssetProperties : public OvUI ::Panels::PanelWindow
2425 {
2526 public:
2627 using EditableAssets = std::variant<OvRendering::Resources::Model*, OvRendering::Resources::Texture*>;
@@ -31,7 +32,7 @@ namespace OvEditor::Panels
3132 * @param p_opened
3233 * @param p_windowSettings
3334 */
34- AssetMetadataEditor
35+ AssetProperties
3536 (
3637 const std::string& p_title,
3738 bool p_opened,
@@ -44,22 +45,40 @@ namespace OvEditor::Panels
4445 */
4546 void SetTarget (const std::string& p_path);
4647
48+ /* *
49+ * Refresh the panel to show the current target settings
50+ */
51+ void Refresh ();
52+
4753 /* *
4854 * Launch the preview of the target asset
4955 */
5056 void Preview ();
5157
5258 private:
5359 void CreateHeaderButtons ();
60+ void CreateAssetSelector ();
5461 void CreateSettings ();
62+ void CreateInfo ();
5563 void CreateModelSettings ();
5664 void CreateTextureSettings ();
5765 void Apply ();
5866
5967 private:
6068 std::string m_resource;
6169
62- OvUI::Widgets::Layout::Columns<2 >* m_settings = nullptr ;
70+ OvTools::Eventing::Event<> m_targetChanged;
71+ OvUI::Widgets::Layout::Group* m_settings = nullptr ;
72+ OvUI::Widgets::Layout::Group* m_info = nullptr ;
73+ OvUI::Widgets::Buttons::Button* m_applyButton = nullptr ;
74+ OvUI::Widgets::Buttons::Button* m_revertButton = nullptr ;
75+ OvUI::Widgets::Buttons::Button* m_previewButton = nullptr ;
76+ OvUI::Widgets::Buttons::Button* m_resetButton = nullptr ;
77+ OvUI::Widgets::AWidget* m_headerSeparator = nullptr ;
78+ OvUI::Widgets::AWidget* m_headerLineBreak = nullptr ;
79+ OvUI::Widgets::Layout::Columns<2 >* m_settingsColumns = nullptr ;
80+ OvUI::Widgets::Layout::Columns<2 >* m_infoColumns = nullptr ;
81+ OvUI::Widgets::Texts::Text* m_assetSelector = nullptr ;
6382 std::unique_ptr<OvTools::Filesystem::IniFile> m_metadata;
6483 };
6584}
0 commit comments