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

local offset = -20
ClearButtonBackground = CreateImage( "ClearButtonBackground", [[GUI\control menu\button_background.anim]], { 400, 63 + offset } )
ClearButton = CreatePushButton( "ClearButton", [[GUI\control menu\ctrl_menu_clear.anim]], { 400 - 5, 63 + offset } )
ClearButton.button_ext.over_growth = 1.15
AddTooltipText(ClearButton, "$00201", "$00202")

TestButtonBackground = CreateImage( "TestButtonBackground", [[GUI\control menu\button_background.anim]], { 400, 63 + offset } )
TestButton = CreatePushButton( "TestButton", [[GUI\control menu\ctrl_menu_test_mode.anim]], { 400, 63 + offset } )
TestButton.button_ext.over_growth = 1.15
TestButton.button_ext.autofocusing = true;
AddTooltipText(TestButton, "$00203", "$00204")

ShowHintablesButtonBG = CreateImage( "ShowHintablesButtonBG", [[GUI\control menu\ctrl_menu_hint_bg.anim]], { 308, 63 + offset } )
ShowHintablesButton = CreatePushButton("ShowHintablesButton", [[GUI\control menu\ctrl_menu_hint.anim]], {308, 63 + offset} )
ShowHintablesButton.button_ext.over_growth = 1.18
AddTooltipText(ShowHintablesButton, "$00205", "$00206")

ShowSolutionButtonBG = CreateImage( "ShowSolutionButtonBG", [[GUI\control menu\button_background.anim]], { 400, 63 + 30 } )
ShowSolutionButton = CreatePushButton("ShowSolutionButton", [[GUI\control menu\ctrl_menu_off_soln.anim]], {400, 63 + 30} )
ShowSolutionButton.button_ext.over_growth = 1.15
ShowSolutionButton.button_ext.autofocusing = true;
AddTooltipText(ShowSolutionButton, "$00207", "$00208")

table.insert( BottomGroup.parent_ext.children, ClearButton )
table.insert( BottomGroup.parent_ext.children, ClearButtonBackground )
table.insert( BottomGroup.parent_ext.children, TestButton )
table.insert( BottomGroup.parent_ext.children, TestButtonBackground )
table.insert( BottomGroup.parent_ext.children, ShowHintablesButton )
table.insert( BottomGroup.parent_ext.children, ShowHintablesButtonBG )
table.insert( BottomGroup.parent_ext.children, ShowSolutionButton )
table.insert( BottomGroup.parent_ext.children, ShowSolutionButtonBG )

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

--------------------------------------------------------
-- End of Replay Dialog
---------------------------------------------------------

replay_offset_x = 0
replay_offset_y = -70
local EndOfReplayReplayAgain = CreateClickableText("EndOfReplayReplayAgain", "$00246", {replay_offset_x, replay_offset_y - 20}, "geek largest dropshadow centre" )
EndOfReplayReplayAgain.width = 300;
EndOfReplayReplayAgain.height = 50;
EndOfReplayReplayAgain.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EndOfReplayReplayAgain.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local EndOfReplayChooseReplay = CreateClickableText("EndOfReplayChooseReplay", "$00247", {replay_offset_x, replay_offset_y + 35}, "geek largest dropshadow centre" )
EndOfReplayChooseReplay.width = 300;
EndOfReplayChooseReplay.height = 100;
EndOfReplayChooseReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EndOfReplayChooseReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local EndOfReplayPuzzleMapButton = CreateClickableText("EndOfReplayPuzzleMapButton", "$00248", {replay_offset_x, replay_offset_y + 120}, "geek largest dropshadow centre" )
EndOfReplayPuzzleMapButton.width = 300;
EndOfReplayPuzzleMapButton.height = 50;
EndOfReplayPuzzleMapButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EndOfReplayPuzzleMapButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

--[[local EndOfReplayTryPuzzleButton = CreateClickableText("EndOfReplayTryPuzzleButton", "$00249", {replay_offset_x, 130 + replay_offset_y }, "geek larger dropshadow centre" )
EndOfReplayTryPuzzleButton.width = 300;
EndOfReplayTryPuzzleButton.height = 30;
EndOfReplayTryPuzzleButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EndOfReplayTryPuzzleButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }]]

EndOfReplayDialog = CreateModalDialog("EndOfReplayDialog",
	{ EndOfReplayPuzzleMapButton, EndOfReplayChooseReplay, EndOfReplayReplayAgain--[[, EndOfReplayTryPuzzleButton]] },
	[[GUI\generic\medium_dialog.anim]], {512, 320} )
	

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

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

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

TestDialog = CreateModalDialog( "TestDialog",
  { TestDialogOk, TestDialogCancel },
  [[GUI/test_level/return_to_canvas.anim]], {490, 350} )
  
---------

