MCPcopy Create free account
hub / github.com/defold/defold / UpdateGuiSafeAreaAdjust

Function UpdateGuiSafeAreaAdjust

engine/engine/src/engine.cpp:202–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201
202 static void UpdateGuiSafeAreaAdjust(Engine* engine, uint32_t window_width, uint32_t window_height)
203 {
204 HWindow window = dmGraphics::GetWindow(engine->m_GraphicsContext);
205 WindowSafeArea safe_area;
206 if (!dmPlatform::GetSafeArea(window, &safe_area))
207 {
208 safe_area.m_InsetLeft = 0;
209 safe_area.m_InsetTop = 0;
210 safe_area.m_InsetRight = 0;
211 safe_area.m_InsetBottom = 0;
212 }
213
214 dmGui::UpdateSafeAreaAdjust(engine->m_GuiContext, (dmGui::SafeAreaMode)engine->m_GuiSafeAreaMode,
215 window_width, window_height,
216 safe_area.m_InsetLeft, safe_area.m_InsetTop,
217 safe_area.m_InsetRight, safe_area.m_InsetBottom);
218 }
219
220 static void OnWindowResize(void* user_data, uint32_t width, uint32_t height)
221 {

Callers 2

OnWindowResizeFunction · 0.85
engine.cppFile · 0.85

Calls 3

GetWindowFunction · 0.85
GetSafeAreaFunction · 0.50
UpdateSafeAreaAdjustFunction · 0.50

Tested by

no test coverage detected