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

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

MenuButton = CreatePushButton( "MenuButton", [[GUI\control_menu\ctrl_menu_menu]], { 72-15, 12 } )
MenuButton.button_ext.autofocusing = true;

PlayButton = CreatePushButton( "PlayButton", [[GUI\control_menu\ctrl_menu_play]], {105-15, 55} )
PlayButton.button_ext.wait_for_motion = true

StopButton = CreatePushButton( "StopButton", [[GUI\control_menu\ctrl_menu_stop]], {105-15, 55} )
StopButton.button_ext.wait_for_motion = true

SpeedFastButton = CreatePushButton( "SpeedFastButton", [[GUI\control menu\speed_fast.anim]], {218-15, 60} )
SpeedFastButton.button_ext.over_growth = 1.2
AddTooltipText(SpeedFastButton, "$00221", "$00222")

SpeedMediumButton = CreatePushButton( "SpeedMediumButton", [[GUI\control menu\speed_medium.anim]], {196-15, 78} ) 
SpeedMediumButton.button_ext.over_growth = 1.2
AddTooltipText(SpeedMediumButton, "$00223", "$00224")

SpeedSlowButton = CreatePushButton( "SpeedSlowButton", [[GUI\control menu\speed_slow.anim]], {168-15, 84} ) 
SpeedSlowButton.button_ext.over_growth = 1.2
AddTooltipText(SpeedSlowButton, "$00225", "$00226")

EetsHead = CreateImage( "EetsHead", [[emotimeter_eets]], {172-15,16} )
EetsHead.enabled = false --when gaining focus, no need to reset Eets' head. Just keep boppin'.
--AddTooltipText(EetsHead, "Eets Head", "\nJust bobbing around,\nthis will show you if\nEets is feeling happy,\nangry, or scared.")

Gears = CreateImage( "Gears", [[GUI\control_menu\ctrl_menu_gears]], {157-15, 92} )

ControlPanel = CreateImage( "ControlPanel", [[GUI\control_menu\ctrl_menu]], { 128 + 7-15, 64 - 2 } )

Contraption = CreateImage( "Contraption", [[GUI\contraption\contraption]], {504, 54 } )
Contraption.enabled = false
ConveyerScroller = CreateScrollerButton( "ConveyerScroller", [[GUI\contraption\contraption_scroller]] )
ConveyerScrollbar = CreateScrollBar( "ConveyerScrollbar", nil, nil, ConveyerScroller, { 0, 65 } )
ConveyerScrollbar.width = 400
ConveyerScrollbar.height = 20
ConveyerScrollbar.scrollbar_ext.start_point = {0, 0 }
ConveyerScrollbar.scrollbar_ext.end_point = {1.0, 0 }
ConveyerScrollbar.scrollbar_ext.is_modal = false
ConveyerScrollbar.scrollbar_ext.scroller_offset = {0, -30}
ConveyerImage = CreateImage( "ConveyerImage", [[GUI\contraption\contraption_conveyor]], {796, 96} )
ConveyerListBox = CreateListBox( "ConveyerListBox", 400, 60, ConveyerScrollbar, { 604, 62 } )
ConveyerListBox.listbox_ext.horizontal = true
ConveyerListBox.listbox_ext.drag_and_drop = true
ConveyerListBox.listbox_ext.can_select = true
ConveyerListBox.listbox_ext.left_select_gamepad_button = 66
ConveyerListBox.listbox_ext.right_select_gamepad_button = 67
ConveyerListBox.listbox_ext.item_offset = {0, -8}
ConveyerListBox.listbox_ext.item_width = 100

BottomGroup = CreateGroup( "BottomGroup",
  { EetsHead, PlayButton, StopButton, MenuButton, SpeedFastButton, SpeedMediumButton, SpeedSlowButton, ControlPanel, Contraption, ConveyerListBox, ConveyerImage, Gears }, 1024, 162, { 0, 620+15 } )
BottomGroup.thumbnail_renderable = true

