1#ifndef YAZE_APP_EDITOR_OVERWORLD_ENTITY_H
2#define YAZE_APP_EDITOR_OVERWORLD_ENTITY_H
4#include "imgui/imgui.h"
14 ImVec2 canvas_p0, ImVec2 scrolling);
17 ImVec2 scrolling,
bool free_movement =
false);
20 ImVec2 scrolling,
bool &is_dragging_entity,
21 zelda3::GameEntity *&dragged_entity,
22 zelda3::GameEntity *¤t_entity,
23 bool free_movement =
false);
49 std::vector<SpriteItem> &items) {
59 const ImGuiTableColumnSortSpecs *sort_spec =
62 switch (sort_spec->ColumnUserID) {
64 delta = (a.
id - b.
id);
67 delta = strcmp(a.
name + 2, b.
name + 2);
71 return (sort_spec->SortDirection == ImGuiSortDirection_Ascending)
A class for managing sprites in the overworld and underworld.
void DrawSpriteInserterPopup()
bool IsMouseHoveringOverEntity(const zelda3::GameEntity &entity, ImVec2 canvas_p0, ImVec2 scrolling)
bool DrawEntranceInserterPopup()
bool DrawExitEditorPopup(zelda3::overworld::OverworldExit &exit)
@ MyItemColumnID_Description
@ MyItemColumnID_Quantity
bool DrawOverworldEntrancePopup(zelda3::overworld::OverworldEntrance &entrance)
bool DrawSpriteEditorPopup(zelda3::Sprite &sprite)
void DrawItemInsertPopup()
void DrawExitInserterPopup()
void MoveEntityOnGrid(zelda3::GameEntity *entity, ImVec2 canvas_p0, ImVec2 scrolling, bool free_movement)
void DrawSpriteTable(std::function< void(int)> onSpriteSelect)
void HandleEntityDragging(zelda3::GameEntity *entity, ImVec2 canvas_p0, ImVec2 scrolling, bool &is_dragging_entity, zelda3::GameEntity *&dragged_entity, zelda3::GameEntity *¤t_entity, bool free_movement)
bool DrawItemEditorPopup(zelda3::overworld::OverworldItem &item)
static const ImGuiTableSortSpecs * s_current_sort_specs
static bool CompareWithSortSpecs(const SpriteItem &a, const SpriteItem &b)
static void SortWithSortSpecs(ImGuiTableSortSpecs *sort_specs, std::vector< SpriteItem > &items)