History

Expose triggerOption to scripts, plus _physicsEnabled

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!

David Kelly committed 10 years ago

Commit 621e3fc1 parent b69a49d5 files · +14 −1Browse files

Showing the changes to interface/src/scripting/MenuScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

interface/src/scripting/MenuScriptingInterface.cpp+5−0
@@ -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
129void MenuScriptingInterface::triggerOption(const QString& menuOption) {
130 QMetaObject::invokeMethod(Menu::getInstance(), "triggerOption", Q_ARG(const QString&, menuOption));
131}
132