;;   ___________		     _________		      _____  __
;;   \_	  _____/______   ____   ____ \_   ___ \____________ _/ ____\/  |_
;;    |    __) \_  __ \_/ __ \_/ __ \/    \  \/\_  __ \__  \\   __\\   __|
;;    |     \   |  | \/\  ___/\  ___/\     \____|  | \// __ \|  |   |  |
;;    \___  /   |__|    \___  >\___  >\______  /|__|  (____  /__|   |__|
;;	  \/		    \/	   \/	     \/		   \/
;;  ______________________                           ______________________
;;			  T H E   W A R   B E G I N S
;;	   FreeCraft - A free fantasy real time strategy game engine
;;
;;	menus.ccl	-	Menus configuration
;;
;;	(c) Copyright 2002 by Kachalov Anton and Jimmy Salmon.
;;
;;	FreeCraft is free software; you can redistribute it and/or modify
;;	it under the terms of the GNU General Public License as published
;;	by the Free Software Foundation; only version 2 of the License.
;;
;;	FreeCraft is distributed in the hope that it will be useful,
;;	but WITHOUT ANY WARRANTY; without even the implied warranty of
;;	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;	GNU General Public License for more details.
;;
;;	$Id: menus.ccl,v 1.70 2003/03/03 03:21:10 jsalmon3 Exp $

;;
;; load the keystroke helps
;;
(load "ccl/keystrokes.ccl" #f #t)

;;
;; define the menu graphics
;;
(define-menu-graphics
  '(file "ui/buttons 1.png" size (300 144))
  '(file "ui/buttons 2.png" size (300 144)))

;;
;; menu-game
;;
(define-menu 'name 'menu-game 'geometry '(272 96 256 288)
  'image 'panel1 'default '7)
(define-menu-item 'pos (list 128 11) 'font 'large  'init 'game-menu-init
  'text '("Game Menu" center)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 40) 'font 'large
  'button '(size (106 27)
    caption "Save (~<F11~>)"
    hotkey "f11"
    func save-game-menu
    style gm-half)
  'menu 'menu-game)
(define-menu-item 'pos (list (+ 16 12 106) 40) 'font 'large
  'button '(size (106 27)
    caption "Load (~<F12~>)"
    hotkey "f12"
    func load-game-menu
    style gm-half)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 (+ 40 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "Options (~<F5~>)"
    hotkey "f5"
    func game-options-menu
    style gm-full)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 (+ 40 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "Help (~<F1~>)"
    hotkey "f1"
    func help-menu
    style gm-full)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 (+ 40 (* 36 3))) 'font 'large
  'button '(size (224 27)
    caption "Scenario ~!Objectives"
    hotkey "o"
    func objectives-menu
    style gm-full)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 (+ 40 (* 36 4))) 'font 'large
  'button '(size (224 27)
    caption "~!End Scenario"
    hotkey "e"
    func end-scenario-menu
    style gm-full)
  'menu 'menu-game)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Return to Game (~<Esc~>)"
    hotkey "esc"
    func game-menu-return
    style gm-full)
  'menu 'menu-game)


;;
;; menu-victory
;;
(define-menu 'name 'menu-victory 'geometry '(256 176 288 128)
  'image 'panel4 'default '2)
(define-menu-item 'pos (list 144 11) 'font 'large 'init 'victory-init
  'text '("Congratulations!" center)
  'menu 'menu-victory)
(define-menu-item 'pos (list 144 32) 'font 'large
  'text '("You are victorious!" center)
  'menu 'menu-victory)
(define-menu-item 'pos (list 32 56) 'font 'large
  'button '(size (224 27)
    caption "~!Victory"
    hotkey "v"
    func game-menu-end
    style gm-full)
  'menu 'menu-victory)
(define-menu-item 'pos (list 32 90) 'font 'large
  'button '(size (224 27)
    caption "Save ~!Replay"
    hotkey "r"
    func save-replay
    style gm-full)
  'menu 'menu-victory)


;;
;; menu-defeated
;;
(define-menu 'name 'menu-defeated 'geometry '(256 176 288 128)
  'image 'panel4 'default '2)
(define-menu-item 'pos (list 144 11) 'font 'large 'init 'defeated-init
  'text '("You have failed to" center)
  'menu 'menu-defeated)
(define-menu-item 'pos (list 144 32) 'font 'large
  'text '("achieve victory!" center)
  'menu 'menu-defeated)
(define-menu-item 'pos (list 32 56) 'font 'large
  'button '(size (224 27)
    caption "~!OK"
    hotkey "o"
    func game-menu-end
    style gm-full)
  'menu 'menu-defeated)
(define-menu-item 'pos (list 32 90) 'font 'large
  'button '(size (224 27)
    caption "Save ~!Replay"
    hotkey "r"
    func save-replay
    style gm-full)
  'menu 'menu-defeated)

;;
;; menu-save-replay
;;
(define-menu 'name 'menu-save-replay 'geometry '(256 176 288 128)
  'image 'panel4 'default '1)
(define-menu-item 'pos (list 144 11) 'font 'large 'init 'save-replay-init 'exit 'save-replay-exit
  'text '("Save Replay" center)
  'menu 'menu-save-replay)
(define-menu-item 'pos (list 14 40) 'font 'game
  'input '(size (260 20)
    func save-replay-enter-action
    style pulldown)
  'menu 'menu-save-replay)
(define-menu-item 'pos (list 14 80) 'font 'large 'flags '(disabled)
  'button '(size (112 27)
    caption "~!OK"
    hotkey "o"
    func save-replay-ok
    style gm-half)
  'menu 'menu-save-replay)
(define-menu-item 'pos (list 162 80) 'font 'large
  'button '(size (112 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-half)
  'menu 'menu-save-replay)


;;
;; menu-select-scenario
;;
(define-menu 'name 'menu-select-scenario 'geometry '(144 64 352 352)
  'image 'panel5 'default '4)
(define-menu-item 'pos (list 176 8) 'font 'large  'init 'scen-select-init
  'text '("Select scenario" center)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 24 140) 'font 'game  'init 'scen-select-lb-init 'exit 'scen-select-lb-exit
  'listbox '(size (288 108)
    style pulldown
    func scen-select-lb-action
    retopt scen-select-lb-retrieve
    handler scen-select-ok
    nlines 6)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 312 140) 'font 'small
  'vslider '(size (18 108)
    func scen-select-vs-action
    handler scen-select-ok)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 48 318) 'font 'large
  'button '(size (106 27)
    caption "OK"
    hotkey ""
    func scen-select-ok
    style gm-half)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 198 318) 'font 'large
  'button '(size (106 27)
    caption "Cancel"
    hotkey ""
    func scen-select-cancel
    style gm-half)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 132 40) 'font 'large
  'text '("Type:" right)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 140 40) 'font 'game
  'pulldown '(size (192 20)
    style pulldown
    func scen-select-tpms-action
    options ("FreeCraft scenario (cm)" "Foreign scenario (pud)" )
    default 1
    current 1)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 132 80) 'font 'large
  'text '("Map size:" right)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 140 80) 'font 'game
  'pulldown '(size (192 20)
    style pulldown
    func scen-select-tpms-action
    options ("Any size" "32 x 32" "64 x 64" "96 x 96" "128 x 128" "256 x 256" "512 x 512" "1024 x 1024" )
    default 0
    current 0)
  'menu 'menu-select-scenario)
(define-menu-item 'pos (list 22 112) 'font 'game
  'button '(size (36 24)
    caption ()
    hotkey ""
    func scen-select-folder
    style folder)
  'menu 'menu-select-scenario)


;;
;; menu-program-start
;;
(define-menu 'name 'menu-program-start 'geometry '(0 0 640 480)
  'image 'none 'default '1)
(define-menu-item 'pos (list 0 0) 'font 'game  'init 'program-start
  'drawfunc 'name-line-draw
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!Single Player Game"
    hotkey "s"
    func single-player-game-menu
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Multi Player Game"
    hotkey "m"
    func multi-player-game-menu
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Campaign Game"
    hotkey "c"
    func campaign-game-menu
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 3))) 'font 'large
  'button '(size (224 27)
    caption "~!Load Game"
    hotkey "l"
    func load-game-menu
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 4))) 'font 'large
  'button '(size (224 27)
    caption "~!Replay Game"
    hotkey "r"
    func replay-game-menu
    style gm-full)
  'menu 'menu-program-start)
