MCPcopy Create free account
hub / github.com/assaultcube/AC / rendercommand

Function rendercommand

source/src/console.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131int rendercommand(int x, int y, int w)
132{
133 const char *useprompt = cmdprompt ? cmdprompt : "#";
134 defformatstring(s)("%s %s", useprompt, cmdline.buf);
135 int width, height;
136 text_bounds(s, width, height, w);
137 y -= height - FONTH;
138 if (x >= 0) draw_text(s, x, y, 0xFF, 0xFF, 0xFF, 0xFF, cmdline.pos>=0 ? cmdline.pos + strlen(useprompt) + 1 : (int)strlen(s), w);
139 return height;
140}
141
142// keymap is defined externally in keymap.cfg
143

Callers 1

gl_drawhudFunction · 0.85

Calls 2

text_boundsFunction · 0.85
draw_textFunction · 0.85

Tested by

no test coverage detected