-- Title local icon_alpha = 0.5 AddOptionsText(600, 155, "SelectText", "OPTIONS_ScreenPos") x_centre = 870 y_centre = 435 x_dist = 320 y_dist = 195 CreateSprite({ name = "screen_pos_ArrowLeft", texture = "textures/common/arrows/Arrow_1.tex", pos = {x = x_centre-x_dist, y = y_centre,}, rot = 0, size = {x=128, y=128}, scale = {x=0.8, y=0.8}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_ArrowLeft",}) CreateSprite({ name = "screen_pos_ArrowRight", texture = "textures/common/arrows/Arrow_1.tex", pos = {x = x_centre+x_dist, y = y_centre,}, rot = 180, size = {x=128, y=128}, scale = {x=0.8, y=0.8}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_ArrowRight",}) CreateSprite({ name = "screen_pos_Arrow_SelLeft", texture = "textures/common/arrows/Arrow_1_over.tex", pos = {x = x_centre-x_dist, y = y_centre,}, rot = 0, size = {x=128, y=128}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_Arrow_SelLeft",}) CreateSprite({ name = "screen_pos_Arrow_SelRight", texture = "textures/common/arrows/Arrow_1_over.tex", pos = {x = x_centre+x_dist, y = y_centre,}, rot = 180, size = {x=128, y=128}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_Arrow_SelRight",}) CreateSprite({ name = "screen_pos_Arrow_FlashLeft", texture = "textures/common/arrows/Arrow_1_click.tex", pos = {x = x_centre-x_dist, y = y_centre,}, rot = 0, size = {x=128, y=128}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_Arrow_FlashLeft",}) CreateSprite({ name = "screen_pos_Arrow_FlashRight", texture = "textures/common/arrows/Arrow_1_click.tex", pos = {x = x_centre+x_dist, y = y_centre,}, rot = 180, size = {x=128, y=128}, drawOrigin = "Center", color = 0XFFFFFF00 }) ConnectChild ({parent = "root", child = "screen_pos_Arrow_FlashRight",}) CreateTextButton_SwitchIcon ("screen_pos_ArrowLeftSelect", "screen_pos_ArrowLeft", "screen_pos_Arrow_SelLeft", 1.0, 1.0) CreateTextButton_SwitchIcon ("screen_pos_ArrowLeftDeselect", "screen_pos_Arrow_SelLeft", "screen_pos_ArrowLeft", 0.8, 0.5) CreateTextButton_SwitchIcon ("screen_pos_ArrowRightSelect", "screen_pos_ArrowRight", "screen_pos_Arrow_SelRight", 1.0, 1.0) CreateTextButton_SwitchIcon ("screen_pos_ArrowRightDeselect", "screen_pos_Arrow_SelRight", "screen_pos_ArrowRight", 0.8, 0.5) x_pos = 875 y_pos = 474 AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "Icon1", "textures/OPS/OPS_Ico_Load.tex") x_pos = x_pos + 100 AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "Icon2", "textures/OPS/OPS_Ico_Save.tex") x_pos = 870-150 y_pos = 435-40 CreateTextButton ({ name="Confirm_button", text="FRONTEND_Confirm", x=x_pos, y=y_pos, width=300, height=80, type="Normal", color=0xffffff00}) CreateTextButton ({ name="Confirm_button_HL", text="FRONTEND_Confirm", x=x_pos, y=y_pos, width=300, height=80, type="Highlighted", color=0xffffff00 }) CreateTextButton ({ name="Confirm_button_SL", text="FRONTEND_Confirm", x=x_pos, y=y_pos, width=300, height=80, type="Selected", color=0xffffff00 }) CreateTextButton_SelectAnimation ("HoverConfirm", "Confirm_button", "Confirm_button_HL","Confirm_button_SL", 80, 300) CreateTextButton_DeselectAnimation ("UnHoverConfirm", "Confirm_button", "Confirm_button_HL","Confirm_button_SL", 80, 300) CreateTextButton_ClickAnimation ("ClickConfirm", "Confirm_button", "Confirm_button_HL","Confirm_button_SL", 80, 300) -------------------------------------------------------- -- Intro animation -------------------------------------------------------- StartScript ({name = "OnEnter"}) grow_time = 0.27; -- the time it takes each part to come in / go out Show({node = "SelectText"}) FadeIn ({node = "SelectText", duration = grow_time}) Fade ({node = "screen_pos_ArrowLeft", alpha=icon_alpha, duration = grow_time}) Fade ({node = "screen_pos_ArrowRight", alpha=icon_alpha, duration = grow_time}) Fade({node="Confirm_button", alpha=0.3, duration = grow_time}) EndScript () StartScript ({name = "Flash_ArrowLeft"}) Show({node = "screen_pos_Arrow_FlashLeft"}); FadeIn ({node = "screen_pos_Arrow_FlashLeft", duration = 0.1}) Sleep ({duration = 0.1}) FadeOut ({node = "screen_pos_Arrow_FlashLeft", duration = 0.4}) EndScript () StartScript ({name = "Flash_ArrowRight"}) Show({node = "screen_pos_Arrow_FlashRight"}); FadeIn ({node = "screen_pos_Arrow_FlashRight", duration = 0.1}) Sleep ({duration = 0.1}) FadeOut ({node = "screen_pos_Arrow_FlashRight", duration = 0.4}) EndScript () -------------------------------------------------------- -- Exit animation -------------------------------------------------------- StartScript ({name = "OnExit"}) fade_out_time = 0.1; FadeOut ({node = "screen_pos_ArrowLeft", duration = fade_out_time}) FadeOut ({node = "screen_pos_ArrowRight", duration = fade_out_time}) FadeOut ({node = "screen_pos_Arrow_SelLeft", duration = fade_out_time}) FadeOut ({node = "screen_pos_Arrow_SelRight", duration = fade_out_time}) FadeOut ({node = "SelectText", duration = fade_out_time}) FadeOut({node="Confirm_button", duration = grow_time}) FadeOut({node="Confirm_button_HL", duration = grow_time}) FadeOut({node="Confirm_button_SL", duration = grow_time}) EndScript ()