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

Method check

source/windowing/StarButtonWidget.cpp:265–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void ButtonWidget::check() {
266 if (m_checkable) {
267 // If we are part of an exclusive button group, then don't uncheck if
268 // we are already checked and pressed again.
269 if (m_buttonGroup) {
270 if (m_buttonGroup->toggle() || !isChecked()) {
271 setChecked(!m_buttonGroup->toggle() || !isChecked());
272 m_buttonGroup->wasChecked(this);
273 }
274 } else {
275 setChecked(!isChecked());
276 }
277 }
278}
279
280bool ButtonWidget::sustainCallbackOnDownHold() {
281 return m_sustain;

Callers 2

selectMethod · 0.45
radioGroupHandlerMethod · 0.45

Calls 2

toggleMethod · 0.80
wasCheckedMethod · 0.80

Tested by

no test coverage detected