(if (symbol-bound? 'freecraft-feature-sdl ())
(define-menu-item 'pos (list 208 (+ 109 (* 36 5))) 'font 'large
  'button '(size (224 27)
    caption "~!Options"
    hotkey "o"
    func global-options-menu
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 5))) 'font 'large
  'flags '(disabled)
  'button '(size (224 27)
    caption "~!Options"
    hotkey "o"
    func global-options-menu
    style gm-full)
  'menu 'menu-program-start)
)
(define-menu-item 'pos (list 208 (+ 109 (* 36 6))) 'font 'large
  'button '(size (224 27)
    caption "~!Editor"
    hotkey "e"
    func game-start-editor
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 7))) 'font 'large
  'button '(size (224 27)
    caption "S~!how Credits"
    hotkey "h"
    func game-show-credits
    style gm-full)
  'menu 'menu-program-start)
(define-menu-item 'pos (list 208 (+ 109 (* 36 8))) 'font 'large
  'button '(size (224 27)
    caption "E~!xit Program"
    hotkey "x"
    func game-menu-exit
    style gm-full)
  'menu 'menu-program-start)

;;
;; menu-global-options
;;
(define-menu 'name 'menu-global-options 'geometry '(144 64 352 352)
  'image 'panel5 'default '1)
(define-menu-item 'pos (list 176 11) 'font 'large 'init 'global-options-init 'exit 'global-options-exit
  'text '("Global Options" center)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 16 44) 'font 'game
  'text '("Video Resolution" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 16 60)
  'gem '(size (18 18)
    state unchecked
    func global-options-resolution-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 64) 'font 'game
  'text '("640 x 480" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 16 80)
  'gem '(size (18 18)
    state unchecked
    func global-options-resolution-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 84) 'font 'game
  'text '("800 x 600" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 16 100)
  'gem '(size (18 18)
    state unchecked
    func global-options-resolution-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 104) 'font 'game
  'text '("1024 x 768" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 16 120)
  'gem '(size (18 18)
    state unchecked
    func global-options-resolution-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 124) 'font 'game
  'text '("1280 x 960" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 16 140)
  'gem '(size (18 18)
    state unchecked
    func global-options-resolution-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 144) 'font 'game
  'text '("1600 x 1200" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 17 164)
  'gem '(size (18 18)
    state unchecked
    func global-options-fullscreen-gem
    style gem-square)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 40 166) 'font 'game
  'text '("Fullscreen" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 192 44) 'font 'game
  'text '("Shadow Fog" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 192 60)
  'gem '(size (18 18)
    state unchecked
    func global-options-fog-original-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 216 64) 'font 'game
  'text '("Original" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 192 80)
  'gem '(size (18 18)
    state unchecked
    func global-options-fog-alpha-gem
    style gem-round)
  'menu 'menu-global-options)
(define-menu-item 'pos (list 216 84) 'font 'game
  'text '("Alpha" left)
  'menu 'menu-global-options)

(define-menu-item 'pos (list 123 309) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-global-options)

;;
;; menu-custom-game
;;
(define-menu 'name 'menu-custom-game 'geometry '(0 0 640 480)
  'image 'none 'default '3)
(define-menu-item 'pos (list 0 0) 'font 'game  'init 'game-setup-init
  'drawfunc 'game-draw-func
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (+ (/ 640 2) 12) 192) 'font 'large
  'text '("~<Single Player Game Setup~>" center)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "S~!elect Scenario"
    hotkey "e"
    func scen-select-menu
    style gm-full)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Start Game"
    hotkey "s"
    func custom-game-start
    style gm-full)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Cancel Game"
    hotkey "c"
    func game-cancel
    style gm-full)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 40 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Your Race:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 40 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-rcs-action
    options ("Alliance" "Mythical" "Map Default" )
    default 2
    current 2)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 220 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Resources:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 220 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-res-action
    options ("Map Default" "Low" "Medium" "High" )
    default 0
    current 0)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 240) 20)) 'font 'game
  'text '("~<Units:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 240)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-uns-action
    options ("Map Default" "One Peasant Only" )
    default 0
    current 0)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 40 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Opponents:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 40 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func custom-game-ops-action
    options ("Map Default" "1 Opponent" "2 Opponents" "3 Opponents" "4 Opponents" "5 Opponents" "6 Opponents" "7 Opponents" "8 Opponents" "9 Opponents" "10 Opponents" "11 Opponents" "12 Opponents" "13 Opponents" "14 Opponents" )
    default 0
    current 0)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 220 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Map Tileset:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list 220 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-tss-action
    options ("Map Default" "Summer" "Winter" "Wasteland" "Swamp" )
    default 0
    current 0)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 300) 20)) 'font 'game
  'text '("~<Game Type:~>" none)
  'menu 'menu-custom-game)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 300)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-gat-action
    options ("Use map settings" "Melee" "Free for all" "Top vs bottom" "Left vs right" "Man vs Machine" )
    default 0
    current 0)
  'menu 'menu-custom-game)


;;
;; menu-enter-name
;;
(define-menu 'name 'menu-enter-name 'geometry '(176 260 288 128)
  'image 'panel4 'default '2)
(define-menu-item 'pos (list 144 11) 'font 'game
  'text '("Enter your name:" center)
  'menu 'menu-enter-name)
(define-menu-item 'pos (list 40 38) 'font 'game
  'input '(size (212 20)
    func enter-name-action
    style pulldown)
  'menu 'menu-enter-name)
(define-menu-item 'pos (list 24 80) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-enter-name)
(define-menu-item 'pos (list 154 80) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func enter-name-cancel
    style gm-half)
  'menu 'menu-enter-name)


;;
;; menu-create-join-menu
;;
(define-menu 'name 'menu-create-join-menu 'geometry '(0 0 640 480)
  'image 'none 'default '2)
(define-menu-item 'pos (list 208 (+ 320 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!Join Game"
    hotkey "j"
    func net-join-game
    style gm-full)
  'menu 'menu-create-join-menu)
(define-menu-item 'pos (list 208 (+ 320 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Create Game"
    hotkey "c"
    func net-create-game
    style gm-full)
  'menu 'menu-create-join-menu)
(define-menu-item 'pos (list 208 (+ 320 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Previous Menu"
    hotkey "p"
    func end-menu
    style gm-full)
  'menu 'menu-create-join-menu)


;;
;; menu-multi-net-type-menu
;;
(define-menu 'name 'menu-multi-net-type-menu 'geometry '(0 0 640 480)
  'image 'none 'default '2)
(define-menu-item 'pos (list 208 (+ 320 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!LAN/P2P Game"
    hotkey "l"
    func net-lan-game
    style gm-full)
  'menu 'menu-multi-net-type-menu)
(define-menu-item 'pos (list 208 (+ 320 (* 36 1))) 'font 'large
  'flags '(disabled)
  'button '(size (224 27)
    caption "~!Internet Game"
    hotkey "i"
    func null
    style gm-full)
  'menu 'menu-multi-net-type-menu)
(define-menu-item 'pos (list 208 (+ 320 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Previous Menu"
    hotkey "p"
    func end-menu
    style gm-full)
  'menu 'menu-multi-net-type-menu)


;;
;; menu-multi-setup
;;
(define-menu 'name 'menu-multi-setup 'geometry '(0 0 640 480)
  'image 'none 'default '3)