RadialMerchMerchButton = CreatePushButton( "RadialMerchMerchButton", [[default.anim]] )
--AddTooltipText(RadialMerchMerchButton, "header", "body")
RadialEmotionPlatformButton = CreatePushButton( "RadialEmotionPlatformButton", [[GUI\radial_menu\emotions.anim]] )
--AddTooltipText(RadialEmotionPlatformButton, "header", "body")
RadialSendBackwardButton = CreatePushButton( "RadialSendBackwardButton", [[GUI\radial_menu\send_backward.anim]] )
AddTooltipText(RadialSendBackwardButton, "$00279", "$00280")
RadialBringForwardButton = CreatePushButton( "RadialBringForwardButton", [[GUI\radial_menu\bring_forward.anim]] )
AddTooltipText(RadialBringForwardButton, "$00281", "$00282")
RadialFlipButton = CreatePushButton( "RadialFlipButton", [[GUI\radial_menu\flip.anim]] )
AddTooltipText(RadialFlipButton, "$00283", "$00284")
RadialRotateButton = CreatePushButton( "RadialRotateButton", [[GUI\radial_menu\rotate.anim]] )
AddTooltipText(RadialRotateButton, "$00285", "$00286")
RadialLockButton = CreatePushButton( "RadialLockButton", [[GUI\radial_menu\unlocked.anim]] )
AddTooltipText(RadialLockButton, "$00287", "$00288")
RadialSetHintableButton = CreatePushButton( "RadialSetHintableButton", [[GUI\radial_menu\unlocked.anim]] )
AddTooltipText(RadialSetHintableButton, "$00289", "$00290")
RadialEmotionButton = CreatePushButton( "RadialEmotionButton", [[GUI\radial_menu\emotions.anim]] )
AddTooltipText(RadialEmotionButton, "$00291", "$00292")
RadialPlatformPropertiesButton = CreatePushButton("RadialPlatformPropertiesButton", [[GUI\radial_menu\platforms.anim]] )
AddTooltipText(RadialPlatformPropertiesButton, "$00293", "$00294")
RadialPlatformPropertiesButton.button_ext.autofocusing = true

RadialMenu = CreateRadial( "RadialMenu",
  {RadialEmotionPlatformButton, RadialMerchMerchButton, RadialBringForwardButton, RadialSendBackwardButton, RadialFlipButton, RadialRotateButton, RadialLockButton, RadialSetHintableButton, RadialEmotionButton, RadialPlatformPropertiesButton},
  nil, {0,0} )
RadialMenu.width = 50
RadialMenu.height = 50

TooltipHeader = CreateStaticText( "TooltipHeader", "", { 0, -70 }, "larger brady dropshadow centre" )
TooltipHeader.width = 300
TooltipHeader.height = 30
TooltipHeader.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
TooltipHeader.text_ext.hover_colour = { r = 255, g = 255, b = 0, alpha = 255 }
TooltipHeader.text_ext.dropshadow_distance = 2
TooltipBody = CreateStaticText( "TooltipBody", "", { 2, -32+2 }, "tiny centre" )
TooltipBody.width = 300
TooltipBody.height = 80
TooltipWidget = CreateTooltip( "TooltipWidget", [[GUI\tooltip\tooltip.anim]], TooltipHeader, TooltipBody )

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

ReplayingText = CreateStaticText( "ReplayingText", "$00254", { 512+256+128, 0 }, "largest geek dropshadow" )
ReplayingText.text_ext.colour = { r = 255, g = 255, b = 255, alpha = 255 }
ReplayingText.width = 300
ReplayingText.height = 80

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

local x_offset = 50
local y_offset = -60
local WinDialogNextLevel = CreateClickableText("WinDialogNextLevel", "$00231", {x_offset - 10, -35+y_offset}, "geek largest dropshadow" )
WinDialogNextLevel.width = 300;
WinDialogNextLevel.height = 40;
WinDialogNextLevel.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogNextLevel.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local WinDialogReplay = CreateClickableText("WinDialogReplay", "$00232", {x_offset, 15+y_offset}, "geek larger dropshadow" )
WinDialogReplay.width = 300;
WinDialogReplay.height = 40;
WinDialogReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local WinDialogReplayLE = CreateClickableText("WinDialogReplayLE", "$00232", {x_offset, -20+y_offset}, "geek larger dropshadow" )
WinDialogReplayLE.width = 300;
WinDialogReplayLE.height = 40;
WinDialogReplayLE.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogReplayLE.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local WinDialogSaveReplay = CreateClickableText("WinDialogSaveReplay", "$00242", {x_offset, 50+y_offset}, "geek larger dropshadow" )
WinDialogSaveReplay.width = 300;
WinDialogSaveReplay.height = 40;
WinDialogSaveReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogSaveReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
WinDialogSaveReplay.button_ext.autofocusing = true;

