LoadFile( "DATA:GUI/Base_Screen.lua" )

------------------------------------------------------
-- Standard alert modal dialog
--------------------------------------------------------

local MessageBoxOk = CreatePushButton( "MessageBoxOk", [[GUI/generic/okay.anim]], {120, 115} )
local MessageBoxOk2 = CreatePushButton( "MessageBoxOk2", [[GUI/generic/okay.anim]], {-100, 115} )
local MessageBoxCancel = CreatePushButton( "MessageBoxCancel", [[GUI/generic/cancel.anim]], {120, 115} )
local MessageBoxText = CreateStaticText( "MessageBoxText", "Alert!", {-90, -29}, "large" )
MessageBoxText.width = 270
MessageBoxText.height = 40

MessageBox = CreateModalDialog( "MessageBox",
  { MessageBoxOk, MessageBoxOk2, MessageBoxCancel, MessageBoxText }, [[GUI/generic/message_box.anim]], {550, 260} )

------------------------------------------------------
-- Warren The Wise -------------------------------
------------------------------------------------------

WarrenTheWiseText = CreateStaticText( "WarrenTheWiseText", "Stuff", { -145, -56 } )
WarrenTheWiseText.width = 200
WarrenTheWiseText.height = 60

WarrenTheWiseBack = CreateImage( "WarrenTheWiseBack", [[GUI\tutorial\warren_the_wise.anim]], {0,0} )
WarrenTheWise = CreateGroup( "WarrenTheWise", { WarrenTheWiseText, WarrenTheWiseBack }, 5, 5, {0,0} )
WarrenTheWise.visible = false

WarrenTheWiseLargeText = CreateStaticText( "WarrenTheWiseLargeText", "Stuff", { -145, -56 } )
WarrenTheWiseLargeText.width = 200
WarrenTheWiseLargeText.height = 60

WarrenTheWiseLargeBack = CreateImage( "WarrenTheWiseLargeBack", [[GUI\tutorial\warren_the_wise_large.anim]], {0,0} )
WarrenTheWiseLarge = CreateGroup( "WarrenTheWiseLarge", { WarrenTheWiseLargeText, WarrenTheWiseLargeBack }, 5, 5, {0,0} )
WarrenTheWiseLarge.visible = false

WarrenTheWise2Text = CreateStaticText( "WarrenTheWise2Text", "Stuff", { -145, -56 } )
WarrenTheWise2Text.width = 200
WarrenTheWise2Text.height = 60

WarrenTheWise2Back = CreateImage( "WarrenTheWise2Back", [[GUI\tutorial\warren_the_wise2.anim]], {0,0} )
WarrenTheWise2 = CreateGroup( "WarrenTheWise2", { WarrenTheWise2Text, WarrenTheWise2Back }, 5, 5, {0,0} )
WarrenTheWise2.visible = false

WarrenTheWise2LargeText = CreateStaticText( "WarrenTheWise2LargeText", "Stuff", { -145, -56 } )
WarrenTheWise2LargeText.width = 200
WarrenTheWise2LargeText.height = 60

WarrenTheWise2LargeBack = CreateImage( "WarrenTheWise2LargeBack", [[GUI\tutorial\warren_the_wise2_large.anim]], {0,0} )
WarrenTheWise2Large = CreateGroup( "WarrenTheWise2Large", { WarrenTheWise2LargeText, WarrenTheWise2LargeBack }, 5, 5, {0,0} )
WarrenTheWise2Large.visible = false

------------------------------------------------------
-- Return to Start Menu dialog
--------------------------------------------------------

local ReturnToMainMenuDialogYes = CreatePushButton( "ReturnToMainMenuDialogYes", [[GUI/generic/okay.anim]], {-134, -20} )
ReturnToMainMenuDialogYes.button_ext.additional_scale = 1.2

local ReturnToMainMenuDialogNo = CreatePushButton( "ReturnToMainMenuDialogNo", [[GUI/generic/cancel.anim]], {0, 14} )
ReturnToMainMenuDialogNo.button_ext.additional_scale = 1.2

ReturnToMainMenuDialog = CreateModalDialog( "ReturnToMainMenuDialog",
  { ReturnToMainMenuDialogYes, ReturnToMainMenuDialogNo }, [[GUI/return_to_main_menu/background.anim]], {536, 288 } )
  
------------------------------------------------------
-- Return to Start Menu dialog
--------------------------------------------------------

local ReturnToPuzzleMapDialogYes = CreatePushButton( "ReturnToPuzzleMapDialogYes", [[GUI/generic/okay.anim]], {-134, -20} )
ReturnToPuzzleMapDialogYes.button_ext.additional_scale = 1.2

local ReturnToPuzzleMapDialogNo = CreatePushButton( "ReturnToPuzzleMapDialogNo", [[GUI/generic/cancel.anim]], {0, 14} )
ReturnToPuzzleMapDialogNo.button_ext.additional_scale = 1.2

ReturnToPuzzleMapDialog = CreateModalDialog( "ReturnToPuzzleMapDialog",
  { ReturnToPuzzleMapDialogYes, ReturnToPuzzleMapDialogNo }, [[GUI/go_to_puzzle_map/background.anim]], {536, 288 } )

--------------------------------------------------------
-- Quit confirmation dialog
--------------------------------------------------------

local QuitDialogYes = CreatePushButton( "QuitDialogYes", [[GUI/generic/okay.anim]], {-134, -20+7} )
QuitDialogYes.button_ext.additional_scale = 1.2

local QuitDialogNo = CreatePushButton( "QuitDialogNo", [[GUI/generic/cancel.anim]], {0, 14+7} )
QuitDialogNo.button_ext.additional_scale = 1.2

QuitDialog = CreateModalDialog( "QuitDialog",
  { QuitDialogYes, QuitDialogNo }, [[GUI/quit/background.anim]], {536, 320 } )
	
--------------------------------------------------------
-- Game menu dialog
--------------------------------------------------------
game_menu_x = 20
game_menu_y = -120
local GameMenuOpen = CreatePushButton( "GameMenuOpen", [[GUI\game_menu\game_menu_open.anim]], {game_menu_x, game_menu_y} )
local GameMenuLoadReplay = CreatePushButton( "GameMenuLoadReplay", [[GUI/game_menu/game_menu_load_replay.anim]], {game_menu_x, game_menu_y + 75} )
local GameMenuSave = CreatePushButton("GameMenuSave", [[GUI/game_menu/game_menu_save.anim]], {game_menu_x, game_menu_y + 75} )
local GameMenuPuzzleMap = CreatePushButton( "GameMenuPuzzleMap", [[GUI/game_menu/game_menu_puzzle_map.anim]], {game_menu_x, game_menu_y + 160} )
local GameMenuOptions = CreatePushButton( "GameMenuOptions", [[GUI/game_menu/game_menu_options.anim]], {game_menu_x, game_menu_y + 240} )
local GameMenuMainMenu = CreatePushButton( "GameMenuMainMenu", [[GUI/game_menu/game_menu_main_menu.anim]], {game_menu_x, game_menu_y + 320} )
local GameMenuLevelText = CreateStaticText("GameMenuLevelText", "LEVEL", {350, -320}, "largest centre brady dropshadow" )
GameMenuLevelText.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
GameMenuLevelText.width = 300
GameMenuLevelText.height = 310

local GameMenuReturn = CreatePushButton( "GameMenuReturn", [[GUI\generic\back.anim]], { 170, 280 } )

GameMenuDialog = CreateModalDialog( "GameMenuDialog",
 { GameMenuOptions, GameMenuLoadReplay, GameMenuReturn, GameMenuOpen, GameMenuSave, GameMenuMainMenu, GameMenuPuzzleMap, GameMenuLevelText },
 [[GUI/game_menu/game_menu_background.anim]], {512, 332 } )
 
 
--------------------------------------------------------
-- Load levels dialog
---------------------------------------------------------
 
local LoadLevelBackButton = CreatePushButton( "LoadLevelBackButton", [[GUI\generic\back.anim]], { 350-256+150, 750-512 } )
local LoadLevelScroller = CreateScrollerButton( "LoadLevelScroller", [[GUI\generic_buttons\vertical_scroller]], {0, 0} )
local LoadLevelScrollbar = CreateScrollBar( "LoadLevelScrollbar", nil, nil, LoadLevelScroller, {505, 15} )
LoadLevelScrollbar.width = 60
LoadLevelScrollbar.height = 290
local LoadLevelListBox = CreateListBox( "LoadLevelListBox",310, 320, LoadLevelScrollbar, {120-256-25-20-38, 380-512+20-25} )

local LoadLevelDateTitle = CreatePushButton( "LoadLevelDateTitle", [[GUI\level_select\date_title.anim]], { 223, -256+12+75 } )

local LoadLevelTypeTitle = CreatePushButton( "LoadLevelTypeTitle", [[GUI\level_select\type_title.anim]], { 95, -256+12+75 } )

local LoadLevelTypeTitleDisabled = CreatePushButton( "LoadLevelTypeTitleDisabled", [[GUI\level_select\type_title_disabled.anim]], { 95, -256+12+75 } )
LoadLevelTypeTitleDisabled.enabled = false

local LoadLevelNameTitleButton = CreatePushButton( "LoadLevelNameTitleButton", [[GUI\level_select\name_title_button.anim]], { -170, -256+12+75 } )
local LoadLevelEetsHead = CreateImage( "LoadLevelEetsHead", [[GUI\level_select\eets_head.anim]], { -256-30, -256+22 } )

local LoadLevelThumbnail = CreateSprite( "LoadLevelThumbnail", [[DATA:Images\default.tga]], { 0, 0 } )
local LoadLevelThumbnailBG = CreateImage( "LoadLevelThumbnailBG", [[GUI\level_select\thumbnail_bg.anim]], { 0, 0 } )

LoadLevelDialog = CreateModalDialog( "LoadLevelDialog", 
  { LoadLevelThumbnail, LoadLevelThumbnailBG, LoadLevelNameTitleButton, LoadLevelTypeTitleDisabled, LoadLevelTypeTitle, LoadLevelEetsHead, LoadLevelBackButton, LoadLevelListBox, LoadLevelDateTitle },
  [[GUI\level_select\background.anim]], {512, 400} )
  
--------------------------------------------------------
-- Load Replays dialog
---------------------------------------------------------
 
local LoadReplayBackButton = CreatePushButton( "LoadReplayBackButton", [[GUI\generic\back.anim]], { 350-256+190, 750-512 } )
local LoadReplayScroller = CreateScrollerButton( "LoadReplayScroller", [[GUI\generic_buttons\vertical_scroller]], {0, 0} )
local LoadReplayScrollbar = CreateScrollBar( "LoadReplayScrollbar", nil, nil, LoadReplayScroller, {628, 22} )
LoadReplayScrollbar.width = 60
LoadReplayScrollbar.height = 290

local LoadReplayListBox = CreateListBox( "LoadReplayListBox",310, 320, LoadReplayScrollbar, {-280, -140} )

local LoadReplayDateTitle = CreatePushButton( "LoadReplayDateTitle", [[GUI\level_select\date_title.anim]], { 270, -256+12+75 } )

local LoadReplayPuzzleTitle = CreatePushButton( "LoadReplayPuzzleTitle", [[GUI\replay_select\puzzle_title.anim]], { 60, -256+12+75 } )

local LoadReplayNameTitleButton = CreatePushButton( "LoadReplayNameTitleButton", [[GUI\level_select\name_title_button.anim]], { -230, -256+12+75 } )
local LoadReplayEetsHead = CreateImage( "LoadReplayEetsHead", [[GUI\level_select\eets_head.anim]], { -256-85, -256+22 } )

local LoadReplayThumbnail = CreateSprite( "LoadReplayThumbnail", [[DATA:Images\default.tga]], { 350, 300 } )
local LoadReplayThumbnailBG = CreateImage( "LoadReplayThumbnailBG", [[GUI\level_select\thumbnail_bg.anim]], { 0, 0 } )

LoadReplayDialog = CreateModalDialog( "LoadReplayDialog", 
  { LoadReplayThumbnail, LoadReplayThumbnailBG, LoadReplayNameTitleButton, LoadReplayTypeTitleDisabled, LoadReplayTypeTitle, LoadReplayEetsHead, LoadReplayBackButton, LoadReplayListBox, LoadReplayDateTitle, LoadReplayPuzzleTitle },
  [[GUI\replay_select\background.anim]], {540, 400} )
  
--------------------------------------------------------
-- Level Map Dialog
---------------------------------------------------------

local LevelMapHubTitle = CreateStaticText("LevelMapHubTitle", "", { -200, -225 }, "largest brady dropshadow", { 1, -0.07 } )
LevelMapHubTitle.text_ext.colour = { r = 255, g = 160, b = 0, alpha = 255 }
LevelMapHubTitle.width = 400
LevelMapHubTitle.height = 10

local LevelMapBackButton = CreatePushButton( "LevelMapBackButton", [[GUI\generic\back.anim]], { 350-256+70, 750-412+33 } )

status_bar_offset = -10
local LevelMapStatusBar = CreateImage( "LevelMapStatusBar", [[GUI\level_map\status_bar.anim]], { 4, 325 + status_bar_offset } )

local LevelMapStatusText = CreateStaticText("LevelMapStatusText", "$01501", {0, 285 + status_bar_offset}, "largest centre brady dropshadow" )
LevelMapStatusText.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
LevelMapStatusText.width = 400
LevelMapStatusText.height = 10

local LevelMapDifficultyText = CreateStaticText("LevelMapDifficultyText", "$01502", { -125, 330 + status_bar_offset }, "larger brady dropshadow" )
LevelMapDifficultyText.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
LevelMapDifficultyText.width = 400
LevelMapDifficultyText.height = 10
LevelMapDifficultyText.visible = false

local LevelMapHubArrows = CreateImage( "LevelMapHubArrows", [[GUI\level_map\hub_arrows.anim]], { 0, -35 } )
local LevelMapHubArrowsYellow = CreateImage( "LevelMapHubArrowsYellow", [[GUI\level_map\hub_arrows_yellow.anim]], { 0, -35 } )

local LevelMapDifficulty = CreateImage( "LevelMapDifficulty", [[GUI\level_map\level_difficulty_1.anim]], { 75, 330+20 + status_bar_offset } )
LevelMapDifficulty.visible = false

local LevelMapMoreInfoText = CreateStaticText("LevelMapMoreInfoText", "", { 0, 333 + status_bar_offset }, "large brady dropshadow centre" )
LevelMapMoreInfoText.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
LevelMapMoreInfoText.width = 400
LevelMapMoreInfoText.height = 10

local LevelMapTrophy = CreateImage( "LevelMapTrophy", [[GUI\level_map\tiny_karate.anim]], { -145, 330+20 + status_bar_offset } )
LevelMapTrophy.visible = false

local LevelMapEets = CreateImage( "LevelMapEets", [[GUI\level_map\eets.anim]], { 252, -242 } )

local LevelMapThumbnail = CreateSprite( "LevelMapThumbnail", [[DATA:Images\default.tga]], { 350, 300 } )
local LevelMapThumbnailBG = CreateImage( "LevelMapThumbnailBG", [[GUI\level_select\thumbnail_bg.anim]], { 350+2, 300+2 } )

LevelMapDialog = CreateModalDialog( "LevelMapDialog", 
	{ LevelMapThumbnail, LevelMapThumbnailBG, LevelMapHubTitle, LevelMapMoreInfoText, LevelMapEets, LevelMapHubArrows, LevelMapHubArrowsYellow, LevelMapBackButton, LevelMapTrophy, LevelMapStatusText, LevelMapDifficultyText, LevelMapDifficulty, LevelMapStatusBar },
	[[GUI\level_map\level_box_introduction.anim]], {512,325} )

--------------------------------------------------------
-- Options Dialog
---------------------------------------------------------
local xoffset = -120
local yoffset = -10

 --resolutions
