40 const float font_bar =
41 ImGui::GetFontSize() + ImGui::GetStyle().FramePadding.y * 2.0f;
49 "##DungeonStatusBar", ImVec2(-1, bar_height),
false,
50 ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
52 const float spacing = ImGui::GetStyle().ItemSpacing.x;
55 ImGui::AlignTextToFramePadding();
57 ImGui::SameLine(0, 4);
60 ImGui::SameLine(0, spacing);
61 ImGui::TextDisabled(
"|");
62 ImGui::SameLine(0, spacing);
63 const ImVec4 workflow_color =
69 ImGui::SameLine(0, spacing * 2);
72 ImGui::TextDisabled(
"|");
73 ImGui::SameLine(0, spacing * 2);
77 const float button_height =
79 const ImVec2 undo_size(
80 CalcStatusIconButtonWidth(
ICON_MD_UNDO, button_height), button_height);
81 const ImVec2 redo_size(
82 CalcStatusIconButtonWidth(
ICON_MD_REDO, button_height), button_height);
85 ImGui::BeginDisabled();
89 snprintf(undo_tip,
sizeof(undo_tip),
"Undo%s%s",
98 ImGui::SameLine(0, 4);
101 ImGui::BeginDisabled();
105 snprintf(redo_tip,
sizeof(redo_tip),
"Redo%s%s",
113 ImGui::EndDisabled();
116 ImGui::SameLine(0, 4);
117 ImGui::TextDisabled(
"(%d)", state.
undo_depth);
120 ImGui::SameLine(0, spacing * 2);
123 ImGui::TextDisabled(
"|");
124 ImGui::SameLine(0, spacing * 2);
129 ImGui::SameLine(0, 4);
134 ImGui::SameLine(0, spacing * 2);
137 ImGui::TextDisabled(
"|");
138 ImGui::SameLine(0, spacing * 2);
142 ImGui::SameLine(0, 4);
144 ImGui::SameLine(0, spacing * 2);
147 ImGui::TextDisabled(
"|");
148 ImGui::SameLine(0, spacing * 2);
153 ImGui::SameLine(0, 4);
164 snprintf(right_text,
sizeof(right_text),
ICON_MD_CIRCLE " Room 0x%03X",
167 snprintf(right_text,
sizeof(right_text),
"Room 0x%03X", state.
room_id);
170 snprintf(right_text,
sizeof(right_text),
"No room");
173 const float text_width = ImGui::CalcTextSize(right_text).x;
174 const float right_x = ImGui::GetWindowWidth() - text_width -
175 ImGui::GetStyle().WindowPadding.x;
177 ImGui::SameLine(std::max(ImGui::GetCursorPosX(), right_x));
182 if (ImGui::IsItemHovered()) {
184 tr(
"Room has pending editor changes. Apply Room writes them to the "
185 "loaded ROM buffer."));
188 ImGui::TextDisabled(
"%s", right_text);
bool ThemedIconButton(const char *icon, const char *tooltip, const ImVec2 &size, bool is_active, bool is_disabled, const char *panel_id, const char *anim_id)
Draw a standard icon button with theme-aware colors.