(define-menu-item 'pos (list 0 0) 'font 'game  'init 'multi-game-setup-init 'exit 'multi-game-setup-exit
  'drawfunc 'multi-game-draw-func
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (+ (/ 640 2) 12) 8) 'font 'large
  'text '("~<Multi Player Setup~>" center)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "S~!elect Scenario"
    hotkey "e"
    func multi-scen-select
    style gm-full)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 1))) 'font 'large 'flags '(disabled)
  'button '(size (224 27)
    caption "~!Start Game"
    hotkey "s"
    func multi-game-start
    style gm-full)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Cancel Game"
    hotkey "c"
    func multi-game-cancel
    style gm-full)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 0))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 1))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 2))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 3))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 4))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 5))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 6))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 32 (* 22 7))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 0))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 1))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 2))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 3))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 4))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 5))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 360 (+ 32 (* 22 6))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Your Race:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-rcs-action
    options ("Alliance" "Mythical" "Map Default" )
    default 2
    current 2)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 220 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Resources:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 220 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-res-action
    options ("Map Default" "Low" "Medium" "High" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 240) 20)) 'font 'game
  'text '("~<Units:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 240)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-uns-action
    options ("Map Default" "One Peasant Only" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Fog of War:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 40 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func multi-game-fws-action
    options ("Fog of War" "No Fog of War" "Reveal map" "Reveal map,No fog" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 220 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Map Tileset:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 220 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-tss-action
    options ("Map Default" "Summer" "Winter" "Wasteland" "Swamp" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 300) 20)) 'font 'game
  'text '("~<Game Type:~>" none)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 300)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-gat-action
    options ("Use map settings" "Melee" "Free for all" "Top vs bottom" "Left vs right" "Man vs Machine" )
    default 0
    current 0)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 10 (+ 32 (* 22 7))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 0))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 330 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-square)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 218 (+ 32 (* 22 7))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 0))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)
(define-menu-item 'pos (list 538 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state passive
    func null
    style gem-round)
  'menu 'menu-multi-setup)


;;
;; menu-enter-server
;;
(define-menu 'name 'menu-enter-server 'geometry '(176 260 288 128)
  'image 'panel4 'default '3)
(define-menu-item 'pos (list 144 11) 'font 'game
  'text '("Enter server IP-address:" center)
  'menu 'menu-enter-server)
(define-menu-item 'pos (list 40 38) 'font 'game
  'input '(size (212 20)
    func enter-server-ip-action
    style pulldown)
  'menu 'menu-enter-server)
(define-menu-item 'pos (list 24 80) 'font 'large 'flags '(disabled)
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-enter-server)
(define-menu-item 'pos (list 154 80) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func enter-server-ip-cancel
    style gm-half)
  'menu 'menu-enter-server)


;;
;; menu-net-multi-client
;;
(define-menu 'name 'menu-net-multi-client 'geometry '(0 0 640 480)
  'image 'none 'default '4 'netaction 'terminate-net-connect)
(define-menu-item 'pos (list 0 0) 'font 'game  'init 'multi-game-client-init 'exit 'multi-game-client-exit
  'drawfunc 'multi-client-draw-func
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (+ (/ 640 2) 12) 8) 'font 'large
  'text '("~<Multi Player Game~>" center)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!Ready"
    hotkey "r"
    func multi-client-ready
    style gm-full)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Not Ready"
    hotkey "n"
    func multi-client-not-ready
    style gm-full)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (+ 360 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Cancel Game"
    hotkey "c"
    func multi-client-cancel
    style gm-full)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 0))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 1))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 2))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 3))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 4))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 5))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 6))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 32 (* 22 7))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 0))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 1))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 2))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 3))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 4))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 5))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 360 (+ 32 (* 22 6))) 'font 'game
  'pulldown '(size (172 20)
    style pulldown
    func null
    options ("Available" "Computer" "Closed" )
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Your Race:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func multi-client-rcs-action
    options ("Alliance" "Mythical" "Map Default" )
    default 2
    current 2)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 220 (- (+ 10 240) 20)) 'font 'game
  'text '("~<Resources:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 220 (+ 10 240)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-res-action
    options ("Map Default" "Low" "Medium" "High" )
    state passive
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 240) 20)) 'font 'game
  'text '("~<Units:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 240)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-uns-action
    options ("Map Default" "One Peasant Only" )
    state passive
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Fog of War:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 40 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func multi-game-fws-action
    options ("Fog of War" "No Fog of War" "Reveal map" "Reveal map,No fog" )
    state passive
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 220 (- (+ 10 300) 20)) 'font 'game
  'text '("~<Map Tileset:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 220 (+ 10 300)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func game-tss-action
    options ("Map Default" "Summer" "Winter" "Wasteland" "Swamp" )
    state passive
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (- (+ 10 300) 20)) 'font 'game
  'text '("~<Game Type:~>" none)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list (- 640 224 16) (+ 10 300)) 'font 'game
  'pulldown '(size (190 20)
    style pulldown
    func game-gat-action
    options ("Use map settings" "Melee" "Free for all" "Top vs bottom" "Left vs right" "Man vs Machine" )
    state passive
    default 0
    current 0)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 10 (+ 32 (* 22 7))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 0))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 1))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 2))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 3))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 4))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 5))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)
(define-menu-item 'pos (list 330 (+ 32 (* 22 6))) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func multi-client-gem-action
    style gem-square)
  'menu 'menu-net-multi-client)


;;
;; menu-net-connecting
;;
(define-menu 'name 'menu-net-connecting 'geometry '(176 260 288 128)
  'image 'panel4 'default '2 'netaction 'terminate-net-connect)
(define-menu-item 'pos (list 144 11) 'font 'large 'init 'net-connecting-init 'exit 'net-connecting-exit
  'text '("Connecting to server" center)
  'menu 'menu-net-connecting)
(define-menu-item 'pos (list 144 32) 'font 'large
  'text '(() center)
  'menu 'menu-net-connecting)
(define-menu-item 'pos (list 144 53) 'font 'large
  'text '(() center)
  'menu 'menu-net-connecting)
(define-menu-item 'pos (list 32 90) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func net-connecting-cancel
    style gm-full)
  'menu 'menu-net-connecting)


;;
;; menu-campaign-select
;;
(define-menu 'name 'menu-campaign-select 'geometry '(0 0 640 480)
  'image 'none 'default '0)
(define-menu-item 'pos (list 208 (+ 212 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption ()
    hotkey "a"
    func campaign-1
    style gm-full)
  'menu 'menu-campaign-select)
(define-menu-item 'pos (list 208 (+ 212 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption ()
    hotkey "m"
    func campaign-2
    style gm-full)
  'menu 'menu-campaign-select)
(define-menu-item 'pos (list 208 (+ 212 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption ()
    hotkey "l"
    func campaign-3
    style gm-full)
  'menu 'menu-campaign-select)
(define-menu-item 'pos (list 208 (+ 212 (* 36 3))) 'font 'large
  'button '(size (224 27)
    caption ()
    hotkey "y"
    func campaign-4
    style gm-full)
  'menu 'menu-campaign-select)
(define-menu-item 'pos (list 208 (+ 212 (* 36 4))) 'font 'large 'flags '(disabled)
  'button '(size (224 27)
    caption "~!Select Campaign"
    hotkey "s"
    func select-campaign-menu
    style gm-full)
  'menu 'menu-campaign-select)
(define-menu-item 'pos (list 208 (+ 212 (* 36 5))) 'font 'large
  'button '(size (224 27)
    caption "~!Previous Menu"
    hotkey "p"
    func end-menu
    style gm-full)
  'menu 'menu-campaign-select)


;;
;; menu-campaign-continue
;;
(define-menu 'name 'menu-campaign-continue 'geometry '(0 0 640 480)
  'image 'none 'default '0)
(define-menu-item 'pos (list 508 (+ 320 (* 36 3))) 'font 'large
  'button '(size (106 27)
    caption "~!Continue"
    hotkey "c"
    func end-menu
    style gm-half)
  'menu 'menu-campaign-continue)


;;
;; menu-objectives
;;
(define-menu 'name 'menu-objectives 'geometry '(272 96 256 288)
  'image 'panel1 'default '10)
(define-menu-item 'pos (list 128 11) 'font 'large 'init 'objectives-init
  'text '("Objectives" center)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 0))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 1))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 2))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 3))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 4))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 5))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 6))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 7))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 14 (+ 38 (* 21 8))) 'font 'large
  'text '(() none)
  'menu 'menu-objectives)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-full)
  'menu 'menu-objectives)


;;
;; menu-end-scenario
;;
(define-menu 'name 'menu-end-scenario 'geometry '(272 96 256 288)
  'image 'panel1 'default '5)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("End Scenario" center)
  'menu 'menu-end-scenario)
(define-menu-item 'pos (list 16 (+ 40 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!Restart Scenario"
    hotkey "r"
    func restart-confirm-menu
    style gm-full)
  'menu 'menu-end-scenario)
(define-menu-item 'pos (list 16 (+ 40 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Surrender"
    hotkey "s"
    func surrender-confirm-menu
    style gm-full)
  'menu 'menu-end-scenario)
