Now any menu item can be triggered. Plus you can do a Window.isPhysicsEnabled to detect when we are done loading assets and such. Whee!
Showing the changes to interface/src/scripting/MenuScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -125,3 +125,8 @@ void MenuScriptingInterface::setIsOptionChecked(const QString& menuOption, bool · 124 unmodified lines | |||
| 125 | Q_ARG(const QString&, menuOption), | 125 | Q_ARG(const QString&, menuOption), |
| 126 | Q_ARG(bool, isChecked)); | 126 | Q_ARG(bool, isChecked)); |
| 127 | } | 127 | } |
| 128 | |||
| 129 | void MenuScriptingInterface::triggerOption(const QString& menuOption) { | ||
| 130 | QMetaObject::invokeMethod(Menu::getInstance(), "triggerOption", Q_ARG(const QString&, menuOption)); | ||
| 131 | } | ||
| 132 | |||