Preparing editor assets to show their properties

master
Joey Pollack 3 years ago
parent 8bda714099
commit 17fa0aeb68

@ -119,4 +119,9 @@ namespace lunarium { namespace editor
return nlohmann::ordered_json();
}
void World::DrawProperties()
{
}
}}

@ -31,6 +31,8 @@ namespace lunarium { namespace editor
[[nodiscard]] virtual OpRes LoadRawFile() = 0;
virtual void DrawProperties() = 0;
// [[nodiscard]] virtual OpRes LoadFromJSON(nlohmann::json& node) = 0;
//[[nodiscard]] virtual OpRes SaveToJSON(nlohmann::json& node) = 0;

@ -42,6 +42,8 @@ namespace lunarium { namespace editor
// Call during render to texture phase
void Render(lunarium::Renderer2D* g);
void DrawProperties();
void DrawDebugGUI();
TileRef** GetMap() { return mpMap; };

@ -170,4 +170,10 @@ namespace lunarium { namespace editor
}
g->DrawLine(glm::vec2(0, mSetImage->GetHeight()), glm::vec2(mSetImage->GetWidth(), mSetImage->GetHeight()), Color::Black(), 1.5f);
}
void TileSet::DrawProperties()
{
}
}}

@ -28,6 +28,7 @@ namespace lunarium { namespace editor
OpRes Deserialize(nlohmann::ordered_json& node);
bool IsValidNode(nlohmann::ordered_json& node);
nlohmann::ordered_json AsJSON();
void DrawProperties();
void SetTileSetID(int id);
int GetTileSetID() const;

@ -33,6 +33,7 @@ namespace lunarium { namespace editor
[[nodiscard]] virtual OpRes Deserialize(nlohmann::ordered_json& node);
[[nodiscord]] virtual bool IsValidNode(nlohmann::ordered_json& node);
[[nodiscard]] virtual nlohmann::ordered_json AsJSON();
void DrawProperties();
lunarium::World* GetWorld();
void UnloadWorld();

@ -13,6 +13,7 @@
#include <editor/editor.h>
#include <world/entity.h>
#include <world/components.h>
#include <editor/contents/editor_asset.h>
#include <editor/component_guis.h>
#define PRESENT_COMP_CHOICE(str_name, type_name, pv) \
@ -154,7 +155,10 @@ namespace lunarium { namespace editor
void PropertiesView::ShowAsset()
{
if (mpSelectedAsset)
{
mpSelectedAsset->DrawProperties();
}
}
}}
Loading…
Cancel
Save