UnlockPuzzleDialogCongratsText = CreateStaticText( "UnlockPuzzleDialogCongratsText", [[Kaboom Desert\nUnlocked]], { 0, -220 }, "largest centre geek dropshadow" )
UnlockPuzzleDialogCongratsText.width = 350
UnlockPuzzleDialogCongratsText.height = 40
UnlockPuzzleDialogCongratsText.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }

UnlockPuzzleDialogContinue = CreateStaticText( "UnlockPuzzleDialogContinue", [[click to continue]], { 0, 140 }, "largest centre geek dropshadow" )
UnlockPuzzleDialogContinue.width = 350
UnlockPuzzleDialogContinue.height = 40
UnlockPuzzleDialogContinue.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }

UnlockPuzzleDialog = CreateAutoModalDialog( "UnlockPuzzleDialog", 
	{ 
		UnlockPuzzleDialogCongratsText,
		UnlockPuzzleDialogContinue,
	}, 
	[[world/blank.anim]], {512, 330} )

UnlockPuzzleDialog.anim_ext.auto_hitregion = false
UnlockPuzzleDialog.width = 1024
UnlockPuzzleDialog.height = 768


DeveloperBioDisplayWindowImage = CreateSprite("DeveloperBioDisplayWindowImage", [[DATA:Images/signature.png]], {300,205} )
DeveloperBioDisplayWindowImage.sprite_ext.clear_colour = { r = 251, g = 166, b = 24, alpha = 255 }
DeveloperBioDisplayWindowImage.width = 1024;
DeveloperBioDisplayWindowImage.height = 768;
DeveloperBioDisplayWindowDialog = CreateModalDialog( "DeveloperBioDisplayWindowDialog",
 { DeveloperBioText, DeveloperBioText2, DeveloperBioText3, DeveloperBioDisplayWindowClose, DeveloperBioDisplayWindowImage } )
DeveloperBioDisplayWindowDialog.position = {512, 384}
DeveloperBioDisplayWindowDialog.width = 1024;
DeveloperBioDisplayWindowDialog.height = 768;

--WON GAME DIALOG
WonGameText = CreateStaticText("WonGameText", "$01951", {-425, -330}, "larger")
WonGameText.width = 380;
WonGameText.height = 500;
WonGameText.text_ext.colour = { r = 0, g = 0, b = 0, alpha = 255 }
WonGameDialogCloseButton = CreateClickableText("WonGameDialogCloseButton", "$00511", {0, 330}, "geek largest dropshadow centre")
WonGameDialogCloseButton.width = 100;
WonGameDialogCloseButton.height = 40;
WonGameDialogCloseButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WonGameDialogCloseButton.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
WonGameDisplayWindowImage = CreateSprite("WonGameDisplayWindowImage", [[DATA:Images/eets_angry_small.png]], {220, -20} )
WonGameDisplayWindowImage.sprite_ext.clear_colour = { r = 251, g = 166, b = 24, alpha = 255 }
WonGameDisplayWindowImage.width = 1024;
WonGameDisplayWindowImage.height = 768;
WonGameDialog = CreateModalDialog( "WonGameDialog",
 { WonGameText, WonGameDialogCloseButton, WonGameDisplayWindowImage } )
WonGameDialog.position = {512, 384}
WonGameDialog.width = 1024;
WonGameDialog.height = 768;

------------------------------------------------------
-- Return to PuzzleMap dialog
--------------------------------------------------------

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

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

ReturnToPuzzleMapDialog2 = CreateModalDialog( "ReturnToPuzzleMapDialog2",
  { ReturnToPuzzleMapDialog2Yes, ReturnToPuzzleMapDialog2No }, [[GUI/go_to_puzzle_map/background.anim]], {536, 288 } )

widgets =
{
  WarrenTheWise,
  WarrenTheWiseLarge,
  WarrenTheWise2,
  WarrenTheWise2Large,
  
  -- Radial
  RadialMenu,
  
  BottomGroup,

  -- Dialogs
  LoadLevelDialog,
  LoadReplayDialog,
  LoadConfirmDialog,
  MerchLoadDialog,
  GameMenuDialog,
  QuitDialog,
  MessageBox,
  ReturnToMainMenuDialog,
  ReturnToPuzzleMapDialog,
  ReturnToPuzzleMapDialog2, --for the end of replay dialog
  TestDialog,
  UnlockPuzzleDialog,
  
  OptionsDialog,
  SaveReplayDialog,
  LevelMapDialog,
  WinDialog,
  WonGameDialog,
  EetsDeadDialog,
  WarrenTheWiseDialog,
  WarrenTheWiseDialogLarge,
  WarrenTheWise2Dialog,
  WarrenTheWise2DialogLarge,
  
  WonTrophyDialog,
  
  LoadedHubTitle,
  LoadedLevelTitle,
  LoadedLevelTitleBG,
  
  TooltipWidget,
  ClickCursor,
  
  EndOfReplayDialog,
  ReplayingText
}

tooltip = "TooltipWidget"