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

Method setPropertyOverride

MyGUIEngine/src/MyGUI_Widget.cpp:1218–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216 }
1217
1218 void Widget::setPropertyOverride(std::string_view _key, std::string_view _value)
1219 {
1220 /// @wproperty{Widget, Position, IntPoint} Set widget position.
1221 if (_key == "Position")
1222 setPosition(utility::parseValue<IntPoint>(_value));
1223
1224 /// @wproperty{Widget, Size, IntSize} Set widget size.
1225 else if (_key == "Size")
1226 setSize(utility::parseValue<IntSize>(_value));
1227
1228 /// @wproperty{Widget, Coord, IntCoord} Set widget coordinates (position and size).
1229 else if (_key == "Coord")
1230 setCoord(utility::parseValue<IntCoord>(_value));
1231
1232 /// @wproperty{Widget, Visible, bool} Show or hide widget.
1233 else if (_key == "Visible")
1234 setVisible(utility::parseValue<bool>(_value));
1235
1236 /// @wproperty{Widget, Depth, int} Child widget rendering depth.
1237 else if (_key == "Depth")
1238 setDepth(utility::parseValue<int>(_value));
1239
1240 /// @wproperty{Widget, Alpha, float} Прозрачность виджета от 0 до 1.
1241 else if (_key == "Alpha")
1242 setAlpha(utility::parseValue<float>(_value));
1243
1244 /// @wproperty{Widget, Colour, Colour} Цвет виджета.
1245 else if (_key == "Colour")
1246 setColour(utility::parseValue<Colour>(_value));
1247
1248 /// @wproperty{Widget, InheritsAlpha, bool} Режим наследования прозрачности.
1249 else if (_key == "InheritsAlpha")
1250 setInheritsAlpha(utility::parseValue<bool>(_value));
1251
1252 /// @wproperty{Widget, InheritsPick, bool} Режим наследования доступности мышью.
1253 else if (_key == "InheritsPick")
1254 setInheritsPick(utility::parseValue<bool>(_value));
1255
1256 /// @wproperty{Widget, MaskPick, string} Имя файла текстуры по которому генерится маска для доступности мышью.
1257 else if (_key == "MaskPick")
1258 setMaskPick(std::string{_value});
1259
1260 /// @wproperty{Widget, NeedKey, bool} Режим доступности виджета для ввода с клавиатуры.
1261 else if (_key == "NeedKey")
1262 setNeedKeyFocus(utility::parseValue<bool>(_value));
1263
1264 /// @wproperty{Widget, NeedMouse, bool} Режим доступности виджета для ввода мышью.
1265 else if (_key == "NeedMouse")
1266 setNeedMouseFocus(utility::parseValue<bool>(_value));
1267
1268 /// @wproperty{Widget, Enabled, bool} Режим доступности виджета.
1269 else if (_key == "Enabled")
1270 setEnabled(utility::parseValue<bool>(_value));
1271
1272 /// @wproperty{Widget, NeedToolTip, bool} Режим поддержки тултипов.
1273 else if (_key == "NeedToolTip")
1274 setNeedToolTip(utility::parseValue<bool>(_value));
1275

Callers

nothing calls this directly

Calls 6

setPositionFunction · 0.85
setSizeFunction · 0.85
setCoordFunction · 0.85
setVisibleFunction · 0.85
setAlphaFunction · 0.85
getTypeNameFunction · 0.85

Tested by

no test coverage detected