menus.cfg 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. // standard menu definitions
  2. //// Main ////
  3. newmenu main
  4. menuitem Multiplayer [ showmenu multiplayer ]
  5. menuitem Singleplayer [ showmenu singleplayer ]
  6. menuitem Settings [ showmenu Settings ]
  7. menuitem Demo [ showmenu [Play demo] ]
  8. menuitem Editing [ showmenu editing ]
  9. menuitem Help [ showmenu help ]
  10. menuitem About [ showmenu about ]
  11. menuitem Quit savequit
  12. // Add maps to the below list to include them in the normal map menu (also for botmaps).
  13. const __defaultmaps [ac_aqueous ac_arabian ac_arctic ac_arid ac_avenue ac_cavern ac_complex ac_depot ac_desert ac_desert2 ac_desert3 ac_douze ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_rattrap ac_scaffold ac_shine ac_snow ac_stellar ac_sunset ac_swamp ac_terros ac_toxic ac_urban ac_venison ac_wasteland ac_werk]
  14. // Add maps to the below list to include them in the CTF, KTF & TKTF map menu. Maps should contain flags here.
  15. const __ctfmaps [ac_aqueous ac_arabian ac_arid ac_avenue ac_cavern ac_depot ac_desert3 ac_edifice ac_elevation ac_gothic ac_iceroad ac_industrial ac_ingress ac_keller ac_lainio ac_mines ac_outpost ac_power ac_shine ac_stellar ac_sunset ac_swamp ac_terros ac_urban ac_venison ac_werk]
  16. // Start maps.
  17. const __genmapitems [
  18. looplisti $arg1 m [
  19. menuitemmapload $m [map @m]
  20. [nextmap_@m] = (at $arg1 (mod (+ $i 1) @(listlen $arg1)))
  21. ]
  22. ]
  23. newmenu [all maps]
  24. menudirlist "packages/maps" cgz [map $arg1]
  25. newmenu maps
  26. __genmapitems $__defaultmaps
  27. menuitem [] -1
  28. menuitem "Show all maps\i\3" [ showmenu [all maps] ]
  29. newmenu maps_flags
  30. __genmapitems $__ctfmaps
  31. menuitem [] -1
  32. menuitem "Show all maps\i\3" [showmenu [all maps]]
  33. //// Main > Play demo ////
  34. newmenu [Play demo]
  35. menudirlist demos dmo "demo $arg1"
  36. //// Watching demo //// (in-game menu that opens when pressing escape while watching a demo)
  37. newmenu [Watching demo]
  38. menuitem "Stop watching demo" stopdemo
  39. menuitem "Restart demo" [ demo $curdemofile ]
  40. menuitem "Rewind demo\i\3" [ showmenu rewind ]
  41. menuitemtextinput "Custom description: " [ getalias (concatword "demodesc_" $curdemofile) ] [ alias (concatword "demodesc_" $curdemofile) $arg1 ] [] 100
  42. menuitem "" -1
  43. menuitem "Watch other demo" [ stopdemo; closecurmenu; showmenu [Play demo] ]
  44. menuitem "Search demo\i\3" [ showmenu [search demo] ]
  45. menuitem "" -1
  46. menuitem "\f4Main menu\i\3" [ closecurmenu; showmenu main ]
  47. menuitem "\f3Quit AssaultCube" savequit
  48. //// Watching demo > rewind ////
  49. newmenu rewind
  50. tempalias __setmr "" ; tempalias __rewind ""
  51. menuitemtextinput "Go to [min]: " [ result $__setmr ] [ __setmr = $arg1 ]
  52. menuitem "\f2Confirm" [ setmr $__setmr ]
  53. menuitem "" -1
  54. menuitemtextinput "Rewind (negative value to forward) [s]: " [ result $__rewind ] [ __rewind = $arg1 ]
  55. menuitem "\f2Confirm" [ rewind $__rewind ]
  56. menuitem "" -1
  57. menuitem "Cancel" 0
  58. //// Watching demo > search demo ////
  59. newmenu [search demo]
  60. alias __searchdemo ""
  61. menuitemtextinput "Part of demo name or description: " "result $__searchdemo" [ __searchdemo = $arg1 ]
  62. menuitem "\f2\t\t [ Search demo ]" [ showmenu [search specific demo] ]
  63. //// Watching demo > search demo > search specific demo ////
  64. newmenu [search specific demo]
  65. menudirlist demos dmo "demo $arg1" 0 __searchdemo
  66. //// Main > Help ////
  67. newmenu help
  68. menuitem "AssaultCube reference" [ showmenu reference ]
  69. menuitem "Search the reference" [ showmenu [Reference search] ]
  70. menuitem "Keyboard controls" [ showmenu Keyboard ]
  71. menuitem "View the FAQ\t\t\t\t\t\t" [ load_faq ; showmenu faq ]
  72. menuheader "" "...for further information/help see the README.\n\f4The readme can be found in the base AssaultCube directory."
  73. //// Main > Help > Reference search ////
  74. newmenu [Reference search]
  75. tempalias __docsearchstring ""
  76. menuitemtextinput "Search reference for: " "result $__docsearchstring" [ __docsearchstring = $arg1 ; showmenu [Reference search results] ]
  77. //// Main > Help > Reference search > Reference search results ////
  78. newmenu [Reference search results]
  79. menuinit [
  80. resetcurmenu
  81. menusynctabstops 1
  82. if (strlen $__docsearchstring) [
  83. menuheader "" (concatword "search results for keyword \f2" $__docsearchstring)
  84. looplist (docfind $__docsearchstring 1) [n l] [
  85. menuitem (concatword "\fs\f1" $n "\fr \t" (getdoc $n 1)) (concatword "saycommand /" $n)
  86. ]
  87. ] closecurmenu
  88. ]
  89. //// Main > Help > FAQ ////
  90. // see opt/faq.cfg
  91. //// Main > About ////
  92. newmenu about
  93. menuitem "AssaultCube Version 1.2" -1
  94. menuitem "" -1
  95. menuitem "AssaultCube is developed by various people around the" -1
  96. menuitem "world. People that enjoy making this game together." -1
  97. menuitem "" -1
  98. menuitem "Thank you to everyone participating to help us make" -1
  99. menuitem "AssaultCube what it is today. To learn about the team" -1
  100. menuitem "(Rabid Viper Productions) behind the game, read here:" -1
  101. menuitem "\f1 http://assault.cubers.net/docs/team.html" -1
  102. menuitem "" -1
  103. menuitem "AssaultCube is a total-conversion of the CUBE engine" -1
  104. menuitem "by Wouter 'Aardappel' van Oortmerssen, and others:" -1
  105. menuitem "\t\f1http://www.cubeengine.com/" -1
  106. //// Main > Quit ////
  107. newmenu quit
  108. menuitem "Yes, quit now" quit
  109. menuitem "No" [ showmenu [] ]
  110. menuitem "" -1
  111. menuitemcheckbox "Don't ask next time: " [(= $askquit 0)] [askquit = (= $arg1 0)]
  112. // Show quit dialog if enabled
  113. const savequit [ if $askquit [ showmenu quit ] quit ]
  114. // Create additional menus...
  115. exec config/menus_bot.cfg
  116. exec config/menus_edit.cfg
  117. exec config/menus_licenses.cfg
  118. exec config/menus_settings.cfg
  119. exec config/menus_multiplayer.cfg
  120. exec config/menus_voicecom.cfg
  121. exec config/favourites.cfg