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

Method notifyChangeWidth

Tools/LayoutEditor/PanelItems.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void PanelItems::notifyChangeWidth(int _width)
47 {
48 int width = mMainWidget->getClientCoord().width;
49
50 int half_width = (width - (mButtonLeft + mButtonRight + mButtonSpace)) / 2;
51 mButtonAdd->setSize(half_width, mButtonAdd->getHeight());
52 mButtonDelete->setCoord(
53 mButtonAdd->getRight() + mButtonSpace,
54 mButtonDelete->getTop(),
55 width - (mButtonAdd->getRight() + mButtonSpace + mButtonRight),
56 mButtonDelete->getHeight());
57 }
58
59 void PanelItems::update(MyGUI::Widget* _currentWidget)
60 {

Callers

nothing calls this directly

Calls 5

getClientCoordMethod · 0.80
getTopMethod · 0.80
setSizeMethod · 0.45
getHeightMethod · 0.45
setCoordMethod · 0.45

Tested by

no test coverage detected