(define-menu-item 'pos (list 16 (+ 40 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "~!Quit to Menu"
    hotkey "q"
    func quit-to-menu-confirm-menu
    style gm-full)
  'menu 'menu-end-scenario)
(define-menu-item 'pos (list 16 (+ 40 (* 36 3))) 'font 'large
  'button '(size (224 27)
    caption "E~!xit Program"
    hotkey "x"
    func exit-confirm-menu
    style gm-full)
  'menu 'menu-end-scenario)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Previous (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-end-scenario)


;;
;; menu-sound-options
;;
(define-menu 'name 'menu-sound-options 'geometry '(224 64 352 352)
  'image 'panel5 'default '23)
(define-menu-item 'pos (list 176 11) 'font 'large 'init 'sound-options-init 'exit 'sound-options-exit
  'text '("Sound Options" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 16 (* 36 1)) 'font 'game
  'text '("Master Volume" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 32 (* 36 1.5)) 'font 'small
  'hslider '(size (198 18)
    func master-volume-hs-action
    handler scen-select-ok)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 44 (+ (* 36 2) 6)) 'font 'small
  'text '("min" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 218 (+ (* 36 2) 6)) 'font 'small
  'text '("max" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 240 (* 36 1.5)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-master-power
    style gem-square)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 266 (+ (* 36 1.5) 2)) 'font 'game
  'text '("Enabled" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 16 (* 36 3)) 'font 'game
  'text '("Music Volume" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 32 (* 36 3.5)) 'font 'small
  'hslider '(size (198 18)
    func music-volume-hs-action
    handler scen-select-ok)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 44 (+ (* 36 4) 6)) 'font 'small
  'text '("min" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 218 (+ (* 36 4) 6)) 'font 'small
  'text '("max" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 240 (* 36 3.5)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-music-power
    style gem-square)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 266 (+ (* 36 3.5) 2)) 'font 'game
  'text '("Enabled" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 16 (* 36 5)) 'font 'game
  'text '("CD Volume" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 32 (* 36 5.5)) 'font 'small
  'hslider '(size (198 18)
    func cd-volume-hs-action
    handler scen-select-ok)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 44 (+ (* 36 6) 6)) 'font 'small
  'text '("min" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 218 (+ (* 36 6) 6)) 'font 'small
  'text '("max" center)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 240 (* 36 5.5)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-cd-power
    style gem-square)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 266 (+ (* 36 5.5) 2)) 'font 'game
  'text '("Enabled" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 32 (* 36 6.5)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-cd-mode-all
    style gem-round)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 58 (+ (* 36 6.5) 2)) 'font 'game
  'text '("All Tracks" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 154 (* 36 6.5)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-cd-mode-random
    style gem-round)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list 180 (+ (* 36 6.5) 2)) 'font 'game
  'text '("Random Tracks" left)
  'menu 'menu-sound-options)
(define-menu-item 'pos (list (- 176 (/ 106 2)) (- 352 11 27)) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-sound-options)


;;
;; menu-preferences
;;
(define-menu 'name 'menu-preferences 'geometry '(272 96 256 288)
  'image 'panel1 'default '5)
(define-menu-item 'pos (list 128 11) 'font 'large 'init 'preferences-init 'exit 'preferences-exit
  'text '("Preferences" center)
  'menu 'menu-preferences)
(define-menu-item 'pos (list 16 (* 36 1)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-fog-of-war
    style gem-square)
  'menu 'menu-preferences)
(define-menu-item 'pos (list 46 (+ (* 36 1) 2)) 'font 'game
  'text '("Fog of War Enabled" left)
  'menu 'menu-preferences)
(define-menu-item 'pos (list 16 (* 36 2)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func set-command-key
    style gem-square)
  'menu 'menu-preferences)
(define-menu-item 'pos (list 46 (+ (* 36 2) 2)) 'font 'game
  'text '("Show command key" left)
  'menu 'menu-preferences)
(define-menu-item 'pos (list (- 128 (/ 106 2)) 245) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-preferences)


;;
;; menu-diplomacy
;;
(define-menu 'name 'menu-diplomacy 'geometry '(222 76 352 352)
  'image 'panel5 'default '5)
(define-menu-item 'pos (list 136 30) 'font 'game 'init 'diplomacy-init 'exit 'diplomacy-exit
  'text '("Allied" center)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 196 30) 'font 'game
  'text '("Enemy" center)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 286 30) 'font 'game
  'text '("Shared Vision" center)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 176 11) 'font 'large
  'text '("Diplomacy" center)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 1) 26)) 'font 'game
  'text '("Player 1" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 1) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 1) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 1) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 16 (+ (* 18 2) 26)) 'font 'game
  'text '("Player 3" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 2) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 2) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 2) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 3) 26)) 'font 'game
  'text '("Player 4" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 3) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 3) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 3) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 4) 26)) 'font 'game
  'text '("Player 5" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 4) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 4) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 4) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 5) 26)) 'font 'game
  'text '("Player 6" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 5) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 5) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 5) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 6) 26)) 'font 'game
  'text '("Player 7" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 6) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 6) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 6) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 7) 26)) 'font 'game
  'text '("Player 8" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 7) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 7) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 7) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 8) 26)) 'font 'game
  'text '("Player 9" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 8) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 8) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 8) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 9) 26)) 'font 'game
  'text '("Player 10" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 9) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 9) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 9) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 10) 26)) 'font 'game
  'text '("Player 11" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 10) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 10) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 10) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 11) 26)) 'font 'game
  'text '("Player 12" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 11) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 11) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 11) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 12) 26)) 'font 'game
  'text '("Player 13" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 12) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 12) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 12) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 13) 26)) 'font 'game
  'text '("Player 14" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 13) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 13) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 13) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 16 (+ (* 18 14) 26)) 'font 'game
  'text '("Player 15" left)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 126 (+ (* 18 14) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 186 (+ (* 18 14) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-round)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 276 (+ (* 18 14) 23)) 'font 'large
  'gem '(size (18 18)
    state unchecked
    func diplomacy-wait
    style gem-square)
  'menu 'menu-diplomacy)

(define-menu-item 'pos (list 75 (- 352 40)) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func diplomacy-ok
    style gm-half)
  'menu 'menu-diplomacy)
(define-menu-item 'pos (list 195 (- 352 40)) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func end-menu
    style gm-half)
  'menu 'menu-diplomacy)


;;
;; menu-speed-options
;;
(define-menu 'name 'menu-speed-options 'geometry '(272 96 256 288)
  'image 'panel1 'default '13)
(define-menu-item 'pos (list 128 11) 'font 'large 'init 'speed-options-init 'exit 'speed-options-exit
  'text '("Speed Settings" center)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 16 (* 36 1)) 'font 'game
  'text '("Game Speed" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 32 (* 36 1.5)) 'font 'small
  'hslider '(size (198 18)
    func game-speed-hs-action
    handler scen-select-ok)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 34 (+ (* 36 2) 6)) 'font 'small
  'text '("slow" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 230 (+ (* 36 2) 6)) 'font 'small
  'text '("fast" right)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 16 (* 36 3)) 'font 'game
  'text '("Mouse Scroll" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 32 (* 36 3.5)) 'font 'small
  'hslider '(size (198 18)
    func mouse-scroll-hs-action
    handler scen-select-ok)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 34 (+ (* 36 4) 6)) 'font 'small
  'text '("off" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 230 (+ (* 36 4) 6)) 'font 'small
  'text '("fast" right)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 16 (* 36 5)) 'font 'game
  'text '("Keyboard Scroll" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 32 (* 36 5.5)) 'font 'small
  'hslider '(size (198 18)
    func keyboard-scroll-hs-action
    handler scen-select-ok)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 34 (+ (* 36 6) 6)) 'font 'small
  'text '("off" left)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list 230 (+ (* 36 6) 6)) 'font 'small
  'text '("fast" right)
  'menu 'menu-speed-options)
(define-menu-item 'pos (list (- 128 (/ 106 2)) 245) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-speed-options)


;;
;; menu-game-options
;;
(define-menu 'name 'menu-game-options 'geometry '(272 96 256 288)
  'image 'panel1 'default '5)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Game Options" center)
  'menu 'menu-game-options)
(define-menu-item 'pos (list 16 (+ 40 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "Sound (~<F7~>)"
    hotkey "f7"
    func sound-options-menu
    style gm-full)
  'menu 'menu-game-options)
(define-menu-item 'pos (list 16 (+ 40 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "Speeds (~<F8~>)"
    hotkey "f8"
    func speed-options-menu
    style gm-full)
  'menu 'menu-game-options)
(define-menu-item 'pos (list 16 (+ 40 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "Preferences (~<F9~>)"
    hotkey "f9"
    func preferences-menu
    style gm-full)
  'menu 'menu-game-options)
(define-menu-item 'pos (list 16 (+ 40 (* 36 3))) 'font 'large
  'button '(size (224 27)
    caption "~!Diplomacy"
    hotkey "d"
    func diplomacy-menu
    style gm-full)
  'menu 'menu-game-options)
(define-menu-item 'pos (list (- 128 (/ 224 2)) 245) 'font 'large
  'button '(size (224 27)
    caption "Previous (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-game-options)


;;
;; menu-net-error
;;
(define-menu 'name 'menu-net-error 'geometry '(176 260 288 128)
  'image 'panel4 'default '2)
(define-menu-item 'pos (list 144 11) 'font 'large
  'text '("Error:" center)
  'menu 'menu-net-error)
(define-menu-item 'pos (list 144 38) 'font 'large
  'text '(() center)
  'menu 'menu-net-error)
(define-menu-item 'pos (list 92 80) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func end-menu
    style gm-half)
  'menu 'menu-net-error)


;;
;; menu-tips
;;
(define-menu 'name 'menu-tips 'geometry '(256 112 288 256)
  'image 'panel2 'default '4)
(define-menu-item 'pos (list 144 11) 'font 'large  'init 'tips-init 'exit 'tips-exit
  'text '("FreeCraft Tips" center)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (- 256 75)) 'font 'game
  'gem '(size (18 18)
    state checked
    func tips-show-tips-gem
    style gem-square)
  'menu 'menu-tips)
(define-menu-item 'pos (list (+ 14 22) (+ (- 256 75) 4)) 'font 'game
  'text '("Show tips at startup" left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (- 256 40)) 'font 'large
  'button '(size (106 27)
    caption "~!Next Tip"
    hotkey "n"
    func tips-next-tip
    style gm-half)
  'menu 'menu-tips)
(define-menu-item 'pos (list 168 (- 256 40)) 'font 'large
  'button '(size (106 27)
    caption "~!Close"
    hotkey "c"
    func end-menu
    style gm-half)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 0))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 1))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 2))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 3))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 4))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 5))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 6))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 7))) 'font 'game
  'text '(() left)
  'menu 'menu-tips)


;;
;; menu-help
;;
(define-menu 'name 'menu-help 'geometry '(272 96 256 288)
  'image 'panel1 'default '3)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Help Menu" center)
  'menu 'menu-help)
(define-menu-item 'pos (list 16 (+ 40 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "Keystroke ~!Help"
    hotkey "h"
    func keystroke-help-menu
    style gm-full)
  'menu 'menu-help)
(define-menu-item 'pos (list 16 (+ 40 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "FreeCraft ~!Tips"
    hotkey "t"
    func tips-menu
    style gm-full)
  'menu 'menu-help)
(define-menu-item 'pos (list (- 128 (/ 224 2)) 248) 'font 'large
  'button '(size (224 27)
    caption "Previous (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-help)


;;
;; menu-keystroke-help
;;
(define-menu 'name 'menu-keystroke-help 'geometry '(224 64 352 352)
  'image 'panel5 'default '2)
(define-menu-item 'pos (list (/ 352 2) 11) 'font 'large
  'text '("Keystroke Help Menu" center)
  'menu 'menu-keystroke-help)
(define-menu-item 'pos (list (- 352 18 16) (+ 40 20)) 'font 'small
  'vslider '(size (18 216)
    func keystroke-help-vs-action
    handler null
    default 0)
  'menu 'menu-keystroke-help)
(define-menu-item 'pos (list (- (/ 352 2) (/ 224 2)) (- 352 40)) 'font 'large
  'button '(size (224 27)
    caption "Previous (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-keystroke-help)
(define-menu-item 'pos (list 16 (+ 40 20)) 'font 'game
  'drawfunc 'keystroke-help-draw-func
  'menu 'menu-keystroke-help)


;;
;; menu-save-game
;;
(define-menu 'name 'menu-save-game 'geometry '(208 112 384 256)
  'image 'panel3 'default '6)
(define-menu-item 'pos (list (/ 384 2) 11) 'font 'large  'init 'save-game-init 'exit 'save-game-exit
  'text '("Save Game" center)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (/ (- 384 300 18) 2) (+ 11 36)) 'font 'game
  'input '(size (300 20)
    func save-game-enter-action
    style pulldown)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (/ (- 384 300 18) 2) (+ 11 36 22)) 'font 'game  'init 'save-game-lb-init 'exit 'save-game-lb-exit
  'listbox '(size (300 126)
    style pulldown
    func save-game-lb-action
    retopt save-game-lb-retrieve
    handler save-game-ok
    nlines 7)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (+ (/ (- 384 300 18) 2) 300) (+ 11 36 22)) 'font 'small
  'vslider '(size (18 126)
    func save-game-vs-action
    handler save-game-ok)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (- (* 1 (/ 384 3)) 106 10) (- 256 16 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Save"
    hotkey "s"
    func save-game-ok
    style gm-half)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (- (* 2 (/ 384 3)) 106 10) (- 256 16 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Delete"
    hotkey "d"
    func delete-confirm-menu
    style gm-half)
  'menu 'menu-save-game)
(define-menu-item 'pos (list (- (* 3 (/ 384 3)) 106 10) (- 256 16 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func end-menu
    style gm-half)
  'menu 'menu-save-game)


;;
;; menu-load-game
;;
(define-menu 'name 'menu-load-game 'geometry '(208 112 384 256)
  'image 'panel3 'default '4)
(define-menu-item 'pos (list (/ 384 2) 11) 'font 'large  'init 'load-game-init 'exit 'load-game-exit
  'text '("Load Game" center)
  'menu 'menu-load-game)
(define-menu-item 'pos (list (/ (- 384 300 18) 2) (+ 11 (* 36 1.5))) 'font 'game  'init 'load-game-lb-init 'exit 'load-game-lb-exit
  'listbox '(size (300 126)
    style pulldown
    func load-game-lb-action
    retopt load-game-lb-retrieve
    handler load-game-ok
    nlines 7)
  'menu 'menu-load-game)
(define-menu-item 'pos (list (+ (/ (- 384 300 18) 2) 300) (+ 11 (* 36 1.5))) 'font 'small
  'vslider '(size (18 126)
    func load-game-vs-action
    handler load-game-ok)
  'menu 'menu-load-game)
(define-menu-item 'pos (list (/ (- 384 300 18) 2) (- 256 16 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Load"
    hotkey "l"
    func load-game-ok
    style gm-half)
  'menu 'menu-load-game)
(define-menu-item 'pos (list (- 384 (/ (- 384 300 18) 2) 106) (- 256 16 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func end-menu
    style gm-half)
  'menu 'menu-load-game)


;;
;; menu-save-confirm
;;
(define-menu 'name 'menu-save-confirm 'geometry '(256 112 288 128)
  'image 'panel4 'default '1)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large  'init 'save-confirm-init 'exit 'save-confirm-exit
  'text '("Overwrite File" center)
  'menu 'menu-save-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 1.5))) 'font 'game
  'text '("Are you sure you want to overwrite" left)
  'menu 'menu-save-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 2.5))) 'font 'game
  'text '(() left)
  'menu 'menu-save-confirm)
(define-menu-item 'pos (list 16 (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func save-confirm-ok
    style gm-half)
  'menu 'menu-save-confirm)
(define-menu-item 'pos (list (- 288 16 106) (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func save-confirm-cancel
    style gm-half)
  'menu 'menu-save-confirm)


;;
;; menu-delete-confirm
;;
(define-menu 'name 'menu-delete-confirm 'geometry '(256 112 288 128)
  'image 'panel4 'default '1)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large  'init 'delete-confirm-init 'exit 'delete-confirm-exit
  'text '("Delete File" center)
  'menu 'menu-delete-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 1.5))) 'font 'game
  'text '("Are you sure you want to delete" left)
  'menu 'menu-delete-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 2.5))) 'font 'game
  'text '(() left)
  'menu 'menu-delete-confirm)
(define-menu-item 'pos (list 16 (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func delete-confirm-ok
    style gm-half)
  'menu 'menu-delete-confirm)
(define-menu-item 'pos (list (- 288 16 106) (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func delete-confirm-cancel
    style gm-half)
  'menu 'menu-delete-confirm)


;;
;; menu-editor-select
;;
(define-menu 'name 'menu-editor-select 'geometry '(0 0 640 480)
  'image 'none 'default '0)
(define-menu-item 'pos (list 0 0) 'font 'game
  'drawfunc 'editor-new-draw-func
  'menu 'menu-editor-select)
(define-menu-item 'pos (list 208 (+ 320 (* 36 0))) 'font 'large
  'button '(size (224 27)
    caption "~!New Map"
    hotkey "n"
    func editor-new-map
    style gm-full)
  'menu 'menu-editor-select)
(define-menu-item 'pos (list 208 (+ 320 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "~!Load Map"
    hotkey "l"
    func editor-main-load-map
    style gm-full)
  'menu 'menu-editor-select)
(define-menu-item 'pos (list 208 (+ 320 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func editor-select-cancel
    style gm-full)
  'menu 'menu-editor-select)


;;
;; menu-editor-new
;;
(define-menu 'name 'menu-editor-new 'geometry '(0 0 640 480)
  'image 'none 'default '0)
(define-menu-item 'pos (list (+ 176 16) (+ 112 (+ 40 20))) 'font 'game
  'drawfunc 'editor-new-draw-func
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (/ (- 288 260) 2)) (+ 112 (+ 11 36))) 'font 'game
  'text '("Map Description:" left)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (/ (- 288 260) 2)) (+ 112 (+ 11 36 22))) 'font 'game
  'input '(size (260 20)
    func editor-new-map-description-enter-action
    style pulldown)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (/ (- 288 260) 2)) (+ 112 (+ 11 (* 36 2) 22))) 'font 'game
  'text '("Size:" left)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (- 288 (/ (- 288 260) 2) 152)) (+ 112 (+ 11 (* 36 2) 22))) 'font 'game
  'input '(size (60 20)
    func editor-new-map-size-enter-action
    style pulldown)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (- 288 (/ (- 288 260) 2) 60)) (+ 112 (+ 11 (* 36 2) 22))) 'font 'game
  'input '(size (60 20)
    func editor-new-map-size-enter-action
    style pulldown)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (/ (- 288 260) 2)) (+ 112 (+ 11 (* 36 3) 22))) 'font 'game
  'text '("Tileset:" left)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 176 (- 288 (/ (- 288 260) 2) 152)) (+ 112 (+ 11 (* 36 3) 22))) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func null
    options ("Summer" "Winter" "Wasteland" "Swamp" )
    default 0
    current 0)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (- 320 106 23) 328) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-new-ok
    style gm-half)
  'menu 'menu-editor-new)
(define-menu-item 'pos (list (+ 320 23) 328) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func editor-new-cancel
    style gm-half)
  'menu 'menu-editor-new)


;;
;; menu-editor-main-load-map
;;
(define-menu 'name 'menu-editor-main-load-map 'geometry '(144 64 352 352)
  'image 'panel5 'default '4)
(define-menu-item 'pos (list (/ 352 2) 11) 'font 'large  'init 'editor-main-load-init
  'text '("Select map" center)
  'menu 'menu-editor-main-load-map)
(define-menu-item 'pos (list (/ (- 352 18 288) 2) (+ 11 98)) 'font 'game  'init 'editor-main-load-lb-init 'exit 'editor-main-load-lb-exit
  'listbox '(size (288 108)
    style pulldown
    func editor-main-load-lb-action
    retopt editor-main-load-lb-retrieve
    handler editor-main-load-ok
    nlines 6)
  'menu 'menu-editor-main-load-map)
(define-menu-item 'pos (list (+ (/ (- 352 18 288) 2) 288) (+ 11 98)) 'font 'small
  'vslider '(size (18 108)
    func editor-main-load-vs-action
    handler editor-main-load-ok)
  'menu 'menu-editor-main-load-map)
(define-menu-item 'pos (list 48 308) 'font 'large
  'button '(size (106 27)
    caption "OK"
    hotkey ""
    func editor-main-load-ok
    style gm-half)
  'menu 'menu-editor-main-load-map)
(define-menu-item 'pos (list 198 308) 'font 'large
  'button '(size (106 27)
    caption "Cancel"
    hotkey ""
    func editor-main-load-cancel
    style gm-half)
  'menu 'menu-editor-main-load-map)
(define-menu-item 'pos (list (- (/ (- 352 18 288) 2) 2) (- (+ 11 98) 28)) 'font 'game
  'button '(size (36 24)
    caption ()
    hotkey ""
    func editor-main-load-folder
    style folder)
  'menu 'menu-editor-main-load-map)


;;
;; menu-editor-load
;;
(define-menu 'name 'menu-editor-load 'geometry '(224 64 352 352)
  'image 'panel5 'default '4)
(define-menu-item 'pos (list (/ 352 2) 11) 'font 'large  'init 'editor-load-init
  'text '("Select map" center)
  'menu 'menu-editor-load)
(define-menu-item 'pos (list (/ (- 352 18 288) 2) (+ 11 98)) 'font 'game  'init 'editor-load-lb-init 'exit 'editor-load-lb-exit
  'listbox '(size (288 108)
    style pulldown
    func editor-load-lb-action
    retopt editor-load-lb-retrieve
    handler editor-load-ok
    nlines 6)
  'menu 'menu-editor-load)
(define-menu-item 'pos (list (+ (/ (- 352 18 288) 2) 288) (+ 11 98)) 'font 'small
  'vslider '(size (18 108)
    func editor-load-vs-action
    handler editor-load-ok)
  'menu 'menu-editor-load)
(define-menu-item 'pos (list 48 308) 'font 'large
  'button '(size (106 27)
    caption "OK"
    hotkey ""
    func editor-load-ok
    style gm-half)
  'menu 'menu-editor-load)
(define-menu-item 'pos (list 198 308) 'font 'large
  'button '(size (106 27)
    caption "Cancel"
    hotkey ""
    func editor-load-cancel
    style gm-half)
  'menu 'menu-editor-load)
(define-menu-item 'pos (list (- (/ (- 352 18 288) 2) 2) (- (+ 11 98) 28)) 'font 'game
  'button '(size (36 24)
    caption ()
    hotkey ""
    func editor-load-folder
    style folder)
  'menu 'menu-editor-load)


;;
;; menu-editor
;;
(define-menu 'name 'menu-editor 'geometry '(272 96 256 288)
  'image 'panel1 'default '6)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Editor Menu" center)
  'menu 'menu-editor)
(define-menu-item 'pos (list 16 40) 'font 'large
  'button '(size (106 27)
    caption "Save (~<F11~>)"
    hotkey "f11"
    func editor-save-menu
    style gm-half)
  'menu 'menu-editor)
(define-menu-item 'pos (list (+ 16 12 106) 40) 'font 'large
  'button '(size (106 27)
    caption "Load (~<F12~>)"
    hotkey "f12"
    func editor-load-menu
    style gm-half)
  'menu 'menu-editor)
(define-menu-item 'pos (list 16 (+ 40 (* 36 1))) 'font 'large
  'button '(size (224 27)
    caption "Map Properties (~<F5~>)"
    hotkey "f5"
    func editor-map-properties-menu
    style gm-full)
  'menu 'menu-editor)
(define-menu-item 'pos (list 16 (+ 40 (* 36 2))) 'font 'large
  'button '(size (224 27)
    caption "Player Properties (~<F6~>)"
    hotkey "f6"
    func editor-player-properties-menu
    style gm-full)
  'menu 'menu-editor)
(define-menu-item 'pos (list 16 (- 288 40 36)) 'font 'large
  'button '(size (224 27)
    caption "E~!xit to Menu"
    hotkey "x"
    func editor-quit-to-menu
    style gm-full)
  'menu 'menu-editor)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Return to Editor (~<Esc~>)"
    hotkey "esc"
    func game-menu-return
    style gm-full)
  'menu 'menu-editor)