local WinDialogSaveOfficialReplay = CreateClickableText("WinDialogSaveOfficialReplay", "$00244", {x_offset, 15+y_offset}, "geek larger dropshadow" )
WinDialogSaveOfficialReplay.width = 300;
WinDialogSaveOfficialReplay.height = 80;
WinDialogSaveOfficialReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogSaveOfficialReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
WinDialogSaveOfficialReplay.button_ext.autofocusing = true;

local WinDialogPlayAgain = CreateClickableText("WinDialogPlayAgain", "$00233", {x_offset, 85+y_offset}, "geek larger dropshadow" )
WinDialogPlayAgain.width = 300;
WinDialogPlayAgain.height = 40;
WinDialogPlayAgain.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogPlayAgain.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local WinDialogPlayAgainLE = CreateClickableText("WinDialogPlayAgainLE", "$00233", {x_offset, 80+y_offset}, "geek larger dropshadow" )
WinDialogPlayAgainLE.width = 300;
WinDialogPlayAgainLE.height = 40;
WinDialogPlayAgainLE.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogPlayAgainLE.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local WinDialogHighlight = CreateImage( "WinDialogHighlight", [[GUI\level_complete\level_complete_highlight.anim]], {-78-20,-180} )
WinDialogHighlight.anim_ext.custom_fps = 1.5;

local puzzle_found_offset = 20

local WinDialogPuzzleShard = CreateImage( "WinDialogPuzzleShard", [[GUI/level_complete/puzzle_shard.anim]], {32+128, 90 + puzzle_found_offset} )

local WinDialogFindMore = CreateImage( "WinDialogFindMore", [[GUI/level_complete/find_more.anim]], {128-8, 100 + puzzle_found_offset} )
local WinDialogFound = CreateImage( "WinDialogFound", [[GUI/level_complete/found.anim]], {128-8, 100 + puzzle_found_offset} )

local WinDialogPuzzleShardCount = CreateStaticText("WinDialogPuzzleShardCount", "9", {117, 74 + puzzle_found_offset}, "geek largest dropshadow centre" )
WinDialogPuzzleShardCount.width = 60;
WinDialogPuzzleShardCount.height = 30;
WinDialogPuzzleShardCount.text_ext.colour = { r = 255, g = 255, b = 255, alpha = 255 }

local WinDialogNextLevelAlt = CreateClickableText("WinDialogNextLevelAlt", "", {10, 70 + puzzle_found_offset}, "geek largest dropshadow" )
WinDialogNextLevelAlt.width = 280;
WinDialogNextLevelAlt.height = 60;
WinDialogNextLevelAlt.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
WinDialogNextLevelAlt.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }
WinDialogNextLevelAlt.eventcallback_ext = {}

WinDialog = CreateModalDialog( "WinDialog",
	{ 
		WinDialogNextLevel, 
		WinDialogNextLevelAlt,
		WinDialogNextHub,
		WinDialogReplay,
		WinDialogReplayLE,
		WinDialogHighlight,
		WinDialogPlayAgain,
		WinDialogPlayAgainLE,
		WinDialogPuzzleShardCount,
		WinDialogFindMore,
		WinDialogFound,
		WinDialogPuzzleShard,
		WinDialogSaveReplay,
		WinDialogSaveOfficialReplay,
	},
	[[GUI\level_complete\level_complete.anim]], {490, 350} )
  
---------------------------------------------------

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

local EetsDeadDialogSaveReplay = CreateClickableText("EetsDeadDialogSaveReplay", "$00242", {70, 30 + dead_offset}, "geek large dropshadow centre" )
EetsDeadDialogSaveReplay.width = 250;
EetsDeadDialogSaveReplay.height = 30;
EetsDeadDialogSaveReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EetsDeadDialogSaveReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local EetsDeadDialogInstantReplay = CreateClickableText("EetsDeadDialogInstantReplay", "$00232", {70, 58 + dead_offset}, "geek large dropshadow centre" )
EetsDeadDialogInstantReplay.width = 250;
EetsDeadDialogInstantReplay.height = 30;
EetsDeadDialogInstantReplay.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EetsDeadDialogInstantReplay.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

local EetsDeadDialogSkipLevel = CreateClickableText("EetsDeadDialogSkipLevel", "$00238", {70, 86 + dead_offset}, "geek large dropshadow centre" )
EetsDeadDialogSkipLevel.width = 250;
EetsDeadDialogSkipLevel.height = 30;
EetsDeadDialogSkipLevel.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
EetsDeadDialogSkipLevel.text_ext.hover_colour = { r = 0, g = 255, b = 0, alpha = 255 }

