MCPcopy Create free account
hub / github.com/davemoore22/sorcery / _draw_debug

Method _draw_debug

src/core/ui.cpp:1182–1208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1180 constexpr auto ICON_CGA_OFF{109u};
1181
1182 if (images->has_loaded(std::string{ICONS_TEXTURE})) {
1183
1184 const auto music_status{_ctx.get_config(Enums::Config::MUSIC)};
1185 const auto sound_status{_ctx.get_config(Enums::Config::SOUND)};
1186 const auto cga_status{!_render->get_monochrome()};
1187 const auto music_icon{music_status ? ICON_MUSIC_ON : ICON_MUSIC_OFF};
1188 const auto sound_icon{sound_status ? ICON_SOUND_ON : ICON_SOUND_OFF};
1189 const auto cga_icon{cga_status ? ICON_CGA_ON : ICON_CGA_OFF};
1190
1191 const auto tint{_ctx.controller->get_monochrome()
1192 ? ImVec4{1.0f, 1.0f, 1.0f, _ctx.animation->fade}
1193 : ImVec4{1.0f, 0.0f, 1.0f, _ctx.animation->fade}};
1194
1195 const auto scale{_ctx.display->get_display_metrics().scale};
1196 auto pos{ImVec2{4 * scale, 4 * scale}};
1197 auto size{ImVec2{32 * scale, 32 * scale}};
1198
1199 with_Window(WINDOW_LAYER_TEXTS, nullptr,
1200 ImGuiWindowFlags_NoDecoration) {
1201
1202 _draw_fg_image_with_idx(WINDOW_LAYER_TEXTS, ICONS_TEXTURE,
1203 music_icon, pos, size, tint);
1204 pos.x += 32 * scale;
1205 _draw_fg_image_with_idx(WINDOW_LAYER_TEXTS, ICONS_TEXTURE,
1206 sound_icon, pos, size, tint);
1207
1208 pos.x += 32 * scale;
1209 _draw_fg_image_with_idx(WINDOW_LAYER_TEXTS, ICONS_TEXTURE, cga_icon,
1210 pos, size, tint);
1211 }

Callers

nothing calls this directly

Calls 5

with_WindowFunction · 0.85
get_flagsMethod · 0.80
get_charactersMethod · 0.80
get_all_fontsMethod · 0.80
get_flagMethod · 0.45

Tested by

no test coverage detected