Skip to content

Commit e6b842a

Browse files
committed
update imgui and igfd
1 parent 2866b09 commit e6b842a

File tree

5 files changed

+79
-86
lines changed

5 files changed

+79
-86
lines changed

3rdparty/imgui

Submodule imgui updated 147 files

3rdparty/imwidgets/ImWidgets.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ bool RadioButtonLabeled(float vWidth, const char* label, bool active, bool disab
351351
}
352352

353353
bool RadioButtonLabeled(float vWidth, const char* label, const char* help, bool active, bool disabled, ImFont* vLabelFont) {
354-
if (vLabelFont) PushFont(vLabelFont);
354+
if (vLabelFont) PushFont(vLabelFont, 0.0f);
355355
const bool change = RadioButtonLabeled(vWidth, label, active, disabled);
356356
if (vLabelFont) PopFont();
357357
if (help)
@@ -360,7 +360,7 @@ bool RadioButtonLabeled(float vWidth, const char* label, const char* help, bool
360360
}
361361

362362
bool RadioButtonLabeled(float vWidth, const char* label, const char* help, bool* active, bool disabled, ImFont* vLabelFont) {
363-
if (vLabelFont) PushFont(vLabelFont);
363+
if (vLabelFont) PushFont(vLabelFont, 0.0f);
364364
const bool change = RadioButtonLabeled(vWidth, label, *active, disabled);
365365
if (vLabelFont) PopFont();
366366
if (change) *active = !*active;
@@ -419,7 +419,7 @@ bool RadioButtonLabeled(ImVec2 vSize, const char* label, bool active, bool disab
419419
}
420420

421421
bool RadioButtonLabeled(ImVec2 vSize, const char* label, const char* help, bool active, bool disabled, ImFont* vLabelFont) {
422-
if (vLabelFont) PushFont(vLabelFont);
422+
if (vLabelFont) PushFont(vLabelFont, 0.0f);
423423
const bool change = RadioButtonLabeled(vSize, label, active, disabled);
424424
if (vLabelFont) PopFont();
425425
if (help)
@@ -428,7 +428,7 @@ bool RadioButtonLabeled(ImVec2 vSize, const char* label, const char* help, bool
428428
}
429429

430430
bool RadioButtonLabeled(ImVec2 vSize, const char* label, const char* help, bool* active, bool disabled, ImFont* vLabelFont) {
431-
if (vLabelFont) PushFont(vLabelFont);
431+
if (vLabelFont) PushFont(vLabelFont, 0.0f);
432432
const bool change = RadioButtonLabeled(vSize, label, *active, disabled);
433433
if (vLabelFont) PopFont();
434434
if (change) *active = !*active;
@@ -457,7 +457,7 @@ bool ContrastedButton_For_Dialogs(const char* label, const ImVec2& size_arg) {
457457
bool ContrastedButton(const char* label, const char* help, ImFont* imfont, float vWidth, const ImVec2& size_arg, ImGuiButtonFlags flags) {
458458
const bool pushed = PushStyleColorWithContrast(ImGuiCol_Button, ImGuiCol_Text, CustomStyle::puContrastedTextColor, CustomStyle::puContrastRatio);
459459

460-
if (imfont) PushFont(imfont);
460+
if (imfont) PushFont(imfont, 0.0f);
461461

462462
PushID(++CustomStyle::pushId);
463463

@@ -482,7 +482,7 @@ bool ToggleContrastedButton(const char* vLabelTrue, const char* vLabelFalse, boo
482482

483483
const auto pushed = PushStyleColorWithContrast(ImGuiCol_Button, ImGuiCol_Text, CustomStyle::puContrastedTextColor, CustomStyle::puContrastRatio);
484484

485-
if (vImfont) PushFont(vImfont);
485+
if (vImfont) PushFont(vImfont, 0.0f);
486486

487487
PushID(++CustomStyle::pushId);
488488

@@ -517,7 +517,7 @@ bool BeginContrastedCombo(const char* label, const char* preview_value, ImGuiCom
517517
ImGuiContext& g = *GImGui;
518518
ImGuiWindow* window = GetCurrentWindow();
519519

520-
ImGuiNextWindowDataFlags backup_next_window_data_flags = g.NextWindowData.Flags;
520+
ImGuiNextWindowDataFlags backup_next_window_data_flags = g.NextWindowData.ChildFlags;
521521
g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
522522
if (window->SkipItems) return false;
523523

@@ -548,7 +548,6 @@ bool BeginContrastedCombo(const char* label, const char* preview_value, ImGuiCom
548548
// Render shape
549549
const ImU32 frame_col = GetColorU32(hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg);
550550
const float value_x2 = ImMax(bb.Min.x, bb.Max.x - arrow_size);
551-
RenderNavHighlight(bb, id);
552551
if (!(flags & ImGuiComboFlags_NoPreview)) window->DrawList->AddRectFilled(bb.Min, ImVec2(value_x2, bb.Max.y), frame_col, style.FrameRounding, (flags & ImGuiComboFlags_NoArrowButton) ? ImDrawFlags_RoundCornersAll : ImDrawFlags_RoundCornersLeft);
553552
if (!(flags & ImGuiComboFlags_NoArrowButton)) {
554553
const bool pushed = PushStyleColorWithContrast(ImGuiCol_Button, ImGuiCol_Text, CustomStyle::puContrastedTextColor, CustomStyle::puContrastRatio);
@@ -576,7 +575,7 @@ bool BeginContrastedCombo(const char* label, const char* preview_value, ImGuiCom
576575

577576
if (!popup_open) return false;
578577

579-
g.NextWindowData.Flags = backup_next_window_data_flags;
578+
g.NextWindowData.ChildFlags = backup_next_window_data_flags;
580579
return BeginComboPopup(popup_id, bb, flags);
581580
}
582581

@@ -590,7 +589,7 @@ bool ContrastedCombo(float vWidth, const char* label, int* current_item, bool (*
590589
if (*current_item >= 0 && *current_item < items_count) items_getter(data, *current_item, &preview_value);
591590

592591
// The old Combo() API exposed "popup_max_height_in_items". The new more general BeginCombo() API doesn't have/need it, but we emulate it here.
593-
if (popup_max_height_in_items != -1 && !(g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSizeConstraint)) SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, inCalcMaxPopupHeightFromItemCount(popup_max_height_in_items)));
592+
if (popup_max_height_in_items != -1 && !(g.NextWindowData.ChildFlags & ImGuiNextWindowDataFlags_HasSizeConstraint)) SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, inCalcMaxPopupHeightFromItemCount(popup_max_height_in_items)));
594593

595594
if (!BeginContrastedCombo(label, preview_value, ImGuiComboFlags_None)) return false;
596595

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ option(USE_BOOST_FILESYSTEM "Enable the demo of custom filesystem here with boos
1616
## some defines for debug mode (before 3rdparty.cmake)
1717
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
1818

19-
## some defines for debug mode (before 3rdparty.cmake)
20-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
21-
2219
set(FINAL_BIN_DIR ${CMAKE_SOURCE_DIR}/bin)
2320
set(CMAKE_PDB_OUTPUT_DIRECTORY "${FINAL_BIN_DIR}/debug")
2421

@@ -82,6 +79,7 @@ file(GLOB_RECURSE PROJECT_SRC_FILES ${CMAKE_SOURCE_DIR}/src/*.*)
8279
source_group(TREE ${CMAKE_SOURCE_DIR}/src PREFIX src FILES ${PROJECT_SRC_FILES})
8380

8481
file(GLOB_RECURSE CMAKE_SOURCES ${CMAKE_SOURCE_DIR}/cmake/*.*)
82+
source_group(cmake FILES ${CMAKE_SOURCES})
8583

8684
if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
8785
file(GLOB MAIN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/mainAndroid.cpp)
@@ -100,7 +98,7 @@ else()
10098
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/imgui/backends/imgui_impl_opengl3.h)
10199
endif()
102100

103-
source_group(cmake FILES ${CMAKE_SOURCES})
101+
source_group(src FILES ${MAIN_SOURCES})
104102
source_group(src\\ImGuiImpl FILES ${IMGUIIMPL_SOURCES})
105103

106104
if (APPLE)

src/gui/DemoDialog.cpp

Lines changed: 66 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -69,64 +69,71 @@ inline void InfosPane(const char* vFilter, IGFDUserDatas vUserDatas, bool* vCant
6969

7070
void ApplyOrangeBlueTheme() {
7171
ImGuiStyle style;
72-
style.Colors[ImGuiCol_Text] = ImVec4(0.85f, 0.85f, 0.85f, 1.00f);
73-
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.65f, 0.65f, 0.65f, 1.00f);
74-
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
75-
style.Colors[ImGuiCol_ChildBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
76-
style.Colors[ImGuiCol_PopupBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
77-
style.Colors[ImGuiCol_Border] = ImVec4(0.26f, 0.28f, 0.29f, 1.00f);
78-
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.32f, 0.34f, 0.36f, 1.00f);
79-
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.21f, 0.29f, 0.36f, 1.00f);
80-
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.71f);
81-
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.93f);
82-
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.18f, 0.20f, 0.21f, 1.00f);
83-
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.23f, 0.25f, 0.26f, 1.00f);
84-
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.30f, 0.33f, 0.35f, 1.00f);
85-
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
86-
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.21f, 0.29f, 0.36f, 0.89f);
87-
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.13f, 0.52f, 0.94f, 0.45f);
88-
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.71f, 1.00f, 0.89f);
89-
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.24f, 0.78f, 0.78f, 0.31f);
90-
style.Colors[ImGuiCol_CheckMark] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
91-
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.24f, 0.52f, 0.88f, 1.00f);
92-
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
93-
style.Colors[ImGuiCol_Button] = ImVec4(1.00f, 0.60f, 0.00f, 0.80f);
94-
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(1.00f, 0.48f, 0.00f, 0.80f);
95-
style.Colors[ImGuiCol_ButtonActive] = ImVec4(1.00f, 0.40f, 0.00f, 0.80f);
96-
style.Colors[ImGuiCol_Header] = ImVec4(0.13f, 0.52f, 0.94f, 0.66f);
97-
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.13f, 0.52f, 0.94f, 1.00f);
98-
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.13f, 0.52f, 0.94f, 0.59f);
99-
style.Colors[ImGuiCol_Separator] = ImVec4(0.18f, 0.35f, 0.58f, 0.59f);
100-
style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f);
101-
style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f);
102-
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.20f);
103-
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
104-
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
105-
style.Colors[ImGuiCol_Tab] = ImVec4(0.20f, 0.41f, 0.68f, 0.00f);
106-
style.Colors[ImGuiCol_TabHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
107-
style.Colors[ImGuiCol_TabSelected] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
108-
style.Colors[ImGuiCol_TabDimmed] = ImVec4(0.20f, 0.41f, 0.68f, 0.00f);
109-
style.Colors[ImGuiCol_TabDimmedSelected] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
110-
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
111-
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
112-
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.13f, 0.52f, 0.94f, 0.95f);
113-
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
114-
style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.19f, 0.19f, 0.20f, 1.00f);
115-
style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.31f, 0.31f, 0.35f, 1.00f);
116-
style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f);
117-
style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
118-
style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
119-
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
120-
style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
121-
style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
122-
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
123-
style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
124-
style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
125-
126-
style.Colors[ImGuiCol_WindowBg].w = 1.00f;
127-
style.Colors[ImGuiCol_ChildBg].w = 0.00f;
128-
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
129-
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
72+
style.Colors[ImGuiCol_Text] = ImVec4(0.85f, 0.85f, 0.85f, 1.00f);
73+
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.65f, 0.65f, 0.65f, 1.00f);
74+
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
75+
style.Colors[ImGuiCol_ChildBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
76+
style.Colors[ImGuiCol_PopupBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
77+
style.Colors[ImGuiCol_Border] = ImVec4(0.26f, 0.28f, 0.29f, 1.00f);
78+
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.32f, 0.34f, 0.36f, 1.00f);
79+
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.21f, 0.29f, 0.36f, 1.00f);
80+
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.71f);
81+
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.93f);
82+
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.18f, 0.20f, 0.21f, 1.00f);
83+
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.23f, 0.25f, 0.26f, 1.00f);
84+
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.30f, 0.33f, 0.35f, 1.00f);
85+
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
86+
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.21f, 0.29f, 0.36f, 0.89f);
87+
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.13f, 0.52f, 0.94f, 0.45f);
88+
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.71f, 1.00f, 0.89f);
89+
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.24f, 0.78f, 0.78f, 0.31f);
90+
style.Colors[ImGuiCol_CheckMark] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
91+
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.24f, 0.52f, 0.88f, 1.00f);
92+
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
93+
style.Colors[ImGuiCol_Button] = ImVec4(1.00f, 0.60f, 0.00f, 0.80f);
94+
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(1.00f, 0.48f, 0.00f, 0.80f);
95+
style.Colors[ImGuiCol_ButtonActive] = ImVec4(1.00f, 0.40f, 0.00f, 0.80f);
96+
style.Colors[ImGuiCol_Header] = ImVec4(0.13f, 0.52f, 0.94f, 0.66f);
97+
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.13f, 0.52f, 0.94f, 1.00f);
98+
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.13f, 0.52f, 0.94f, 0.59f);
99+
style.Colors[ImGuiCol_Separator] = ImVec4(0.18f, 0.35f, 0.58f, 0.59f);
100+
style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f);
101+
style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f);
102+
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.20f);
103+
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
104+
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
105+
style.Colors[ImGuiCol_InputTextCursor] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
106+
style.Colors[ImGuiCol_Tab] = ImVec4(0.20f, 0.41f, 0.68f, 0.00f);
107+
style.Colors[ImGuiCol_TabHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f);
108+
style.Colors[ImGuiCol_TabSelected] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
109+
style.Colors[ImGuiCol_TabSelectedOverline] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
110+
style.Colors[ImGuiCol_TabDimmed] = ImVec4(0.20f, 0.41f, 0.68f, 0.00f);
111+
style.Colors[ImGuiCol_TabDimmedSelected] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
112+
style.Colors[ImGuiCol_TabDimmedSelectedOverline] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
113+
style.Colors[ImGuiCol_DockingPreview] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
114+
style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.41f, 0.68f, 1.00f);
115+
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
116+
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
117+
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.13f, 0.52f, 0.94f, 0.95f);
118+
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
119+
style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.19f, 0.19f, 0.20f, 1.00f);
120+
style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.31f, 0.31f, 0.35f, 1.00f);
121+
style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f);
122+
style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.15f, 0.16f, 0.17f, 1.00f);
123+
style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
124+
style.Colors[ImGuiCol_TextLink] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
125+
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
126+
style.Colors[ImGuiCol_TreeLines] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
127+
style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
128+
style.Colors[ImGuiCol_NavCursor] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
129+
style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
130+
style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
131+
style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
132+
133+
style.Colors[ImGuiCol_WindowBg].w = 1.00f;
134+
style.Colors[ImGuiCol_ChildBg].w = 0.00f;
135+
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
136+
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
130137

131138
// Main
132139
style.WindowPadding = ImVec2(4.00f, 4.00f);
@@ -265,7 +272,7 @@ void DemoDialog::init(const float& vFontSize) {
265272
GLuint textureId = 0;
266273
glGenTextures(1, &textureId);
267274
vThumbnail_Info->textureID = (void*)(size_t)textureId;
268-
275+
269276
glBindTexture(GL_TEXTURE_2D, textureId);
270277
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
271278
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
@@ -320,17 +327,6 @@ void DemoDialog::init(const float& vFontSize) {
320327
});
321328
#endif // USE_THUMBNAILS
322329

323-
// Fonts
324-
{
325-
ImFontConfig icons_config_0;
326-
icons_config_0.GlyphRanges = ImGui::GetIO().Fonts->GetGlyphRangesChineseFull();
327-
//ImGui::GetIO().Fonts->AddFontDefault(&icons_config_0);
328-
}
329-
{
330-
ImFontConfig icons_config_1;
331-
icons_config_1.GlyphRanges = ImGui::GetIO().Fonts->GetGlyphRangesChineseFull();
332-
//ImGui::GetIO().Fonts->AddFontFromFileTTF("NotoSansSCRegular.ttf", vFontSize, &icons_config_1);
333-
}
334330
{ // Boboto Font
335331
ImGui::GetIO().Fonts->AddFontFromMemoryCompressedBase85TTF(FONT_ICON_BUFFER_NAME_RM, vFontSize);
336332
}

0 commit comments

Comments
 (0)