EetsDeadDialog = CreateModalDialog( "EetsDeadDialog",
  { EetsDeadDialogTryAgain, EetsDeadDialogSkipLevel, EetsDeadDialogSaveReplay, EetsDeadDialogInstantReplay },
  [[GUI/eets_dead/background.anim]], {512, 350} )
  
EetsDeadDialog.modal_ext.start_sounds = ""

local WonTrophyDialogContinueButton = CreateStaticText("WonTrophyDialogContinueButton", "$00239", {0,150}, "geek largest dropshadow centre" )
WonTrophyDialogContinueButton.width = 300;
WonTrophyDialogContinueButton.height = 40;
WonTrophyDialogContinueButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
local WonTrophyDialogCloseButton = CreateStaticText("WonTrophyDialogCloseButton", "$00240", {0,150}, "geek largest dropshadow centre" )
WonTrophyDialogCloseButton.width = 300;
WonTrophyDialogCloseButton.height = 40;
WonTrophyDialogCloseButton.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
local WonTrophyDialogTitle = CreateStaticText("WonTrophyDialogTitle", "", {0,-240}, "geek largest dropshadow centre" )
WonTrophyDialogTitle.width = 500;
WonTrophyDialogTitle.height = 40;
WonTrophyDialogTitle.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
local WonTrophyDialogDesc = CreateStaticText("WonTrophyDialogDesc", "", {0,-200}, "geek larger dropshadow centre" )
WonTrophyDialogDesc.width = 450;
WonTrophyDialogDesc.height = 40;
WonTrophyDialogDesc.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }
local WonTrophyDialogTrophyAnim = CreateImage("WonTrophyDialogTrophyAnim", [[GUI/cursor/click_arrow.anim]], {0,0} )
WonTrophyDialog = CreateAutoModalDialog( "WonTrophyDialog",
	{WonTrophyDialogContinueButton, WonTrophyDialogCloseButton, WonTrophyDialogTrophyAnim, WonTrophyDialogDesc, WonTrophyDialogTitle},
	[[World\blank.anim]], {512, 384} )

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

-- move it up a bit
LoadLevelDialog.position = {512, 350}

WarrenTheWiseDialogText = CreateStaticText( "WarrenTheWiseDialogText", "WarrenTheWiseDialogText", { -145, -56 } )
WarrenTheWiseDialogText.width = 200;
WarrenTheWiseDialogText.height = 200;
WarrenTheWiseDialogText.text_ext.colour = { r = 0, g = 0, b = 0, alpha = 255 };
WarrenTheWiseDialogText.disabled = true;
WarrenTheWiseDialog = CreateAutoModalDialog( "WarrenTheWiseDialog", 
	{ WarrenTheWiseDialogText },
	[[GUI\tutorial\warren_the_wise.anim]],
	{ 0, 0 } )
WarrenTheWiseDialog.anim_ext.auto_hitregion = false
WarrenTheWiseDialog.button_ext.over_growth = 1.0
WarrenTheWiseDialog.button_ext.under_growth = 1.0
WarrenTheWiseDialog.width = 2024
WarrenTheWiseDialog.height = 768*2

WarrenTheWiseDialogLargeText = CreateStaticText( "WarrenTheWiseDialogLargeText", "WarrenTheWiseDialogLargeText", { -145, -56 } )
WarrenTheWiseDialogLargeText.width = 200;
WarrenTheWiseDialogLargeText.height = 300;
WarrenTheWiseDialogLargeText.text_ext.colour = { r = 0, g = 0, b = 0, alpha = 255 };
WarrenTheWiseDialogLargeText.disabled = true;
WarrenTheWiseDialogLarge = CreateAutoModalDialog( "WarrenTheWiseDialogLarge", 
	{ WarrenTheWiseDialogLargeText },
	[[GUI\tutorial\warren_the_wise_large.anim]],
	{ 0, 0 } )
WarrenTheWiseDialogLarge.button_ext.over_growth = 1.0
WarrenTheWiseDialogLarge.button_ext.under_growth = 1.0
WarrenTheWiseDialogLarge.anim_ext.auto_hitregion = false
WarrenTheWiseDialogLarge.width = 2024
WarrenTheWiseDialogLarge.height = 768*2

