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

Method checkProperty

MyGUIEngine/src/MyGUI_BackwardCompatibility.cpp:1095–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093 }
1094
1095 bool BackwardCompatibility::checkProperty(Widget* _owner, std::string& _key, std::string& _value)
1096 {
1097#ifndef MYGUI_DONT_USE_OBSOLETE
1098 if (mPropertyIgnore.find(_key) != mPropertyIgnore.end())
1099 return false;
1100
1101 MapString::iterator item = mPropertyRename.find(_key);
1102 if (item != mPropertyRename.end())
1103 {
1104 MYGUI_LOG(
1105 Warning,
1106 (*item).first << " is deprecated, use " << (*item).second << " ["
1107 << LayoutManager::getInstance().getCurrentLayout() << "]");
1108 _key = (*item).second;
1109 }
1110 else if (_key == "Progress_StartPoint")
1111 {
1112 MYGUI_LOG(
1113 Warning,
1114 "Progress_StartPoint is deprecated, use Progress_FlowDirection"
1115 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1116 _key = "Progress_FlowDirection";
1117 _value = convertAlignToDirection(_value);
1118 }
1119 else if (_key == "ComboBox_AddItem")
1120 {
1121 MYGUI_LOG(
1122 Warning,
1123 "ComboBox_AddItem is deprecated"
1124 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1125 ComboBox* widget = _owner->castType<ComboBox>(false);
1126 if (widget != nullptr)
1127 widget->addItem(_value);
1128 return false;
1129 }
1130 else if (_key == "List_AddItem")
1131 {
1132 MYGUI_LOG(
1133 Warning,
1134 "List_AddItem is deprecated"
1135 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1136 ListBox* widget = _owner->castType<ListBox>(false);
1137 if (widget != nullptr)
1138 widget->addItem(_value);
1139 return false;
1140 }
1141 else if (_key == "Tab_AddSheet")
1142 {
1143 MYGUI_LOG(
1144 Warning,
1145 "Tab_AddSheet is deprecated"
1146 << " [" << LayoutManager::getInstance().getCurrentLayout() << "]");
1147 TabControl* widget = _owner->castType<TabControl>(false);
1148 if (widget != nullptr)
1149 widget->addItem(_value);
1150 return false;
1151 }
1152 else if (_key == "Tab_AddItem")

Callers

nothing calls this directly

Calls 8

convertAlignToDirectionFunction · 0.85
convertRectToCoordFunction · 0.85
setMinSizeMethod · 0.80
setMaxSizeMethod · 0.80
parseFunction · 0.50
findMethod · 0.45
endMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected