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

Method loadDefaultSize

Tools/EditorFramework/SeparatePanel.cpp:283–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281 }
282
283 void SeparatePanel::loadDefaultSize()
284 {
285 if (!mSaveAs.empty())
286 mDefaultPanelSize =
287 SettingsManager::getInstance().getValue<MyGUI::IntSize>("Controls/SeparateControl/" + mSaveAs);
288
289 if (mDefaultPanelSize.empty())
290 {
291 if (mMainWidget->isUserString("DefaultSize"))
292 {
293 int size = MyGUI::utility::parseValue<int>(mMainWidget->getUserString("DefaultSize"));
294 mDefaultPanelSize = MyGUI::IntSize(size, size);
295 }
296 else
297 {
298 mDefaultPanelSize = MyGUI::IntSize(
299 (mMainWidget->getWidth() - mSeparatorH->getWidth()) / 2,
300 (mMainWidget->getHeight() - mSeparatorV->getHeight()) / 2);
301 }
302 }
303 }
304
305 void SeparatePanel::saveDefaultSize()
306 {

Callers

nothing calls this directly

Calls 6

isUserStringMethod · 0.80
getUserStringMethod · 0.80
IntSizeFunction · 0.50
emptyMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected