157static bool g_theme_initialized =
false;
162 if (!g_theme_initialized) {
164 g_theme_initialized =
true;
166 return g_current_theme;
171 g_theme_initialized =
true;
176 ImGui::PushStyleColor(ImGuiCol_ChildBg, theme.panel_bg_color);
177 ImGui::PushStyleColor(ImGuiCol_Border, theme.panel_border_color);
178 ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 4.0f);
179 ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 1.0f);
183 ImGui::PopStyleVar(2);
184 ImGui::PopStyleColor(2);
188 const ImVec4& color) {
189 ImGui::PushStyleColor(ImGuiCol_Text, color);
190 ImGui::Text(
"%s %s", icon, label);
191 ImGui::PopStyleColor();
197 ImVec4 color = active ? theme.status_active : theme.status_inactive;
198 ImGui::PushStyleColor(ImGuiCol_Text, color);
201 ImGui::Text(
"%s", label);
202 ImGui::PopStyleColor();
207 ImVec4 color = theme.provider_mock;
209 if (strcmp(provider,
"ollama") == 0) {
210 color = theme.provider_ollama;
211 }
else if (strcmp(provider,
"gemini") == 0) {
212 color = theme.provider_gemini;
213 }
else if (strcmp(provider,
"anthropic") == 0) {
214 color = theme.provider_openai;
215 }
else if (strcmp(provider,
"openai") == 0) {
216 color = theme.provider_openai;
219 ImGui::PushStyleColor(ImGuiCol_Text, color);
220 ImGui::Text(
"[%s]", provider);
221 ImGui::PopStyleColor();
230 bg_color = theme.status_success;
233 bg_color = theme.status_warning;
236 bg_color = theme.status_error;
239 bg_color = theme.accent_color;
243 bg_color = theme.panel_bg_darker;
247 ImGui::PushStyleColor(ImGuiCol_Button, bg_color);
248 ImGui::PushStyleColor(ImGuiCol_ButtonHovered, bg_color);
249 ImGui::PushStyleColor(ImGuiCol_ButtonActive, bg_color);
250 ImGui::SmallButton(text);
251 ImGui::PopStyleColor(3);
255 ImGui::Dummy(ImVec2(0.0f, amount));
260 ImGui::Dummy(ImVec2(amount, 0.0f));
264bool StyledButton(
const char* label,
const ImVec4& color,
const ImVec2& size) {
265 ImGui::PushStyleColor(ImGuiCol_Button, color);
266 ImGui::PushStyleColor(
267 ImGuiCol_ButtonHovered,
268 ImVec4(color.x * 1.2f, color.y * 1.2f, color.z * 1.2f, color.w));
269 ImGui::PushStyleColor(
270 ImGuiCol_ButtonActive,
271 ImVec4(color.x * 0.8f, color.y * 0.8f, color.z * 0.8f, color.w));
272 bool clicked = ImGui::Button(label, size);
273 ImGui::PopStyleColor(3);
278 ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
279 bool clicked = ImGui::Button(icon);
280 ImGui::PopStyleColor();
282 if (tooltip && ImGui::IsItemHovered()) {
283 ImGui::SetTooltip(
"%s", tooltip);
const Theme & GetCurrentTheme() const
static ThemeManager & Get()
void RenderStatusIndicator(const char *label, bool active)
bool StyledButton(const char *label, const ImVec4 &color, const ImVec2 &size)
void HorizontalSpacing(float amount)
const AgentUITheme & GetTheme()
void RenderSectionHeader(const char *icon, const char *label, const ImVec4 &color)
void RenderProviderBadge(const char *provider)
void VerticalSpacing(float amount)
void StatusBadge(const char *text, ButtonColor color)
bool IconButton(const char *icon, const char *tooltip)
ImVec4 ConvertColorToImVec4(const Color &color)
Centralized theme colors for Agent UI components.
ImVec4 dungeon_room_border
ImVec4 collaboration_active
ImVec4 dungeon_selection_handle
ImVec4 selection_secondary
ImVec4 dungeon_outline_layer1
ImVec4 dungeon_room_border_dark
ImVec4 dungeon_selection_primary
ImVec4 system_message_color
ImVec4 dungeon_outline_layer0
static AgentUITheme FromCurrentTheme()
ImVec4 dungeon_sprite_layer0
ImVec4 text_secondary_color
ImVec4 dungeon_object_chest
ImVec4 dungeon_object_pot
ImVec4 text_secondary_gray
ImVec4 dungeon_selection_secondary
ImVec4 agent_message_color
ImVec4 dungeon_object_wall
ImVec4 dungeon_grid_cell_border
ImVec4 dungeon_grid_cell_selected
ImVec4 dungeon_outline_layer2
ImVec4 panel_border_color
ImVec4 user_message_color
ImVec4 dungeon_drag_preview_outline
ImVec4 text_warning_yellow
ImVec4 drag_preview_outline
ImVec4 text_success_green
ImVec4 dungeon_object_door
ImVec4 dungeon_object_decoration
ImVec4 dungeon_sprite_layer1
ImVec4 collaboration_inactive
ImVec4 dungeon_drag_preview
ImVec4 command_text_color
ImVec4 dungeon_object_stairs
ImVec4 dungeon_object_floor
ImVec4 dungeon_object_default
ImVec4 dungeon_grid_cell_highlight
ImVec4 dungeon_sprite_layer2
ImVec4 dungeon_selection_pulsing