SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLImGui Class Reference

ImGui Interface class for forwarding all events to the original ImGui Handlers. More...

#include <SLImGui.h>

Inheritance diagram for SLImGui:
[legend]

Public Member Functions

 SLImGui (cbOnImGuiBuild buildCB, cbOnImGuiLoadConfig loadConfigCB, cbOnImGuiSaveConfig saveConfigCB, int dpi, SLIOBuffer fontDataProp, SLIOBuffer fontDataFixed)
 
 ~SLImGui () override
 
void init (const string &configPath) override
 Initializes OpenGL handles to zero and sets the ImGui key map. More...
 
void onInitNewFrame (SLScene *s, SLSceneView *sv) override
 Inits a new frame for the ImGui system. More...
 
void onResize (const SLRecti &viewport) override
 Callback if window got resized. More...
 
void onPaint (const SLRecti &viewport) override
 Callback for main rendering for the ImGui GUI system. More...
 
void onMouseDown (SLMouseButton button, SLint x, SLint y) override
 Callback on mouse button down event. More...
 
void onMouseUp (SLMouseButton button, SLint x, SLint y) override
 Callback on mouse button up event. More...
 
void onMouseMove (SLint xPos, SLint yPos) override
 Updates the mouse cursor position. More...
 
void onMouseWheel (SLfloat yoffset) override
 Callback for the mouse scroll movement. More...
 
void onKeyPress (SLKey key, SLKey mod) override
 Callback on key press event. More...
 
void onKeyRelease (SLKey key, SLKey mod) override
 Callback on key release event. More...
 
void onCharInput (SLuint c) override
 Callback on character input. More...
 
void onClose () override
 Callback on closing the application. More...
 
void renderExtraFrame (SLScene *s, SLSceneView *sv, SLint mouseX, SLint mouseY) override
 Renders an extra frame with the current mouse position. More...
 
bool doNotDispatchKeyboard () override
 inform if user keyboard input was consumed by the ui More...
 
bool doNotDispatchMouse () override
 inform if user mouse input was consumed by the ui More...
 
void loadFonts (SLfloat fontPropDots, SLfloat fontFixedDots)
 Loads the proportional and fixed size font depending on the passed DPI. More...
 
void drawMouseCursor (bool doDraw) override
 Turns on or off the mouse cursor drawing. More...
 
- Public Member Functions inherited from SLUiInterface
virtual ~SLUiInterface ()
 

Static Public Attributes

static SLfloat fontPropDots = 16.0f
 Default font size of proportional font. More...
 
static SLfloat fontFixedDots = 13.0f
 Default font size of fixed size font. More...
 

Private Member Functions

void deleteOpenGLObjects ()
 
void createOpenGLObjects ()
 
void printCompileErrors (SLint shaderHandle, const SLchar *src)
 Prints the compile errors in case of a GLSL compile failure. More...
 

Private Attributes

cbOnImGuiBuild _build = nullptr
 
cbOnImGuiSaveConfig _saveConfig = nullptr
 
SLfloat _timeSec
 Time in seconds. More...
 
SLVec2f _mousePosPX
 Mouse cursor position. More...
 
SLfloat _mouseWheel
 Mouse wheel position. More...
 
SLbool _mousePressed [3]
 Mouse button press state. More...
 
SLfloat _fontPropDots
 Active font size of proportional font. More...
 
SLfloat _fontFixedDots
 Active font size of fixed size font. More...
 
SLstring _configPath
 Path to config files. More...
 
SLIOBuffer _fontDataProp
 Raw data of proportional font file. More...
 
SLIOBuffer _fontDataFixed
 Raw data of fixed size font file. More...
 

Detailed Description

ImGui Interface class for forwarding all events to the original ImGui Handlers.

ImGui is a super easy GUI library for the rendering of a UI with OpenGL. For more information see: https://github.com/ocornut/imgui

This class provides only the interface into ImGui. In the event handlers of SLSceneView the according callback in ImGui is called.
Compared to the older SLGLImGui class this class contains no OpenGL code and only calls the original backend functions in ImGui_impl_OpenGL3.cpp provided by the ImGui framework.
There is no UI drawn with this class. It must be defined in another class that provides the build function. For the Demo apps this is done in the file AppDemoGui and the build function is passed e.g. in glfwMain function of the app-demo project.

The full call stack for rendering one frame is:

