local x_pos local y_pos local icon_alpha = 0.5 AddOptionsText(710, 250, "SelectText", "OPTIONS_LoadSaveTitle") x_pos = 751 y_pos = 435 AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button01", "textures/OPS/OPS_Ico_Load.tex") AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button01Sel", "textures/OPS/OPS_Ico_Load_S2.tex") AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button01Flash", "textures/OPS/OPS_Ico_Load_S3.tex") x_pos = x_pos + 185 AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button02", "textures/OPS/OPS_Ico_Save.tex") AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button02Sel", "textures/OPS/OPS_Ico_Save_S2.tex") AddIconButton(x_pos, y_pos, 128, 128, 0.8, 0.8, "LoadSaveDelete_button02Flash", "textures/OPS/OPS_Ico_Save_S3.tex") CreateSprite ({ texture = "textures/OPS/OPS_Ico_Load.tex", name = "LoadEnabled", visible= false }) CreateSprite ({ texture = "textures/OPS/OPS_Ico_Load_S5.tex", name = "LoadDisabled", visible= false }) AddButton(x_pos, y_pos, 128, 128, "LoadSaveDelete_HLButton", "textures/OPS/OPS_MObut_S2.tex") AddButton(x_pos, y_pos, 128, 128, "LoadSaveDelete_SLButton", "textures/OPS/OPS_MObut_S3.tex") for button = 1,2 do CreateTextButton_SwitchIcon ("LoadSaveDelete_button0"..button.."Select", "LoadSaveDelete_button0"..button, "LoadSaveDelete_button0"..button.."Sel", 0.9, 1.0) CreateTextButton_SwitchIcon ("LoadSaveDelete_button0"..button.."Deselect", "LoadSaveDelete_button0"..button.."Sel", "LoadSaveDelete_button0"..button, 0.8, 0.5) end x_pos = 1140 y_pos = 690 CreateTextButton ({ name="Confirm_button", text="BUTTONPROMPT_Continue", x=x_pos, y=y_pos, width=300, height=80, type="Normal", color=0xffffff00}) CreateTextButton ({ name="Confirm_button_HL", text="BUTTONPROMPT_Continue", x=x_pos, y=y_pos, width=300, height=80, type="Highlighted", color=0xffffff00 }) CreateTextButton ({ name="Confirm_button_SL", text="BUTTONPROMPT_Continue", x=x_pos, y=y_pos, width=300, height=80, type="Selected", color=0xffffff00 }) ------------------------------------------------------------------------------- -- Animations Scripts. ------------------------------------------------------------------------------- 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) CreateFlashScript("LoadSaveDelete") -- Intro animation StartScript ({name = "OnEnter"}) grow_time = 0.27; -- the time it takes each part to come in / go out gap = 0.1; -- the time between one thing starting to come in and the next -- Button animations. FadeIn ({node = "SelectText", duration = grow_time}) Fade ({node = "LoadSaveDelete_button01", duration = grow_time, alpha=icon_alpha}) Fade ({node = "LoadSaveDelete_button02", duration = grow_time, alpha=icon_alpha}) Fade({node="Confirm_button", alpha=0.3, duration = grow_time}) --FadeTitleIn () -- Button animations. --FadeIn ({node = "LoadSaveDeleteButton", duration = grow_time}) --FadeIn ({node = "StandardButton", duration = grow_time}) -- Show text. EndScript () -- Exit animation StartScript ({name = "OnExit"}) fade_out_time = 0.1; FadeOut ({node = "SelectText", duration = fade_out_time}) FadeOut ({node = "LoadSaveDelete_button01", duration = fade_out_time}) FadeOut ({node = "LoadSaveDelete_button02", duration = fade_out_time}) FadeOut ({node = "LoadSaveDelete_button01Sel", duration = fade_out_time}) FadeOut ({node = "LoadSaveDelete_button02Sel", 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 ()