MCPcopy Create free account
hub / github.com/Prograda/Skybolt / drawHSlider

Function drawHSlider

src/SkyboltExamples/ExamplesCommon/HudSystem.cpp:113–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113static void drawHSlider(VisHud& hud, const glm::vec2& position, float width, const float& controlValue)
114{
115 float halfWidth = width * 0.5;
116 hud.drawLine(position - glm::vec2(halfWidth, 0), position + glm::vec2(halfWidth, 0));
117
118 double x = width * controlValue - halfWidth;
119 hud.drawLine(position + glm::vec2(x, -controlTickSize * 0.5), position + glm::vec2(x, controlTickSize * 0.5));
120}
121
122static void drawVSlider(VisHud& hud, const glm::vec2& position, float height, const float& controlValue)
123{

Callers 1

drawControlInputsFunction · 0.85

Calls 1

drawLineMethod · 0.80

Tested by

no test coverage detected