;;
;; menu-editor-map-properties
;;
(define-menu 'name 'menu-editor-map-properties 'geometry '(256 112 288 256)
  'image 'panel2 'default '10)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large
  'text '("Map Properties" center)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 260) 2) (+ 11 36)) 'font 'game
  'text '("Map Description:" left)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 260) 2) (+ 11 36 22)) 'font 'game
  'input '(size (260 20)
    func editor-map-properties-enter-action
    style pulldown)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 260) 2) (+ 11 (* 36 2) 22)) 'font 'game
  'text '("Size:" left)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (- 288 (/ (- 288 260) 2) 152) (+ 11 (* 36 2) 22)) 'font 'game
  'text '(() left)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 260) 2) (+ 11 (* 36 3) 22)) 'font 'game
  'text '("Tileset:" left)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (- 288 (/ (- 288 260) 2) 152) (+ 11 (* 36 3) 22)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func null
    options ("Summer" "Winter" "Wasteland" "Swamp" )
    default 0
    current 0)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 260) 2) (+ 11 (* 36 4) 22)) 'font 'game
  'text '("Version:" left)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (- 288 (/ (- 288 260) 2) 152) (+ 11 (* 36 4) 22)) 'font 'game
  'pulldown '(size (152 20)
    style pulldown
    func null
    options ("Original" "Expansion" "FreeCraft" )
    default 0
    current 0)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (/ (- 288 (* 106 2)) 4) (- 256 11 27)) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-map-properties-ok
    style gm-half)
  'menu 'menu-editor-map-properties)
(define-menu-item 'pos (list (- 288 (/ (- 288 (* 106 2)) 4) 106) (- 256 11 27)) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func editor-end-menu
    style gm-half)
  'menu 'menu-editor-map-properties)


;;
;; menu-editor-player-properties
;;
(define-menu 'name 'menu-editor-player-properties 'geometry '(0 0 640 480)
  'image 'none 'default '0)
(define-menu-item 'pos (list 0 0) 'font 'game
  'drawfunc 'editor-player-properties-draw-func
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list (/ 640 2) 11) 'font 'large
  'text '("Player Properties" center)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 455 440) 'font 'large
  'button '(size (106 27)
    caption "OK"
    hotkey "o"
    func editor-end-menu
    style gm-half)
  'menu 'menu-editor-player-properties)
;; 3
(define-menu-item 'pos (list 12 (+ 40 (* 22 0))) 'font 'game
  'text '("#" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 1))) 'font 'game
  'text '("0" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 2))) 'font 'game
  'text '("1" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 3))) 'font 'game
  'text '("2" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 4))) 'font 'game
  'text '("3" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 5))) 'font 'game
  'text '("4" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 6))) 'font 'game
  'text '("5" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 7))) 'font 'game
  'text '("6" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 8))) 'font 'game
  'text '("7" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 9))) 'font 'game
  'text '("8" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 10))) 'font 'game
  'text '("9" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 11))) 'font 'game
  'text '("10" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 12))) 'font 'game
  'text '("11" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 13))) 'font 'game
  'text '("12" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 14))) 'font 'game
  'text '("13" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 15))) 'font 'game
  'text '("14" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 12 (+ 40 (* 22 16))) 'font 'game
  'text '("15" left)
  'menu 'menu-editor-player-properties)
;; 20
(define-menu-item 'pos (list 40 (+ 40 (* 22 0))) 'font 'game
  'text '("Race" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 1))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 2))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 3))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 4))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 5))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 6))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 7))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 8))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 9))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 10))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 11))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 12))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 13))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 14))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 15))) 'font 'game
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 40 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'pulldown '(size (80 20)
    style pulldown
    func null
    options ("Alliance" "Mythical" "Neutral" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
;; 37
(define-menu-item 'pos (list 130 (+ 40 (* 22 0))) 'font 'game
  'text '("Type" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 1))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 2))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 3))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 4))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 5))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 6))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 7))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 8))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 9))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 10))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 11))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 12))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 13))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 14))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 15))) 'font 'game
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 130 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'pulldown '(size (150 20)
    style pulldown
    func null
    options ("Person" "Computer" "Rescue (Passive)" "Rescue (Active)" "Neutral" "Nobody" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
;; 54
(define-menu-item 'pos (list 290 (+ 40 (* 22 0))) 'font 'game
  'text '("AI" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 1))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 2))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 3))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 4))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 5))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 6))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 7))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 8))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 9))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 10))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 11))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 12))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 13))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 14))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 15))) 'font 'game
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 290 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'pulldown '(size (120 20)
    style pulldown
    func null
    options ("Land Attack" "Passive" "Sea Attack" "Air Attack" )
    default 0
    current 0)
  'menu 'menu-editor-player-properties)
;; 71
(define-menu-item 'pos (list 420 (+ 40 (* 22 0))) 'font 'game
  'text '("Gold" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 1))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 2))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 3))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 4))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 5))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 6))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 7))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 8))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 9))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 10))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 11))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 12))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 13))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 14))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 15))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 420 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
;; 88
(define-menu-item 'pos (list 490 (+ 40 (* 22 0))) 'font 'game
  'text '("Lumber" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 1))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 2))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 3))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 4))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 5))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 6))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 7))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 8))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 9))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 10))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 11))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 12))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 13))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 14))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 15))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 490 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
;; 105
(define-menu-item 'pos (list 560 (+ 40 (* 22 0))) 'font 'game
  'text '("Oil" left)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 1))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 2))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 3))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 4))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 5))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 6))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 7))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 8))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 9))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 10))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 11))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 12))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 13))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 14))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 15))) 'font 'game
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)
(define-menu-item 'pos (list 560 (+ 40 (* 22 16))) 'font 'game 'flags '(disabled)
  'input '(size (60 20)
    func editor-player-properties-enter-action
    style pulldown)
  'menu 'menu-editor-player-properties)


;;
;; menu-editor-tips
;;
(define-menu 'name 'menu-editor-tips 'geometry '(256 112 288 256)
  'image 'panel2 'default '4)
(define-menu-item 'pos (list 144 11) 'font 'large  ;'init 'init-editor-tips
  'text '("Editor Tips" center)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (- 256 75)) 'font 'game
  'gem '(size (18 18)
    state checked
    func null ;set-editor-tips
    style gem-square)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list (+ 14 22) (+ (- 256 75) 4)) 'font 'game
  'text '("Show tips at startup" left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (- 256 40)) 'font 'large
  'button '(size (106 27)
    caption "~!Next Tip"
    hotkey "n"
    func null ;show-next-editor-tip
    style gm-half)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 168 (- 256 40)) 'font 'large
  'button '(size (106 27)
    caption "~!Close"
    hotkey "c"
    func editor-end-menu
    style gm-half)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 0))) 'font 'game
  'text '("Warning:" left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 1))) 'font 'game
  'text '("This is the first relase of the editor!" left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 2))) 'font 'game
  'text '("Please expect bugs and please report" left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 3))) 'font 'game
  'text '("them!" left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 4))) 'font 'game
  'text '(() left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 5))) 'font 'game
  'text '(() left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 6))) 'font 'game
  'text '(() left)
  'menu 'menu-editor-tips)
(define-menu-item 'pos (list 14 (+ 35 (* 16 7))) 'font 'game
  'text '(() left)
  'menu 'menu-editor-tips)


;;
;; menu-editor-edit-resource
;;
(define-menu 'name 'menu-editor-edit-resource 'geometry '(256 176 288 128)
  'image 'panel4 'default '1)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large
  'text '(() center)
  'menu 'menu-editor-edit-resource)
(define-menu-item 'pos (list 40 46) 'font 'game
  'input '(size (212 20)
    func editor-edit-resource-enter-action
    style pulldown)
  'menu 'menu-editor-edit-resource)
(define-menu-item 'pos (list 24 88) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-edit-resource-ok
    style gm-half)
  'menu 'menu-editor-edit-resource)
(define-menu-item 'pos (list 154 88) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func editor-edit-resource-cancel
    style gm-half)
  'menu 'menu-editor-edit-resource)


;;
;; menu-editor-error
;;
(define-menu 'name 'menu-editor-error 'geometry '(256 176 288 128)
  'image 'panel4 'default '2)
(define-menu-item 'pos (list 144 11) 'font 'large
  'text '("Error:" center)
  'menu 'menu-editor-error)
(define-menu-item 'pos (list 144 38) 'font 'large
  'text '(() center)
  'menu 'menu-editor-error)
