MCPcopy Create free account
hub / github.com/MyGUI/mygui / _showItem

Method _showItem

MyGUIEngine/src/MyGUI_TabControl.cpp:389–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 }
388
389 void TabControl::_showItem(TabItem* _item, bool _show, bool _smooth)
390 {
391 if (!_smooth)
392 {
393 ControllerManager::getInstance().removeItem(_item);
394 _item->setAlpha(ALPHA_MAX);
395
396 _item->setVisible(_show);
397
398 return;
399 }
400
401 if (_show)
402 {
403 // enable _item in case actionWidgetHide was skipped due to rapid click
404 _item->setEnabled(true);
405 ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MAX, TAB_SPEED_FADE_COEF, true);
406 ControllerManager::getInstance().addItem(_item, controller);
407 }
408 else
409 {
410 ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, TAB_SPEED_FADE_COEF, false);
411 controller->eventPostAction += newDelegate(this, &TabControl::actionWidgetHide);
412 ControllerManager::getInstance().addItem(_item, controller);
413 }
414 }
415
416 Button* TabControl::createButton()
417 {

Callers

nothing calls this directly

Calls 6

newDelegateFunction · 0.85
removeItemMethod · 0.45
setAlphaMethod · 0.45
setVisibleMethod · 0.45
setEnabledMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected