--__________         __    __  .__           ___________
--\______   \_____ _/  |__/  |_|  |   ____   \_   _____/__________
-- |    |  _/\__  \\   __\   __\  | _/ __ \   |    __)/  _ \_  __ \
-- |    |   \ / __ \|  |  |  | |  |_\  ___/   |     \(  <_> )  | \/
-- |______  /(____  /__|  |__| |____/\___  >  \___  / \____/|__|
--        \/      \/                     \/       \/
--   _____                     .___.__
--  /     \ _____    ____    __| _/|__| ____  ___________
-- /  \ /  \\__  \  /    \  / __ | |  |/ ___\/  _ \_  __ \
--/    Y    \/ __ \|   |  \/ /_/ | |  \  \__(  <_> )  | \/
--\____|__  (____  /___|  /\____ | |__|\___  >____/|__|
--        \/     \/     \/      \/         \/

--      buttons.lua - Buttons
--
--      (c) Copyright 2005 by Kimmo Merikivi
--
--      This program 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; either version 2 of the License, or
--      (at your option) any later version.
--  
--      This program 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.
--  
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

-- Load the buttons of all races
Load("scripts/dwarves/buttons.lua")
print("Loaded dwarves buttons\n")
Load("scripts/darkness/buttons.lua")
print("Loaded darkness buttons.\n")

------------------------------------------------------------------------------
--	Define unit-button.
--
--	DefineButton( { Pos = n Level = n Icon = ident Action = name ['value value]
--		['allowed check ['values]] Key = key Hint = hint ForUnit = units)
--

-- neutral --------------------------------------------------------------------


-- general cancel button ------------------------------------------------------

DefineButton( { Pos = 9, Level = 9, Icon = "icon-cancel",
  Action = "cancel",
  Key = "c", Hint = "~!CANCEL",
  ForUnit = {"*"} } )

DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
  Action = "cancel-upgrade",
  Key = "c", Hint = "~!CANCEL UPGRADE",
  ForUnit = {"cancel-upgrade"} } )

DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
  Action = "cancel-train-unit",
  Key = "c", Hint = "~!CANCEL UNIT TRAINING",
  ForUnit = {"*"} } )

DefineButton( { Pos = 9, Level = 0, Icon = "icon-cancel",
  Action = "cancel-build",
  Key = "c", Hint = "~!CANCEL CONSTRUCTION",
  ForUnit = {"cancel-build"} } )

  
  
DefineButton( { Pos = 1, Level = 0, Icon = "icon-move",
  Action = "move",
  Key = "m", Hint = "~!MOVE",
  ForUnit = {"unit-tux", "unit-wizard-of-yendor", "unit-young-dragon", "unit-kimmo", "unit-titanium-dwarf", "unit-mikko", "unit-dragon", "unit-flying-dragon", "unit-biting-dragon", "unit-demogorgon"} } )
DefineButton( { Pos = 2, Level = 0, Icon = "icon-stop",
  Action = "stop",
  Key = "s", Hint = "~!STOP",
  ForUnit = {"unit-tux", "unit-wizard-of-yendor", "unit-kimmo", "unit-young-dragon", "unit-titanium-dwarf", "unit-mikko", "unit-dragon", "unit-flying-dragon", "unit-biting-dragon", "unit-demogorgon"} } )
DefineButton( { Pos = 3, Level = 0, Icon = "icon-attack",
  Action = "attack",
  Key = "a", Hint = "~!ATTACK",
  ForUnit = {"unit-tux", "unit-wizard-of-yendor", "unit-kimmo", "unit-young-dragon", "unit-titanium-dwarf", "unit-mikko", "unit-dragon", "unit-flying-dragon", "unit-biting-dragon", "unit-demogorgon"} } )
DefineButton( { Pos = 4, Level = 0, Icon = "icon-stand",
  Action = "stand-ground",
  Key = "t", Hint = "S~!TAND ON GROUND",
  ForUnit = {"unit-tux", "unit-wizard-of-yendor", "unit-kimmo", "unit-young-dragon", "unit-titanium-dwarf", "unit-mikko", "unit-dragon", "unit-flying-dragon", "unit-biting-dragon", "unit-demogorgon"} } )
DefineButton( { Pos = 5, Level = 0, Icon = "icon-patrol",
  Action = "patrol",
  Key = "p", Hint = "~!PATROL",
  ForUnit = {"unit-tux", "unit-wizard-of-yendor", "unit-kimmo", "unit-young-dragon", "unit-titanium-dwarf", "unit-mikko", "unit-dragon", "unit-flying-dragon", "unit-biting-dragon", "unit-demogorgon"} } )

DefineButton( { Pos = 6, Level = 0, Icon = "icon-cancel",
  Action = "cast-spell", Value = "spell-fod",
  Allowed = "check-true",
  Key = "f", Hint = "~!FINGER OF DEATH",
  ForUnit = {"unit-wizard-of-yendor"} } )
DefineButton( { Pos = 7, Level = 0, Icon = "icon-cancel",
  Action = "cast-spell", Value = "spell-haste-self",
  Allowed = "check-true",
  Key = "h", Hint = "~!HASTE SELF",
  ForUnit = {"unit-wizard-of-yendor"} } )
DefineButton( { Pos = 6, Level = 0, Icon = "icon-cancel",
  Action = "cast-spell", Value = "spell-kick-away",
  Allowed = "check-true",
  Key = "k", Hint = "~!KICK AWAY",
  ForUnit = {"unit-kimmo"} } )