(define-menu-item 'pos (list 92 80) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-end-menu
    style gm-half)
  'menu 'menu-editor-error)


;;
;; menu-editor-edit-ai-properties
;;
(define-menu 'name 'menu-editor-edit-ai-properties 'geometry '(256 176 288 128)
  'image 'panel4 'default '6)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large
  'text '("Artificial Intelligence" center)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 100 34)
  'gem '(size (18 18)
    state unchecked
    func editor-edit-ai-properties-gem
    style gem-round)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 124 38) 'font 'game
  'text '("Active" left)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 100 56)
  'gem '(size (18 18)
    state unchecked
    func editor-edit-ai-properties-gem
    style gem-round)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 124 60) 'font 'game
  'text '("Passive" left)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 24 88) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-edit-ai-properties-ok
    style gm-half)
  'menu 'menu-editor-edit-ai-properties)
(define-menu-item 'pos (list 154 88) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func editor-edit-ai-properties-cancel
    style gm-half)
  'menu 'menu-editor-edit-ai-properties)


;;
;; menu-editor-save
;;
(define-menu 'name 'menu-editor-save 'geometry '(224 64 352 352)
  'image 'panel5 'default '5)
(define-menu-item 'pos (list (/ 352 2) 11) 'font 'large
  'text '("Save map" center)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list (/ (- 352 18 288) 2) (+ 11 98)) 'font 'game  'init 'editor-save-lb-init 'exit 'editor-save-lb-exit
  'listbox '(size (288 108)
    style pulldown
    func editor-save-lb-action
    retopt editor-save-lb-retrieve
    handler editor-save-ok
    nlines 6)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list (+ (/ (- 352 18 288) 2) 288) (+ 11 98)) 'font 'small
  'vslider '(size (18 108)
    func editor-save-vs-action
    handler editor-save-ok)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list (/ (- 352 18 288) 2) (+ 11 98 108 12)) 'font 'game
  'input '(size (288 20)
    func editor-save-enter-action
    style pulldown)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list 48 308) 'font 'large
  'button '(size (106 27)
    caption "OK"
    hotkey "o"
    func editor-save-ok
    style gm-half)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list 198 308) 'font 'large
  'button '(size (106 27)
    caption "Cancel"
    hotkey "c"
    func editor-save-cancel
    style gm-half)
  'menu 'menu-editor-save)
(define-menu-item 'pos (list (- (/ (- 352 18 288) 2) 2) (- (+ 11 98) 28)) 'font 'game
  'button '(size (36 24)
    caption ()
    hotkey ""
    func editor-save-folder
    style folder)
  'menu 'menu-editor-save)


;;
;; menu-editor-save-confirm
;;
(define-menu 'name 'menu-editor-save-confirm 'geometry '(256 112 288 128)
  'image 'panel4 'default '1)
(define-menu-item 'pos (list (/ 288 2) 11) 'font 'large  'init 'editor-save-confirm-init
  'text '("Overwrite File" center)
  'menu 'menu-editor-save-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 1.5))) 'font 'game
  'text '("Are you sure you want to overwrite" left)
  'menu 'menu-editor-save-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 20 2.5))) 'font 'game
  'text '(() left)
  'menu 'menu-editor-save-confirm)
(define-menu-item 'pos (list 16 (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func editor-save-confirm-ok
    style gm-half)
  'menu 'menu-editor-save-confirm)
(define-menu-item 'pos (list (- 288 16 106) (- 128 (* 27 1.5))) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func editor-save-confirm-cancel
    style gm-half)
  'menu 'menu-editor-save-confirm)


;;
;; menu-replay-game
;;
(define-menu 'name 'menu-replay-game 'geometry '(144 64 352 352)
  'image 'panel5 'default '4)
(define-menu-item 'pos (list (/ 352 2) 11) 'font 'large  'init 'replay-game-init
  'text '("Select game" center)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list (/ (- 352 18 288) 2) (+ 11 98)) 'font 'game  'init 'replay-game-lb-init 'exit 'replay-game-lb-exit
  'listbox '(size (288 108)
    style pulldown
    func replay-game-lb-action
    retopt replay-game-lb-retrieve
    handler replay-game-ok
    nlines 6)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list (+ (/ (- 352 18 288) 2) 288) (+ 11 98)) 'font 'small
  'vslider '(size (18 108)
    func replay-game-vs-action
    handler replay-game-ok)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list 48 308) 'font 'large
  'button '(size (106 27)
    caption "~!OK"
    hotkey "o"
    func replay-game-ok
    style gm-half)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list 198 308) 'font 'large
  'button '(size (106 27)
    caption "~!Cancel"
    hotkey "c"
    func replay-game-cancel
    style gm-half)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list (- (/ (- 352 18 288) 2) 2) (- (+ 11 98) 28)) 'font 'game
  'button '(size (36 24)
    caption ()
    hotkey ""
    func replay-game-folder
    style folder)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list 23 264)
  'gem '(size (18 18)
    state unchecked
    func replay-game-disable-fog
    style gem-square)
  'menu 'menu-replay-game)
(define-menu-item 'pos (list 47 (+ 264 2)) 'font 'large
  'text '("Reveal map" left)
  'menu 'menu-replay-game)


;;
;; menu-restart-confirm
;;
(define-menu 'name 'menu-restart-confirm 'geometry '(272 96 256 288)
  'image 'panel1 'default '4)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Are you sure you" center)
  'menu 'menu-restart-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 1))) 'font 'large
  'text '("want to restart" center)
  'menu 'menu-restart-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 2))) 'font 'large
  'text '("the scenario?" center)
  'menu 'menu-restart-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 24 3) 29)) 'font 'large
  'button '(size (224 27)
    caption "~!Restart Scenario"
    hotkey "r"
    func end-scenario-restart
    style gm-full)
  'menu 'menu-restart-confirm)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-restart-confirm)


;;
;; menu-surrender-confirm
;;
(define-menu 'name 'menu-surrender-confirm 'geometry '(272 96 256 288)
  'image 'panel1 'default '4)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Are you sure you" center)
  'menu 'menu-surrender-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 1))) 'font 'large
  'text '("want to surrender" center)
  'menu 'menu-surrender-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 2))) 'font 'large
  'text '("to your enemies?" center)
  'menu 'menu-surrender-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 24 3) 29)) 'font 'large
  'button '(size (224 27)
    caption "~!Surrender"
    hotkey "s"
    func end-scenario-surrender
    style gm-full)
  'menu 'menu-surrender-confirm)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-surrender-confirm)


;;
;; menu-quit-to-menu-confirm
;;
(define-menu 'name 'menu-quit-to-menu-confirm 'geometry '(272 96 256 288)
  'image 'panel1 'default '4)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Are you sure you" center)
  'menu 'menu-quit-to-menu-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 1))) 'font 'large
  'text '("want to quit to" center)
  'menu 'menu-quit-to-menu-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 2))) 'font 'large
  'text '("the main menu?" center)
  'menu 'menu-quit-to-menu-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 24 3) 29)) 'font 'large
  'button '(size (224 27)
    caption "~!Quit to Menu"
    hotkey "q"
    func end-scenario-quit-to-menu
    style gm-full)
  'menu 'menu-quit-to-menu-confirm)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-quit-to-menu-confirm)


;;
;; menu-exit-confirm
;;
(define-menu 'name 'menu-exit-confirm 'geometry '(272 96 256 288)
  'image 'panel1 'default '4)
(define-menu-item 'pos (list 128 11) 'font 'large
  'text '("Are you sure you" center)
  'menu 'menu-exit-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 1))) 'font 'large
  'text '("want to exit" center)
  'menu 'menu-exit-confirm)
(define-menu-item 'pos (list 128 (+ 11 (* 24 2))) 'font 'large
  'text '("FreeCraft?" center)
  'menu 'menu-exit-confirm)
(define-menu-item 'pos (list 16 (+ 11 (* 24 3) 29)) 'font 'large
  'button '(size (224 27)
    caption "E~!xit Program"
    hotkey "x"
    func game-menu-exit
    style gm-full)
  'menu 'menu-exit-confirm)
(define-menu-item 'pos (list 16 (- 288 40)) 'font 'large
  'button '(size (224 27)
    caption "Cancel (~<Esc~>)"
    hotkey "esc"
    func end-menu
    style gm-full)
  'menu 'menu-exit-confirm)

