MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / render

Method render

src/components/GuiFastSelect.cpp:35–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void GuiFastSelect::render(const Eigen::Affine3f& parentTrans)
36{
37 Eigen::Affine3f trans = parentTrans * getTransform();
38 Renderer::setMatrix(trans);
39
40 unsigned int sw = Renderer::getScreenWidth(), sh = Renderer::getScreenHeight();
41
42 if(!mBox->hasBackground())
43 Renderer::drawRect((int)(sw * 0.3f), (int)(sh * 0.3f), (int)(sw * 0.4f), (int)(sh * 0.4f), 0x000FF0AA);
44
45 mBox->render(trans);
46
47 Renderer::setMatrix(trans);
48 std::shared_ptr<Font> letterFont = mTheme->getFastSelectFont();
49 std::shared_ptr<Font> subtextFont = mTheme->getDescriptionFont();
50
51 letterFont->drawCenteredText(LETTERS.substr(mLetterID, 1), 0, sh * 0.5f - (letterFont->getHeight() * 0.5f), mTextColor);
52 subtextFont->drawCenteredText("Sort order:", 0, sh * 0.6f - (subtextFont->getHeight() * 0.5f), mTextColor);
53
54 std::string sortString = "<- " + mParent->getSortState().description + " ->";
55 subtextFont->drawCenteredText(sortString, 0, sh * 0.6f + (subtextFont->getHeight() * 0.5f), mTextColor);
56}
57
58bool GuiFastSelect::input(InputConfig* config, Input input)
59{

Callers

nothing calls this directly

Calls 9

setMatrixFunction · 0.85
drawRectFunction · 0.85
hasBackgroundMethod · 0.80
getFastSelectFontMethod · 0.80
getDescriptionFontMethod · 0.80
drawCenteredTextMethod · 0.80
getHeightMethod · 0.80
getScreenWidthFunction · 0.50
getScreenHeightFunction · 0.50

Tested by

no test coverage detected