Skip to content

Instantly share code, notes, and snippets.

@arctic5
Created October 6, 2013 21:11
Show Gist options
  • Save arctic5/6859166 to your computer and use it in GitHub Desktop.
Save arctic5/6859166 to your computer and use it in GitHub Desktop.
//make a new menu for plugin options
if !variable_global_exists("pluginOptions") {
global.pluginOptions = object_add();
object_set_parent(global.pluginOptions,OptionsController);
object_set_depth(global.pluginOptions,-130000);
object_event_add(global.pluginOptions,ev_create,0,'
menu_create(40, 140, 300, 200, 30);
if room != Options {
menu_setdimmed();
}
menu_addback("Back", "
instance_destroy();
if(room == Options)
instance_create(0,0,MainMenuController);
else
instance_create(0,0,InGameMenuController);
");
');
object_event_add(InGameMenuController,ev_create,0,'
menu_addlink("Plugin Options", "
instance_destroy();
instance_create(0,0,global.pluginOptions);
");
');
}
object_event_add(global.pluginOptions,ev_create,0,'
_reload = "Reload Plugins"
menu_addlink(_reload, "
loadplugins();
");
');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment