diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/resources/skins/Winamp Modern/scripts/mainmenu.m | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/resources/skins/Winamp Modern/scripts/mainmenu.m')
-rw-r--r-- | Src/resources/skins/Winamp Modern/scripts/mainmenu.m | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Src/resources/skins/Winamp Modern/scripts/mainmenu.m b/Src/resources/skins/Winamp Modern/scripts/mainmenu.m new file mode 100644 index 00000000..73efe5be --- /dev/null +++ b/Src/resources/skins/Winamp Modern/scripts/mainmenu.m @@ -0,0 +1,50 @@ +#include <lib/std.mi> +#include "attribs.m" + +System.onScriptLoaded() { + initAttribs(); + menubar_main_attrib.onDataChanged(); +} + +menubar_main_attrib.onDataChanged() { + Group Player = getscriptgroup().findobject("player.content.dummy.group"); + Group MenuBar = getscriptgroup().findobject("wasabi.menubar"); + if (getData() == "1") { + Player.setXmlParam("y","0"); + MenuBar.show(); + } else { + Player.setXmlParam("y","-17"); + MenuBar.hide(); + } +} + +System.onAccelerator(String action, String section, String key) { + if (menubar_main_attrib.getData() == "0") return; + Layout l = getScriptGroup().getParentLayout(); + if (!l.isActive()) return; + if (action == "MENUHOTKEY_FILE") + { + getScriptGroup().findObject("File.menu").sendAction("open", "", 0, 0, 0, 0); + complete; + } + if (action == "MENUHOTKEY_PLAY") + { + getScriptGroup().findObject("Play.menu").sendAction("open", "", 0, 0, 0, 0); + complete; + } + if (action == "MENUHOTKEY_OPTIONS") + { + getScriptGroup().findObject("Options.menu").sendAction("open", "", 0, 0, 0, 0); + complete; + } + if (action == "MENUHOTKEY_VIEW") + { + getScriptGroup().findObject("View.menu").sendAction("open", "", 0, 0, 0, 0); + complete; + } + if (action == "MENUHOTKEY_HELP") + { + getScriptGroup().findObject("Help.menu").sendAction("open", "", 0, 0, 0, 0); + complete; + } +}
\ No newline at end of file |