Skip to content

Commit 1ec5751

Browse files
committed
V2.8.16 used the fwl_prefs.ini to set preference of imgui debug popout. Can set the 3 different font sizes when it loads them
1 parent 8579698 commit 1ec5751

14 files changed

Lines changed: 75 additions & 18 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push]
55
env:
66
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
77
BUILD_TYPE: RelWithDebInfo
8-
FWL_VERSION: 2.8.15
8+
FWL_VERSION: 2.8.16
99

1010
jobs:
1111
build-lin:

FlyWithLua/Documentation/ChangeLog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ v2.8.13 Added do_every_frame_after() callback to run in FlightLoop Phase 1 (afte
101101
v2.8.14 Added UnregisterAccessor() to XPluginStop(void) to prevent a threading violation Thanks Camille
102102

103103
v2.8.15 Updated to imgui 1.92.8. Now have default scalable fonts. Can load 3 custom fonts
104+
105+
v2.8.16 Added to the fwl_prefs.ini file being able to disable the imgui debug popup for non developers. Also in the fwl_prefs.ini can set the three font sizes to better match your project.
217 Bytes
Binary file not shown.

FlyWithLua/fwl_prefs.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,15 @@ DeveloperMode = 0
99
;
1010
;VerboseMode = 0 Disabeled = 1 Enabeled
1111
VerboseMode = 0
12+
13+
;ImguiDebugPopup = 0 Disabeled = 1 Enabeled
14+
ImguiDebugPopup = 0
15+
16+
;ImguiFontSize1 = 13 Initial font1 size
17+
ImguiFontSize1 = 13
18+
19+
;ImguiFontSize2 = 16 Initial font2 size
20+
ImguiFontSize2 = 16
21+
22+
;ImguiFontSize3 = 20 Initial font3 size
23+
ImguiFontSize3 = 20

FlyWithLua/lin_x64/FlyWithLua.xpl

232 Bytes
Binary file not shown.

FlyWithLua/mac_x64/FlyWithLua.xpl

416 Bytes
Binary file not shown.

FlyWithLua/win_x64/FlyWithLua.xpl

14.8 KB
Binary file not shown.

docs/FlyWithLua_Manual_en.pdf

217 Bytes
Binary file not shown.

docs/FlyWithLua_Manual_en.tex

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,11 +4021,25 @@ \section{fwl\_prefs.ini file}
40214021
; \newline
40224022
;VerboseMode = 0 Disabeled = 1 Enabeled \newline
40234023
VerboseMode = 0 \newline
4024+
; \newline
4025+
;ImguiDebugPopup = 0 Disabeled = 1 Enabeled \newline
4026+
ImguiDebugPopup = 0 \newline
4027+
; \newline
4028+
;ImguiFontSize1 = 13 Initial font1 size \newline
4029+
ImguiFontSize1 = 13 \newline
4030+
4031+
;ImguiFontSize2 = 16 Initial font1 size \newline
4032+
ImguiFontSize2 = 16 \newline
4033+
4034+
;ImguiFontSize3 = 20 Initial font1 size \newline
4035+
ImguiFontSize3 = 20 \newline
40244036

40254037
If you change the 0 to a 1 you will be in developer mode and will disable the (Quarantine) folder
40264038
functions. This will be this way until you change it back to the default of 0.
40274039

4040+
These new changes in 2.8.16 allow you to to disable the imgui debug popup for non developers.
40284041

4042+
The next three allow you to set 3 different font sizes.
40294043

40304044

40314045
\newpage

src/FloatingWindows/FLWIntegration.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,9 @@ int LuaImguiPushFont(lua_State *L) {
147147
// This is the only way I could get this to work ugly but works
148148
// float custom_size;
149149

150-
ImGuiStyle& style = ImGui::GetStyle();
150+
// ImGuiStyle& style = ImGui::GetStyle();
151151

152-
if (font_number == 0) {
153-
ImGui::PushFont(NULL, style.FontSizeBase);
154-
}
155-
else if (font_number == 1) {
152+
if (font_number == 1) {
156153
ImGui::PushFont(customFont1);
157154
}
158155
else if (font_number == 2) {
@@ -190,7 +187,6 @@ int LuaImguiPushFont(lua_State *L) {
190187
return 0;
191188
}
192189

193-
194190
int LuaSetFloatingWindowPosition(lua_State *L) {
195191
if (!lua_islightuserdata(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3)) {
196192
flywithlua::logMsg(logToDevCon, "FlyWithLua Error: Wrong parameters passed to float_wnd_set_position");

0 commit comments

Comments
 (0)