diff options
| author | Jan <> | 2015-08-01 23:03:54 +0200 |
|---|---|---|
| committer | Jan <_> | 2015-08-01 23:03:54 +0200 |
| commit | 954de7a151d426fbdbcf0662d4f22defa3edd022 (patch) | |
| tree | ef47905200a19ce0dca8f3a866dc0bc956d5681b /TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c | |
| parent | 134bef2a29edb3f5a9fc78e69afaf4d13a48d133 (diff) | |
| download | tempelschubsen-954de7a151d426fbdbcf0662d4f22defa3edd022.tar.gz tempelschubsen-954de7a151d426fbdbcf0662d4f22defa3edd022.zip | |
Add "random" option in setup menu for section and mode
Diffstat (limited to 'TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c')
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c index ab65c34..06459ed 100644 --- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c @@ -50,6 +50,8 @@ private func ShowSectionMenu() clonk->AddMenuItem(GetName(0, Sections[i]), Format("SelectSection(%i)", Sections[i]), Sections[i]); CheckPreselect(Sections[i] == section, i); } + + clonk->AddMenuItem("$Random$", Format("SelectSection(%i)", Sections[Random(GetLength(Sections))]), ROCK); } private func SelectSection(id selectedSection) @@ -71,6 +73,7 @@ private func ShowModeMenu() CheckPreselect(m[0] == mode, menuItemIndex++); } + clonk->AddMenuItem("$Random$", Format("SelectMode(%d)", Modes[Random(GetLength(Modes))][0]), ROCK); clonk->AddMenuItem("$Back$", "ShowSectionMenu()", SBCK); } |
