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

Method render

source/src/menus.cpp:652–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650 virtual int width() { return text_width(text)+text_width(keyname ? keyname : " "); }
651
652 virtual void render(int x, int y, int w)
653 {
654 int tw = text_width(keyname ? keyname : " "), c = greyedout ? 128 : 255;
655 static color capturec(0.4f, 0, 0);
656 if(isselection())
657 {
658 blendbox(x+w-tw-FONTH, y-FONTH/6, x+w+FONTH, y+FONTH+FONTH/6, false, -1, capture ? &capturec : NULL);
659 blendbox(x, y-FONTH/6, x+w-tw-FONTH, y+FONTH+FONTH/6, false, -1, menuseldescbgcolor);
660 }
661 draw_text(text, x, y, c, c, c);
662 draw_text(keyname, x+w-tw, y, c, c, c);
663 }
664
665 virtual void init()
666 {

Callers

nothing calls this directly

Calls 3

text_widthFunction · 0.85
blendboxFunction · 0.85
draw_textFunction · 0.85

Tested by

no test coverage detected