WarrenTheWise2DialogText = CreateStaticText( "WarrenTheWise2DialogText", "WarrenTheWise2DialogText", { -145, -56 } )
WarrenTheWise2DialogText.width = 200;
WarrenTheWise2DialogText.height = 200;
WarrenTheWise2DialogText.text_ext.colour = { r = 0, g = 0, b = 0, alpha = 255 };
WarrenTheWise2DialogText.disabled = true;
WarrenTheWise2Dialog = CreateAutoModalDialog( "WarrenTheWise2Dialog", 
	{ WarrenTheWise2DialogText },
	[[GUI\tutorial\warren_the_wise2.anim]],
	{ 0, 0 } )
WarrenTheWise2Dialog.anim_ext.auto_hitregion = false
WarrenTheWise2Dialog.button_ext.over_growth = 1.0
WarrenTheWise2Dialog.button_ext.under_growth = 1.0
WarrenTheWise2Dialog.width = 2024
WarrenTheWise2Dialog.height = 768*2

WarrenTheWise2DialogLargeText = CreateStaticText( "WarrenTheWise2DialogLargeText", "WarrenTheWise2DialogLargeText", { -145, -56 } )
WarrenTheWise2DialogLargeText.width = 200;
WarrenTheWise2DialogLargeText.height = 300;
WarrenTheWise2DialogLargeText.text_ext.colour = { r = 0, g = 0, b = 0, alpha = 255 };
WarrenTheWise2DialogLargeText.disabled = true;
WarrenTheWise2DialogLarge = CreateAutoModalDialog( "WarrenTheWise2DialogLarge", 
	{ WarrenTheWise2DialogLargeText },
	[[GUI\tutorial\warren_the_wise2_large.anim]],
	{ 0, 0 } )
WarrenTheWise2DialogLarge.button_ext.over_growth = 1.0
WarrenTheWise2DialogLarge.button_ext.under_growth = 1.0
WarrenTheWise2DialogLarge.anim_ext.auto_hitregion = false
WarrenTheWise2DialogLarge.width = 2024
WarrenTheWise2DialogLarge.height = 768*2
	
--level and hub titles
LoadedHubTitle = CreateStaticText("LoadedHubTitle", "hub", {512, 75+7}, "brady larger dropshadow centre" )
LoadedHubTitle.width = 400;
LoadedHubTitle.height = 40;
LoadedHubTitle.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }

LoadedLevelTitle = CreateStaticText("LoadedLevelTitle", "level", {512, 112+7}, "brady largest dropshadow centre" )
LoadedLevelTitle.width = 500;
LoadedLevelTitle.height = 40;
LoadedLevelTitle.text_ext.colour = { r = 255, g = 255, b = 0, alpha = 255 }

LoadedLevelTitleBG = CreateImage( "LoadedLevelTitleBG", [[GUI\level_title\level_title_bg.anim]], {512,130} )

--------------------------------------------------------
-- Save Replay dialog
---------------------------------------------------------
local SaveReplayTitle = CreateStaticText("SaveReplayTitle", "$00256", {-50, -70}, "geek larger dropshadow centre", {16, 1})
SaveReplayTitle.width = 300;
SaveReplayTitle.height = 30;
SaveReplayTitle.text_ext.colour = { r = 255, g = 160, b = 0, alpha = 255 }

local SaveReplayAcceptButton = CreatePushButton("SaveReplayAcceptButton", [[GUI/generic/okay.anim]], {83-256+40, 135-128+16} )
SaveReplayAcceptButton.button_ext.additional_scale = 0.8

local SaveReplayCancelButton = CreatePushButton("SaveReplayCancelButton", [[GUI/generic/cancel.anim]], {260-256+25, 135-128+16} )
SaveReplayCancelButton.button_ext.additional_scale = 0.8

local SaveReplayEditBox = CreateEditText("SaveReplayEditBox", "filename",  {90-256+10, 110-128}, 210 )
SaveReplayEditBox.width = 200;
SaveReplayEditBox.height = 20;
SaveReplayEditBox.text_ext.autowrap = false
SaveReplayDialog = CreateModalDialog("SaveReplayDialog",
	{ SaveReplayEditBox, SaveReplayAcceptButton, SaveReplayCancelButton, SaveReplayTitle },
	[[GUI\generic\confirm_file_new.anim]], {300+256+20, 100+128+40} )
	
