Skip to content

Commit f7f0c59

Browse files
committed
Show all sprite properties in the editor
1 parent 1de972a commit f7f0c59

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

source/code/editor/SagoTextureSelector.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,27 @@ void SagoTextureSelector::runSpriteSelectorFrame(SDL_Renderer* target) {
162162
}
163163
ImGui::End();
164164

165+
ImGui::Begin("SpriteProperties");
166+
if (selected_sprite.length()) {
167+
const SagoSprite& current_sprite = sprites[selected_sprite];
168+
ImGui::Text("Sprite: %s", selected_sprite.c_str());
169+
ImGui::Separator();
170+
ImGui::Text("texture: %s", current_sprite.texture.c_str());
171+
ImGui::Text("topx: %d", current_sprite.topx);
172+
ImGui::Text("topy: %d", current_sprite.topy);
173+
ImGui::Text("width: %d", current_sprite.width);
174+
ImGui::Text("height: %d", current_sprite.height);
175+
ImGui::Text("number_of_frames: %d", current_sprite.number_of_frames);
176+
ImGui::Text("frame_time: %d", current_sprite.frame_time);
177+
ImGui::Text("originx: %d", current_sprite.originx);
178+
ImGui::Text("originy: %d", current_sprite.originy);
179+
ImGui::Separator();
180+
ImGui::Text("meta_name: %s", current_sprite.meta_name.c_str());
181+
ImGui::Text("meta_from_file: %s", current_sprite.meta_from_file.c_str());
182+
ImGui::Text("meta_modified: %s", current_sprite.meta_modified.c_str());
183+
}
184+
ImGui::End();
185+
165186
ImGui::Begin("SpriteTexture");
166187
if (selected_sprite.length() && sprites[selected_sprite].texture.length()) {
167188
int tex_w, tex_h;

0 commit comments

Comments
 (0)