@@ -249,6 +249,9 @@ Dear ImGui Bundle includes the following libraries, which are available in {cpp}
249
249
|https://github.com/epezent/implot[ImPlot]: Immediate Mode Plotting
250
250
|image:{url-demo-images}/battery_implot.jpg[width=200]
251
251
252
+ |https://github.com/brenocq/implot3d[ImPlot3D]: Immediate Mode 3D Plotting
253
+ |image:{url-demo-images}/battery_implot3d.jpg[width=200]
254
+
252
255
253
256
|https://github.com/CedricGuillemet/ImGuizmo.git[ImGuizmo]: Immediate mode 3D gizmo for scene editing and other controls based on Dear ImGui
254
257
|image:{url-demo-images}/demo_gizmo.jpg[width=200]
@@ -757,11 +760,9 @@ void LoadFonts(AppState& appState) // This is called by runnerParams.callbacks.L
757
760
HelloImGui::ImGuiDefaultSettings::LoadDefaultFont_WithFontAwesomeIcons();
758
761
759
762
// Load the title font. Also manually merge FontAwesome icons to it
760
- appState.TitleFont = HelloImGui::LoadFont("fonts/DroidSans.ttf", 18.f);
761
763
HelloImGui::FontLoadingParams fontLoadingParamsTitleIcons;
762
- fontLoadingParamsTitleIcons.mergeToLastFont = true;
763
- fontLoadingParamsTitleIcons.useFullGlyphRange = true;
764
- appState.TitleFont = HelloImGui::LoadFont("fonts/Font_Awesome_6_Free-Solid-900.otf", 18.f, fontLoadingParamsTitleIcons);
764
+ fontLoadingParamsTitleIcons.mergeFontAwesome = true;
765
+ appState.TitleFont = HelloImGui::LoadFont("fonts/Roboto/Roboto-BoldItalic.ttf", 18.f, fontLoadingParamsTitleIcons);
765
766
766
767
// Load an Emoji font
767
768
HelloImGui::FontLoadingParams fontLoadingParamsEmoji;
@@ -1130,7 +1131,7 @@ void DemoAssets(AppState& appState)
1130
1131
1131
1132
void DemoFonts(AppState& appState)
1132
1133
{
1133
- ImGui::PushFont(appState.TitleFont); ImGui::Text("Fonts - " ICON_FA_PEN_NIB ); ImGui::PopFont();
1134
+ ImGui::PushFont(appState.TitleFont); ImGui::Text("Fonts - " ICON_FA_ROCKET ); ImGui::PopFont();
1134
1135
1135
1136
ImGui::TextWrapped("Mix icons " ICON_FA_FACE_SMILE " and text " ICON_FA_ROCKET "");
1136
1137
if (ImGui::IsItemHovered())
@@ -1707,12 +1708,10 @@ def load_fonts(app_state: AppState): # This is called by runnerParams.callbacks
1707
1708
hello_imgui.imgui_default_settings.load_default_font_with_font_awesome_icons()
1708
1709
1709
1710
# Load the title font
1710
- app_state.title_font = hello_imgui.load_font("fonts/DroidSans.ttf", 18.0)
1711
+ # app_state.title_font = hello_imgui.load_font("fonts/DroidSans.ttf", 18.0)
1711
1712
font_loading_params_title_icons = hello_imgui.FontLoadingParams()
1712
- font_loading_params_title_icons.merge_to_last_font = True
1713
- font_loading_params_title_icons.use_full_glyph_range = True
1714
- app_state.title_font = hello_imgui.load_font("fonts/Font_Awesome_6_Free-Solid-900.otf",
1715
- 18.0, font_loading_params_title_icons)
1713
+ font_loading_params_title_icons.merge_font_awesome = True
1714
+ app_state.title_font = hello_imgui.load_font("fonts/Roboto/Roboto-BoldItalic.ttf", 18, font_loading_params_title_icons)
1716
1715
1717
1716
# Load the emoji font
1718
1717
font_loading_params_emoji = hello_imgui.FontLoadingParams()
@@ -2112,7 +2111,7 @@ def demo_assets(app_state: AppState):
2112
2111
2113
2112
def demo_fonts(app_state: AppState):
2114
2113
imgui.push_font(app_state.title_font)
2115
- imgui.text("Fonts - " + icons_fontawesome_6.ICON_FA_PEN_NIB )
2114
+ imgui.text("Fonts - " + icons_fontawesome_6.ICON_FA_ROCKET )
2116
2115
imgui.pop_font()
2117
2116
2118
2117
imgui.text_wrapped("Mix icons " + icons_fontawesome_6.ICON_FA_FACE_SMILE + " and text " + icons_fontawesome_6.ICON_FA_ROCKET)
@@ -2655,7 +2654,7 @@ NOTE: See link:https://github.com/ocornut/imgui_test_engine/blob/main/imgui_test
2655
2654
{cpp}
2656
2655
[source, cpp]
2657
2656
----
2658
- #ifdef IMGUI_BUNDLE_WITH_TEST_ENGINE
2657
+ #ifdef HELLOIMGUI_WITH_TEST_ENGINE
2659
2658
// A demo app that demonstrates how to use ImGui Test Engine (https://github.com/ocornut/imgui_test_engine)
2660
2659
//
2661
2660
// It demonstrates how to:
@@ -2901,9 +2900,9 @@ void ApplyApplicationLayout(HelloImGui::RunnerParams* runnerParams)
2901
2900
runnerParams->dockingParams.dockableWindows = CreateDockableWindows();
2902
2901
runnerParams->dockingParams.layoutCondition = HelloImGui::DockingLayoutCondition::ApplicationStart;
2903
2902
}
2904
- #else
2903
+ #else // #ifdef HELLOIMGUI_WITH_TEST_ENGINE
2905
2904
int main(int, const char**) {}
2906
- #endif // #ifdef IMGUI_BUNDLE_WITH_TEST_ENGINE
2905
+ #endif // #ifdef HELLOIMGUI_WITH_TEST_ENGINE
2907
2906
----
2908
2907
====
2909
2908
@@ -3601,6 +3600,7 @@ link:https://traineq.org/ImGuiBundle/emscripten/bin/demo_widgets.html[Try these
3601
3600
----
3602
3601
// Part of ImGui Bundle - MIT License - Copyright (c) 2022-2024 Pascal Thomet - https://github.com/pthom/imgui_bundle
3603
3602
#include "hello_imgui/hello_imgui.h"
3603
+ #include "hello_imgui/icons_font_awesome_4.h"
3604
3604
#include "imspinner/imspinner.h"
3605
3605
#include "imgui_toggle/imgui_toggle.h"
3606
3606
#include "imgui_toggle/imgui_toggle_presets.h"
@@ -3899,9 +3899,18 @@ void DemoImFileDialog()
3899
3899
3900
3900
ImGuiMd::RenderUnindented(R"(
3901
3901
# ImFileDialog
3902
- [ImFileDialog](https://github.com/pthom/ImFileDialog.git) provides file dialogs for ImGui, with images preview.
3903
- *Not (yet) adapted for High DPI resolution under windows*
3902
+ [ImFileDialog](https://github.com/pthom/ImFileDialog.git) provides file dialogs for ImGui.
3904
3903
)");
3904
+ ImGui::SameLine();
3905
+ ImGui::Text(ICON_FA_EXCLAMATION_TRIANGLE);
3906
+ ImGui::SetItemTooltip(
3907
+ "It is advised to use Portable File Dialogs instead, which offer native dialogs on each platform, "
3908
+ "as well as notifications and messages.\n\n"
3909
+ "Known limitations of ImFileDialog:\n"
3910
+ " * Not adapted for High DPI resolution under windows\n"
3911
+ " * No support for multi-selection\n"
3912
+ " * Will not work under python with a pure python backend (requires to use `immapp.run()`)"
3913
+ );
3905
3914
3906
3915
if (ImGui::Button("Open file"))
3907
3916
ifd::FileDialog::Instance().Open(
@@ -4094,6 +4103,7 @@ from imgui_bundle import (
4094
4103
immapp,
4095
4104
ImVec4,
4096
4105
im_cool_bar,
4106
+ icons_fontawesome,
4097
4107
)
4098
4108
from imgui_bundle import imgui_command_palette as imcmd
4099
4109
from imgui_bundle import portable_file_dialogs as pfd
@@ -4355,14 +4365,24 @@ def demo_imfile_dialog():
4355
4365
if not has_submodule("im_file_dialog"):
4356
4366
return
4357
4367
from imgui_bundle import im_file_dialog as ifd
4358
-
4359
4368
imgui_md.render_unindented(
4360
4369
"""
4361
4370
# ImFileDialog
4362
- [ImFileDialog](https://github.com/pthom/ImFileDialog.git) provides file dialogs for ImGui, with images preview.
4363
- *Not (yet) adapted for High DPI resolution under windows*
4371
+ [ImFileDialog](https://github.com/pthom/ImFileDialog.git) provides file dialogs for ImGui.
4364
4372
"""
4365
4373
)
4374
+ # Warning / low support
4375
+ imgui.same_line()
4376
+ imgui.text(icons_fontawesome.ICON_FA_EXCLAMATION_TRIANGLE)
4377
+ imgui.set_item_tooltip("""
4378
+ It is advised to use Portable File Dialogs instead, which offer native dialogs on each platform,
4379
+ as well as notifications and messages.
4380
+
4381
+ Known limitations of ImFileDialog:
4382
+ * Not adapted for High DPI resolution under windows
4383
+ * No support for multi-selection
4384
+ * Will not work under python with a pure python backend (requires to use `immapp.run()`)
4385
+ """)
4366
4386
4367
4387
if imgui.button("Open file"):
4368
4388
ifd.FileDialog.instance().open(
@@ -6162,9 +6182,10 @@ if __name__ == "__main__":
6162
6182
6163
6183
from imgui_bundle.python_backends.glfw_backend import GlfwRenderer
6164
6184
import OpenGL.GL as gl # type: ignore
6185
+ # When using a pure python backend, prefer to import glfw before imgui_bundle (so that you end up using the standard glfw, not the one provided by imgui_bundle)
6186
+ import glfw # type: ignore
6165
6187
from imgui_bundle import imgui, imgui_ctx
6166
6188
from imgui_bundle import imgui_md
6167
- import glfw # type: ignore
6168
6189
import sys
6169
6190
6170
6191
0 commit comments