small fixes
This commit is contained in:
@@ -208,6 +208,10 @@ namespace TSE::EDITOR
|
||||
{
|
||||
Draw((TileMap*)element, debug);
|
||||
}
|
||||
else if (name == "Orderer Sprite Set")
|
||||
{
|
||||
Draw((OrdererSpriteSet*)element, debug);
|
||||
}
|
||||
else
|
||||
{
|
||||
element->CustomDraw(debug);
|
||||
@@ -915,6 +919,30 @@ namespace TSE::EDITOR
|
||||
ImGui::TextDisabled(("Chunk Count: " + std::to_string(element->GetChunkCount())).c_str());
|
||||
}
|
||||
}
|
||||
void ElementDrawer::Draw(OrdererSpriteSet *element, const bool &debug)
|
||||
{
|
||||
int orderIndex = static_cast<int>(element->order);
|
||||
const char* orderItems[] = { "TopRight", "TopLeft", "BottomRight", "BottomLeft" };
|
||||
if (ImGui::Combo("Order", &orderIndex, orderItems, IM_ARRAYSIZE(orderItems)))
|
||||
{
|
||||
element->order = static_cast<SortingOrder>(orderIndex);
|
||||
for (auto& [_, chunk] : element->chunks)
|
||||
{
|
||||
chunk.SetOrdering(element->order);
|
||||
}
|
||||
element->DirtyAll();
|
||||
}
|
||||
|
||||
ImGui::BeginDisabled();
|
||||
ImGui::DragInt("Chunk Size", &element->chunkSize, 1.0f);
|
||||
ImGui::EndDisabled();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
ImGui::Separator();
|
||||
ImGui::TextDisabled(("Chunk Count: " + std::to_string(element->GetChunkCount())).c_str());
|
||||
}
|
||||
}
|
||||
void ElementDrawer::DrawAudioClipCompact(AudioClip *element, const bool &debug, const std::string &label)
|
||||
{
|
||||
float item_spacing = ImGui::GetStyle().ItemSpacing.x;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "BehaviourScripts/AudioListener.hpp"
|
||||
#include "BehaviourScripts/AudioSource.hpp"
|
||||
#include "BehaviourScripts/TileMap.hpp"
|
||||
#include "BehaviourScripts/OrdererSpriteSet.hpp"
|
||||
|
||||
namespace TSE::EDITOR
|
||||
{
|
||||
@@ -81,6 +82,7 @@ namespace TSE::EDITOR
|
||||
static void Draw(Camera* element, const bool& debug);
|
||||
static void Draw(ParticleSystem* element, const bool& debug);
|
||||
static void Draw(TileMap* element, const bool& debug);
|
||||
static void Draw(OrdererSpriteSet* element, const bool& debug);
|
||||
|
||||
static void DrawAudioClipCompact(AudioClip* element, const bool& debug, const std::string& label);
|
||||
static void DrawAudioClipNormal(AudioClip* element, const bool& debug, const std::string& label);
|
||||
|
||||
Reference in New Issue
Block a user