Definition at line 61 of file SLImGui.h.

Constructor & Destructor Documentation

◆ SLImGui()

SLImGui::SLImGui ( cbOnImGuiBuild  buildCB,
cbOnImGuiLoadConfig  loadConfigCB,
cbOnImGuiSaveConfig  saveConfigCB,
int  dpi,
SLIOBuffer  fontDataProp,
SLIOBuffer  fontDataFixed 
)

Definition at line 27 of file SLImGui.cpp.

33 {
34  _build = buildCB;
35  _saveConfig = saveConfigCB;
36  _fontPropDots = 13.0f;
37  _fontFixedDots = 16.0f;
38  _mouseWheel = 0.0f;
39  _mousePressed[0] = false;
40  _mousePressed[1] = false;
41  _mousePressed[2] = false;
42  _fontDataProp = fontDataProp;
43  _fontDataFixed = fontDataFixed;
44 
45  // Setup Dear ImGui context
46  IMGUI_CHECKVERSION();
47  ImGui::CreateContext();
48  ImGuiIO& io = ImGui::GetIO();
49  (void)io;
50  io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
51  io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
52  io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking
53  io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows
54  ImGui::StyleColorsDark();
55 
56  // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
57  ImGuiStyle& style = ImGui::GetStyle();
58  if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
59  {
60  style.WindowRounding = 0.0f;
61  style.Colors[ImGuiCol_WindowBg].w = 1.0f;
62  }
63 
64  // Setup Platform/Renderer backends
65  ImGui_ImplOpenGL3_Init(nullptr);
66 
67  // load config
68  if (loadConfigCB)
69  loadConfigCB(dpi);
70 
71  // load GUI fonts depending on the resolution
73 }
static SLint dpi
Dot per inch resolution of screen.
Definition: AppGLFW.cpp:41
typedef void(SL_STDCALL *cbOnImGuiBuild)(SLScene *s
Callback function typedef for ImGui build function.
SLIOBuffer _fontDataFixed
Raw data of fixed size font file.
Definition: SLImGui.h:114
void loadFonts(SLfloat fontPropDots, SLfloat fontFixedDots)
Loads the proportional and fixed size font depending on the passed DPI.
Definition: SLImGui.cpp:151
static SLfloat fontPropDots
Default font size of proportional font.
Definition: SLImGui.h:91
SLbool _mousePressed[3]
Mouse button press state.
Definition: SLImGui.h:109
SLfloat _fontFixedDots
Active font size of fixed size font.
Definition: SLImGui.h:111
cbOnImGuiBuild _build
Definition: SLImGui.h:101
SLfloat _mouseWheel
Mouse wheel position.
Definition: SLImGui.h:108
SLfloat _fontPropDots
Active font size of proportional font.
Definition: SLImGui.h:110
SLIOBuffer _fontDataProp
Raw data of proportional font file.
Definition: SLImGui.h:113
static SLfloat fontFixedDots
Default font size of fixed size font.
Definition: SLImGui.h:92
cbOnImGuiSaveConfig _saveConfig
Definition: SLImGui.h:104

◆ ~SLImGui()

SLImGui::~SLImGui ( )
override

Definition at line 75 of file SLImGui.cpp.

76 {
77  onClose();
78 }
void onClose() override
Callback on closing the application.
Definition: SLImGui.cpp:141

Member Function Documentation

◆ createOpenGLObjects()

void SLImGui::createOpenGLObjects ( )
private

◆ deleteOpenGLObjects()

void SLImGui::deleteOpenGLObjects ( )
private

◆ doNotDispatchKeyboard()

bool SLImGui::doNotDispatchKeyboard ( )
inlineoverridevirtual

inform if user keyboard input was consumed by the ui

Reimplemented from SLUiInterface.

Definition at line 85 of file SLImGui.h.

85 { return ImGui::GetIO().WantCaptureKeyboard; }

◆ doNotDispatchMouse()

bool SLImGui::doNotDispatchMouse ( )
inlineoverridevirtual

inform if user mouse input was consumed by the ui

(e.g. the ui was hit by a mouse click. In this case the user input would not be forwarded to 3D scene graph)

Reimplemented from SLUiInterface.

Definition at line 86 of file SLImGui.h.

86 { return ImGui::GetIO().WantCaptureMouse; }

◆ drawMouseCursor()

void SLImGui::drawMouseCursor ( bool  doDraw)
inlineoverridevirtual

Turns on or off the mouse cursor drawing.

Reimplemented from SLUiInterface.

Definition at line 88 of file SLImGui.h.

88 { ImGui::GetIO().MouseDrawCursor = doDraw; }

◆ init()

void SLImGui::init ( const string &  configPath)
overridevirtual

Initializes OpenGL handles to zero and sets the ImGui key map.

Reimplemented from SLUiInterface.

Definition at line 81 of file SLImGui.cpp.

82 {
83  _fontPropDots = 13.0f;
84  _fontFixedDots = 16.0f;
85  _mouseWheel = 0.0f;
86  _mousePressed[0] = false;
87  _mousePressed[1] = false;
88  _mousePressed[2] = false;
89  _configPath = configPath;
90 
91  ImGuiIO& io = ImGui::GetIO();
92  io.IniSavingRate = 1.0f;
93  io.IniFilename = NULL; // Disable ini config saving because we handle that ourselves
94  io.KeyMap[ImGuiKey_Tab] = K_tab;
95  io.KeyMap[ImGuiKey_LeftArrow] = K_left;
96  io.KeyMap[ImGuiKey_RightArrow] = K_right;
97  io.KeyMap[ImGuiKey_UpArrow] = K_up;
98  io.KeyMap[ImGuiKey_DownArrow] = K_down;
99  io.KeyMap[ImGuiKey_PageUp] = K_pageUp;
100  io.KeyMap[ImGuiKey_PageDown] = K_pageUp;
101  io.KeyMap[ImGuiKey_Home] = K_home;
102  io.KeyMap[ImGuiKey_End] = K_end;
103  io.KeyMap[ImGuiKey_Delete] = K_delete;
104  io.KeyMap[ImGuiKey_Backspace] = K_backspace;
105  io.KeyMap[ImGuiKey_Enter] = K_enter;
106  io.KeyMap[ImGuiKey_Escape] = K_esc;
107  io.KeyMap[ImGuiKey_Space] = K_space;
108  io.KeyMap[ImGuiKey_A] = 'A';
109  io.KeyMap[ImGuiKey_C] = 'C';
110  io.KeyMap[ImGuiKey_V] = 'V';
111  io.KeyMap[ImGuiKey_X] = 'X';
112  io.KeyMap[ImGuiKey_Y] = 'Y';
113  io.KeyMap[ImGuiKey_Z] = 'Z';
114 
115  // The screen size is set again in onResize
116  io.DisplaySize = ImVec2(0, 0);
117  io.DisplayFramebufferScale = ImVec2(1, 1);
118 
119 #if defined(SL_OS_ANDROID) || defined(SL_OS_MACIOS) || defined(SL_EMSCRIPTEN)
120  io.MouseDrawCursor = false;
121 #else
122  io.MouseDrawCursor = true;
123 #endif
124 
125  // Change default style to show the widget border
126  ImGuiStyle& style = ImGui::GetStyle();
127  style.FrameBorderSize = 1;
128 
129  // Load ImGui config from imgui.ini
130  SLstring iniFile = configPath + "imgui.ini";
131  if (SLFileStorage::exists(iniFile, IOK_config))
132  {
133  SLstring iniContents = SLFileStorage::readIntoString(iniFile,
134  IOK_config);
135  ImGui::LoadIniSettingsFromMemory(iniContents.c_str(),
136  iniContents.size());
137  }
138 }
string SLstring
Definition: SL.h:158
@ K_down
Definition: SLEnums.h:25
@ K_delete
Definition: SLEnums.h:23
@ K_space
Definition: SLEnums.h:18
@ K_up
Definition: SLEnums.h:24
@ K_enter
Definition: SLEnums.h:20
@ K_esc
Definition: SLEnums.h:21
@ K_tab
Definition: SLEnums.h:19
@ K_end
Definition: SLEnums.h:29
@ K_right
Definition: SLEnums.h:26
@ K_pageUp
Definition: SLEnums.h:31
@ K_left
Definition: SLEnums.h:27
@ K_backspace
Definition: SLEnums.h:22
@ K_home
Definition: SLEnums.h:28
@ IOK_config
Definition: SLFileStorage.h:44
SLstring _configPath
Path to config files.
Definition: SLImGui.h:112
bool exists(std::string path, SLIOStreamKind kind)
Checks whether a given file exists.
std::string readIntoString(std::string path, SLIOStreamKind kind)
Reads an entire file into a string.

◆ loadFonts()

void SLImGui::loadFonts ( SLfloat  fontPropDots,
SLfloat  fontFixedDots 
)

Loads the proportional and fixed size font depending on the passed DPI.

Definition at line 151 of file SLImGui.cpp.

153 {
154  _fontPropDots = fontPropDotsToLoad;
155  _fontFixedDots = fontFixedDotsToLoad;
156 
157  ImGuiIO& io = ImGui::GetIO();
158  io.Fonts->Clear();
159 
160  // Create copies of the font data because ImGUI takes ownerhip of the data.
161  SLIOBuffer fontDataProp = _fontDataProp.copy();
162  SLIOBuffer fontDataFixed = _fontDataFixed.copy();
163 
164  // Load proportional font for menu and text displays
165  io.Fonts->AddFontFromMemoryTTF(fontDataProp.data,
166  static_cast<int>(fontDataProp.size),
167  fontPropDotsToLoad);
168 
169  // Load fixed size font for statistics windows
170  io.Fonts->AddFontFromMemoryTTF(fontDataFixed.data,
171  static_cast<int>(fontDataFixed.size),
172  fontFixedDotsToLoad);
173  ImGui_ImplOpenGL3_DestroyDeviceObjects();
174  ImGui_ImplOpenGL3_CreateDeviceObjects();
175 }
Utility struct that holds a pointer and its length.
Definition: SLFileStorage.h:28
SLIOBuffer copy()
Creates a copy of the data in the buffer.
size_t size
Definition: SLFileStorage.h:30
unsigned char * data
Definition: SLFileStorage.h:29

◆ onCharInput()

void SLImGui::onCharInput ( SLuint  c)
overridevirtual

Callback on character input.

Reimplemented from SLUiInterface.

Definition at line 298 of file SLImGui.cpp.

299 {
300  ImGuiIO& io = ImGui::GetIO();
301  if (c > 0 && c < 0x10000)
302  io.AddInputCharacter((unsigned short)c);
303 }

◆ onClose()

void SLImGui::onClose ( )
overridevirtual

Callback on closing the application.

Reimplemented from SLUiInterface.

Definition at line 141 of file SLImGui.cpp.

142 {
143  ImGui::SetCurrentContext(ImGui::GetCurrentContext());
144  if (_saveConfig)
145  _saveConfig();
146  ImGui_ImplOpenGL3_Shutdown();
147  ImGui::DestroyContext();
148 }

◆ onInitNewFrame()

void SLImGui::onInitNewFrame ( SLScene s,
SLSceneView sv 
)
overridevirtual

Inits a new frame for the ImGui system.

Reimplemented from SLUiInterface.

Definition at line 183 of file SLImGui.cpp.

184 {
188 
189  ImGui_ImplOpenGL3_NewFrame();
190 
191  ImGuiIO& io = ImGui::GetIO();
192 
193  // Setup time step
194  SLfloat nowSec = GlobalTimer::timeS();
195  io.DeltaTime = _timeSec > 0.0 ? nowSec - _timeSec : 1.0f / 60.0f;
196  if (io.DeltaTime < 0) io.DeltaTime = 1.0f / 60.0f;
197  _timeSec = nowSec;
198 
199  io.MouseWheel = _mouseWheel;
200  _mouseWheel = 0.0f;
201 
202  // Start the frame
203  ImGui::NewFrame();
204 
205  // Save ImGui config to imgui.ini
206  if (ImGui::GetIO().WantSaveIniSettings)
207  {
208  SLstring iniFile = _configPath + "imgui.ini";
209  size_t iniContentsSize;
210  const char* rawIniContents = ImGui::SaveIniSettingsToMemory(&iniContentsSize);
211  SLstring iniContents(rawIniContents, rawIniContents + iniContentsSize);
212  SLFileStorage::writeString(iniFile, IOK_config, iniContents);
213  ImGui::GetIO().WantSaveIniSettings = false;
214  }
215 
216  // Call the _build function. The whole UI is constructed here
217  // This function is provided by the top-level project.
218  // For the SLProject demo apps this _build function is implemented in the
219  // class SLDemoGui.
220  if (_build)
221  _build(s, sv);
222 }
float SLfloat
Definition: SL.h:173
int SLint
Definition: SL.h:170
static float timeS()
Definition: GlobalTimer.cpp:20
SLfloat _timeSec
Time in seconds.
Definition: SLImGui.h:106
The SLScene class represents the top level instance holding the scene structure.
Definition: SLScene.h:47
SceneView class represents a dynamic real time 3D view onto the scene.
Definition: SLSceneView.h:69
void writeString(std::string path, SLIOStreamKind kind, const std::string &string)
Writes a string to a file.

◆ onKeyPress()

void SLImGui::onKeyPress ( SLKey  key,
SLKey  mod 
)
overridevirtual

Callback on key press event.

Reimplemented from SLUiInterface.

Definition at line 278 of file SLImGui.cpp.

279 {
280  ImGuiIO& io = ImGui::GetIO();
281  io.KeysDown[key] = true;
282  io.KeyCtrl = mod & K_ctrl ? true : false;
283  io.KeyShift = mod & K_shift ? true : false;
284  io.KeyAlt = mod & K_alt ? true : false;
285 }
@ K_shift
Definition: SLEnums.h:62
@ K_ctrl
Definition: SLEnums.h:63
@ K_alt
Definition: SLEnums.h:64
T mod(T a, T b)
Definition: Utils.h:250

◆ onKeyRelease()

void SLImGui::onKeyRelease ( SLKey  key,
SLKey  mod 
)
overridevirtual

Callback on key release event.

Reimplemented from SLUiInterface.

Definition at line 288 of file SLImGui.cpp.

289 {
290  ImGuiIO& io = ImGui::GetIO();
291  io.KeysDown[key] = false;
292  io.KeyCtrl = mod & K_ctrl ? true : false;
293  io.KeyShift = mod & K_shift ? true : false;
294  io.KeyAlt = mod & K_alt ? true : false;
295 }

◆ onMouseDown()

void SLImGui::onMouseDown ( SLMouseButton  button,
SLint  x,
SLint  y 
)
overridevirtual

Callback on mouse button down event.

Reimplemented from SLUiInterface.

Definition at line 242 of file SLImGui.cpp.

243 {
244  ImGuiIO& io = ImGui::GetIO();
245  io.MousePos = ImVec2((SLfloat)x, (SLfloat)y);
246  if (button == MB_left) io.MouseDown[0] = true;
247  if (button == MB_right) io.MouseDown[1] = true;
248  if (button == MB_middle) io.MouseDown[2] = true;
249  // SL_LOG("D");
250 }
@ MB_left
Definition: SLEnums.h:100
@ MB_right
Definition: SLEnums.h:102
@ MB_middle
Definition: SLEnums.h:101

◆ onMouseMove()

void SLImGui::onMouseMove ( SLint  xPos,
SLint  yPos 
)
overridevirtual

Updates the mouse cursor position.

Reimplemented from SLUiInterface.

Definition at line 264 of file SLImGui.cpp.

265 {
266  ImGui::GetIO().MousePos = ImVec2((SLfloat)xPos, (SLfloat)yPos);
267  // SL_LOG("M");
268 }

◆ onMouseUp()

void SLImGui::onMouseUp ( SLMouseButton  button,
SLint  x,
SLint  y 
)
overridevirtual

Callback on mouse button up event.

Reimplemented from SLUiInterface.

Definition at line 253 of file SLImGui.cpp.

254 {
255  ImGuiIO& io = ImGui::GetIO();
256  io.MousePos = ImVec2((SLfloat)x, (SLfloat)y);
257  if (button == MB_left) io.MouseDown[0] = false;
258  if (button == MB_right) io.MouseDown[1] = false;
259  if (button == MB_middle) io.MouseDown[2] = false;
260  // SL_LOG("U\n");
261 }

◆ onMouseWheel()

void SLImGui::onMouseWheel ( SLfloat  yoffset)
overridevirtual

Callback for the mouse scroll movement.

Reimplemented from SLUiInterface.

Definition at line 271 of file SLImGui.cpp.

272 {
273  // Use fractional mouse wheel, 1.0 unit 5 lines.
274  _mouseWheel += yoffset;
275 }

◆ onPaint()

void SLImGui::onPaint ( const SLRecti viewport)
overridevirtual

Callback for main rendering for the ImGui GUI system.

Reimplemented from SLUiInterface.

Definition at line 234 of file SLImGui.cpp.

235 {
236  ImGuiIO& io = ImGui::GetIO();
237  ImGui::Render();
238  ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
239 }

◆ onResize()

void SLImGui::onResize ( const SLRecti viewport)
overridevirtual

Callback if window got resized.

Reimplemented from SLUiInterface.

Definition at line 225 of file SLImGui.cpp.

226 {
227  SLGLState* stateGL = SLGLState::instance();
228  ImGuiIO& io = ImGui::GetIO();
229  io.DisplaySize = ImVec2((SLfloat)viewport.width, (SLfloat)viewport.height);
230  io.DisplayFramebufferScale = ImVec2(1, 1);
231 }
Singleton class holding all OpenGL states.
Definition: SLGLState.h:71
static SLGLState * instance()
Public static instance getter for singleton pattern.
Definition: SLGLState.h:74
T width
Definition: SLRect.h:29
T height
Definition: SLRect.h:29

◆ printCompileErrors()

void SLImGui::printCompileErrors ( SLint  shaderHandle,
const SLchar src 
)
private

Prints the compile errors in case of a GLSL compile failure.

Definition at line 178 of file SLImGui.cpp.

179 {
180 }

◆ renderExtraFrame()

void SLImGui::renderExtraFrame ( SLScene s,
SLSceneView sv,
SLint  mouseX,
SLint  mouseY 
)
overridevirtual

Renders an extra frame with the current mouse position.

Reimplemented from SLUiInterface.

Definition at line 306 of file SLImGui.cpp.

310 {
311  // If ImGui _build function exists render the ImGui
312  if (_build)
313  {
314  ImGui::GetIO().MousePos = ImVec2((SLfloat)mouseX, (SLfloat)mouseY);
315  onInitNewFrame(s, sv);
316  onPaint(sv->viewportRect());
317  }
318 }
static SLint mouseX
Last mouse position x in pixels.
static SLint mouseY
Last mouse position y in pixels.
void onPaint(const SLRecti &viewport) override
Callback for main rendering for the ImGui GUI system.
Definition: SLImGui.cpp:234
void onInitNewFrame(SLScene *s, SLSceneView *sv) override
Inits a new frame for the ImGui system.
Definition: SLImGui.cpp:183
SLRecti viewportRect() const
Definition: SLSceneView.h:176

Member Data Documentation

◆ _build

cbOnImGuiBuild SLImGui::_build = nullptr
private

Definition at line 101 of file SLImGui.h.

◆ _configPath

SLstring SLImGui::_configPath
private

Path to config files.

Definition at line 112 of file SLImGui.h.

◆ _fontDataFixed

SLIOBuffer SLImGui::_fontDataFixed
private

Raw data of fixed size font file.

Definition at line 114 of file SLImGui.h.

◆ _fontDataProp

SLIOBuffer SLImGui::_fontDataProp
private

Raw data of proportional font file.

Definition at line 113 of file SLImGui.h.

◆ _fontFixedDots

SLfloat SLImGui::_fontFixedDots
private

Active font size of fixed size font.

Definition at line 111 of file SLImGui.h.

◆ _fontPropDots

SLfloat SLImGui::_fontPropDots
private

Active font size of proportional font.

Definition at line 110 of file SLImGui.h.

◆ _mousePosPX

SLVec2f SLImGui::_mousePosPX
private

Mouse cursor position.

Definition at line 107 of file SLImGui.h.

◆ _mousePressed

SLbool SLImGui::_mousePressed[3]
private

Mouse button press state.

Definition at line 109 of file SLImGui.h.

◆ _mouseWheel

SLfloat SLImGui::_mouseWheel
private

Mouse wheel position.

Definition at line 108 of file SLImGui.h.

◆ _saveConfig

cbOnImGuiSaveConfig SLImGui::_saveConfig = nullptr
private

Definition at line 104 of file SLImGui.h.

◆ _timeSec

SLfloat SLImGui::_timeSec
private

Time in seconds.

Definition at line 106 of file SLImGui.h.

◆ fontFixedDots

SLfloat SLImGui::fontFixedDots = 13.0f
static

Default font size of fixed size font.

Definition at line 92 of file SLImGui.h.

◆ fontPropDots

SLfloat SLImGui::fontPropDots = 16.0f
static

Default font size of proportional font.

Definition at line 91 of file SLImGui.h.


The documentation for this class was generated from the following files: