MCPcopy Create free account
hub / github.com/TheWaveWarden/odin2 / paintButton

Method paintButton

Source/gui/LeftRightButton.cpp:39–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void LeftRightButton::paintButton(Graphics &g, bool p_highlight, bool /*p_pressed*/) {
40 auto asset = int(m_asset);
41 if (getToggleState())
42 asset += 2;
43 if (p_highlight)
44 asset += 1;
45
46 g.drawImageAt(UIAssetManager::getInstance()->getUIAsset(UIAssets::Indices(asset), ConfigFileManager::getInstance().getOptionGuiScale()), 0, 0);
47}
48
49void LeftRightButton::mouseDown(const MouseEvent &p_event) {
50 juce::Point<int> mouse_position = getMouseXYRelative();

Callers

nothing calls this directly

Calls 3

IndicesEnum · 0.85
getUIAssetMethod · 0.80
getOptionGuiScaleMethod · 0.80

Tested by

no test coverage detected