MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setPressed

Method setPressed

source/windowing/StarButtonWidget.cpp:225–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void ButtonWidget::setPressed(bool pressed) {
226 if (m_pressed != pressed) {
227 // Button action is triggered when the button is released after being pressed
228 if (m_pressed) {
229 check();
230 if (m_callback) {
231 auto unlocker = Input::singleton().unlockClipboard();
232 m_callback(this);
233 }
234 }
235 m_pressed = pressed;
236 }
237}
238
239bool ButtonWidget::isCheckable() const {
240 return m_checkable;

Callers

nothing calls this directly

Calls 3

checkFunction · 0.85
singletonClass · 0.85
unlockClipboardMethod · 0.80

Tested by

no test coverage detected