MCPcopy Create free account
hub / github.com/ddnet/ddnet / OnRender

Method OnRender

src/game/editor/editor.cpp:7368–7411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7366}
7367
7368void CEditor::OnRender()
7369{
7370 Ui()->SetMouseSlow(false);
7371
7372 // toggle gui
7373 if(m_Dialog == DIALOG_NONE && CLineInput::GetActiveInput() == nullptr && Input()->KeyPress(KEY_TAB))
7374 m_GuiActive = !m_GuiActive;
7375
7376 if(Input()->KeyPress(KEY_F10))
7377 m_ShowMousePointer = false;
7378
7379 if(m_Animate)
7380 m_AnimateTime = (time_get() - m_AnimateStart) / (float)time_freq();
7381 else
7382 m_AnimateTime = 0;
7383
7384 m_pUiGotContext = nullptr;
7385 Ui()->StartCheck();
7386
7387 Ui()->Update(m_MouseWorldPos);
7388
7389 Render();
7390
7391 m_MouseDeltaWorld = vec2(0.0f, 0.0f);
7392
7393 if(Input()->KeyPress(KEY_F10))
7394 {
7395 Graphics()->TakeScreenshot(nullptr);
7396 m_ShowMousePointer = true;
7397 }
7398
7399 if(g_Config.m_Debug)
7400 Ui()->DebugRender(2.0f, Ui()->Screen()->h - 27.0f);
7401
7402 Ui()->FinishCheck();
7403 Ui()->ClearHotkeys();
7404 Input()->Clear();
7405
7406 CLineInput::RenderCandidates();
7407
7408#if defined(CONF_DEBUG)
7409 Map()->CheckIntegrity();
7410#endif
7411}
7412
7413void CEditor::OnActivate()
7414{

Callers 3

DoMapEditorMethod · 0.45
RenderMethod · 0.45
RenderMethod · 0.45

Calls 15

UiFunction · 0.85
InputFunction · 0.85
time_getFunction · 0.85
time_freqFunction · 0.85
GraphicsFunction · 0.85
MapFunction · 0.85
SetMouseSlowMethod · 0.80
KeyPressMethod · 0.80
StartCheckMethod · 0.80
TakeScreenshotMethod · 0.80
DebugRenderMethod · 0.80
ScreenMethod · 0.80

Tested by

no test coverage detected