local OptionsDialogResolutionLable = CreateStaticText("OptionsDialogResolutionLable", "$01801", {xoffset, yoffset - 90}, "brady larger dropshadow")
OptionsDialogResolutionLable.width = 100;
OptionsDialogResolutionLable.height = 40;
OptionsDialogResolutionLable.text_ext.colour = { r = 255, g = 255, b = 255, alpha = 255 }
OptionsDialogResolutionLable.text_ext.autowrap = false;
local OptionsDialog800x600Resolution = CreateClickableText("OptionsDialog800x600Resolution", "$01802", {xoffset + 5, yoffset - 55}, "geek larger dropshadow")
OptionsDialog800x600Resolution.width = 110;
OptionsDialog800x600Resolution.height = 40;
OptionsDialog800x600Resolution.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialog800x600Resolution.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
local OptionsDialog1024x768Resolution = CreateClickableText( "OptionsDialog1024x768Resolution", "$01803", {xoffset + 135, yoffset - 55}, "geek larger dropshadow")
OptionsDialog1024x768Resolution.width = 110;
OptionsDialog1024x768Resolution.height = 40;
OptionsDialog1024x768Resolution.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialog1024x768Resolution.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
--windowed/fullscreen
local OptionsDialogFullscreenLable = CreateStaticText("OptionsDialogFullscreenLable", "$01804", {xoffset, yoffset - 13}, "brady larger dropshadow")
OptionsDialogFullscreenLable.width = 100;
OptionsDialogFullscreenLable.height = 40;
OptionsDialogFullscreenLable.text_ext.colour = {r = 255, g = 255, b = 255, alpha = 255 }
OptionsDialogFullscreenLable.text_ext.autowrap = false;
local OptionsDialogFullscreenCheckbox = CreateClickableText("OptionsDialogFullscreenCheckbox", "yes/no", {xoffset + 165, yoffset - 13}, "geek larger dropshadow")
OptionsDialogFullscreenCheckbox.width = 80;
OptionsDialogFullscreenCheckbox.height = 40;
OptionsDialogFullscreenCheckbox.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialogFullscreenCheckbox.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
--lighting enabled/disabled
local OptionsDialogLightingLable = CreateStaticText("OptionsDialogLightingLable", "$01805", {xoffset, yoffset + 22}, "brady larger dropshadow")
OptionsDialogLightingLable.width = 100;
OptionsDialogLightingLable.height = 40;
OptionsDialogLightingLable.text_ext.colour = {r = 255, g = 255, b = 255, alpha = 255 }
OptionsDialogLightingLable.text_ext.autowrap = false;
local OptionsDialogLightingButton = CreateClickableText( "OptionsDialogLightingButton", "yes/no", {xoffset + 165, yoffset + 22}, "geek larger dropshadow")
OptionsDialogLightingButton.width = 80;
OptionsDialogLightingButton.height = 40;
OptionsDialogLightingButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialogLightingButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
--music enabled/disabled
local OptionsDialogMusicLabel = CreateStaticText("OptionsDialogMusicLabel", "$01810", {xoffset, yoffset + 57}, "brady larger dropshadow")
OptionsDialogMusicLabel.width = 100;
OptionsDialogMusicLabel.height = 40;
OptionsDialogMusicLabel.text_ext.colour = {r = 255, g = 255, b = 255, alpha = 255 }
OptionsDialogMusicLabel.text_ext.autowrap = false;
local OptionsDialogMusicButton = CreateClickableText( "OptionsDialogMusicButton", "on/off", {xoffset + 165, yoffset + 57}, "geek larger dropshadow")
OptionsDialogMusicButton.width = 80;
OptionsDialogMusicButton.height = 40;
OptionsDialogMusicButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialogMusicButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
--sound enabled/disabled
local OptionsDialogSoundLabel = CreateStaticText("OptionsDialogSoundLabel", "$01811", {xoffset, yoffset + 92}, "brady larger dropshadow")
OptionsDialogSoundLabel.width = 100;
OptionsDialogSoundLabel.height = 40;
OptionsDialogSoundLabel.text_ext.colour = {r = 255, g = 255, b = 255, alpha = 255 }
OptionsDialogSoundLabel.text_ext.autowrap = false;
local OptionsDialogSoundButton = CreateClickableText( "OptionsDialogSoundButton", "on/off", {xoffset + 165, yoffset + 92}, "geek larger dropshadow")
OptionsDialogSoundButton.width = 80;
OptionsDialogSoundButton.height = 40;
OptionsDialogSoundButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
OptionsDialogSoundButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local OptionsDialogCloseButton = CreatePushButton("OptionsDialogCloseButton", [[GUI/generic/back.anim]], {100, 150} )
local OptionsDialogTitle = CreateImage("OptionsDialogTitle", [[GUI/main_menu/options_title.anim]], {0, -160} )
OptionsDialog = CreateModalDialog( "OptionsDialog",
 {	 OptionsDialogTitle, OptionsDialogCloseButton,
	 OptionsDialogResolutionLable, OptionsDialog800x600Resolution, OptionsDialog1024x768Resolution,
	 OptionsDialogFullscreenLable, OptionsDialogFullscreenCheckbox,
	 OptionsDialogLightingLable, OptionsDialogLightingButton,
	 OptionsDialogMusicLabel, OptionsDialogMusicButton,
	 OptionsDialogSoundLabel, OptionsDialogSoundButton,
	 },
 [[GUI\generic\medium_dialog.anim]], {506, 362} )
