MCPcopy Create free account
hub / github.com/axmolengine/axmol / onPressStateChangedToNormal

Method onPressStateChangedToNormal

core/ui/UIAbstractCheckButton.cpp:308–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308void AbstractCheckButton::onPressStateChangedToNormal()
309{
310 _backGroundBoxRenderer->setVisible(true);
311 _backGroundSelectedBoxRenderer->setVisible(false);
312 _backGroundBoxDisabledRenderer->setVisible(false);
313 _frontCrossDisabledRenderer->setVisible(false);
314
315 _backGroundBoxRenderer->setProgramState(backend::ProgramType::POSITION_TEXTURE_COLOR);
316 _frontCrossRenderer->setProgramState(backend::ProgramType::POSITION_TEXTURE_COLOR);
317
318 _backGroundBoxRenderer->setScale(_backgroundTextureScaleX, _backgroundTextureScaleY);
319 _frontCrossRenderer->setScale(_backgroundTextureScaleX, _backgroundTextureScaleY);
320
321 if (_isSelected)
322 {
323 _frontCrossRenderer->setVisible(true);
324 _frontCrossRendererAdaptDirty = true;
325 }
326}
327
328void AbstractCheckButton::onPressStateChangedToPressed()
329{

Callers

nothing calls this directly

Calls 3

setVisibleMethod · 0.45
setProgramStateMethod · 0.45
setScaleMethod · 0.45

Tested by

no test coverage detected