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

Method RenderPressedKeys

src/game/editor/editor.cpp:6619–6640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6617}
6618
6619void CEditor::RenderPressedKeys(CUIRect View)
6620{
6621 if(!g_Config.m_EdShowkeys)
6622 return;
6623
6624 Ui()->MapScreen();
6625 CTextCursor Cursor;
6626 Cursor.SetPosition(vec2(View.x + 10, View.y + View.h - 24 - 10));
6627 Cursor.m_FontSize = 24.0f;
6628
6629 int NKeys = 0;
6630 for(int i = 0; i < KEY_LAST; i++)
6631 {
6632 if(Input()->KeyIsPressed(i))
6633 {
6634 if(NKeys)
6635 TextRender()->TextEx(&Cursor, " + ", -1);
6636 TextRender()->TextEx(&Cursor, Input()->KeyName(i), -1);
6637 NKeys++;
6638 }
6639 }
6640}
6641
6642void CEditor::RenderSavingIndicator(CUIRect View)
6643{

Callers

nothing calls this directly

Calls 8

UiFunction · 0.85
InputFunction · 0.85
TextRenderFunction · 0.85
KeyIsPressedMethod · 0.80
TextExMethod · 0.80
KeyNameMethod · 0.80
MapScreenMethod · 0.45
SetPositionMethod · 0.45

Tested by

no test coverage detected