LUA menu not activating (advanced)
Posted: Tue Jun 22, 2010 2:02 pm
by Teancum
So I'm working on a relatively simple cheat menu for the Xbox, and though I can get the "Cheats" menu item to appear in the pause menu, it won't actually push the cheats screen when you activate it. I'm not sure what I'm missing, so here's what I've got:
ingame.req
game_interface.lua
ifs_pausemenu.lua
ifs_cheats.lua
ingame.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"script"
"points"
"ifs_sideselect"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
"ifs_cheats"
"ifs_pausemenu"
"game_interface"
}
REQN
{
"texture"
"leaf"
"lightglow"
"lightsabreglow"
"statsscreens_bg"
"ambush_icon"
"blank_icon"
"bluelaser_l"
"blurmask"
"com_icon_ctfflag_all_imp"
"com_icon_ctfflag_rep_cis"
"com_sfx_laser_blue"
"com_sfx_laser_green"
"com_sfx_laser_orange"
"com_sfx_laser_purple"
"com_sfx_laser_red"
"com_sfx_laser_yellow"
"combatspeeder_icon"
"flag_team_carried"
"flag_carried"
"flag_dropped"
"flag_icon"
"fluffy"
"fx_godray"
"fx_snow"
"fx_splash"
"fxrippl1"
"greenlaser_l"
"hud_active_repair_icon"
"hud_blockaderunner_icon"
"hud_clipbar_segment"
"hud_dest_icon"
"hud_detpack_plunger"
"hud_flag_icon"
"hud_flag_timer"
"hud_herobar_saberhilt"
"hud_jetpack_and_energybar_blankfill"
"hud_jetpack_and_energybar_fill"
"hud_map_northpointer"
"hud_map_raster"
"hud_ministardestroyer_icon"
"hud_notallowed"
"hud_objective_icon"
"hud_objective_icon_circle"
"hud_objective_icon_hidden"
"hud_objective_icon_offscreen"
"hud_target_hidden"
"hud_target_hint_hidden"
"hud_target_hint_onscreen"
"hud_target_flag_onscreen"
"hud_target_onscreen"
"hud_target_pointer"
"hud_target_pointer_solid"
"hud_herobar_saberglow"
"hud_reinforcement_icon"
"hud_secondary_refire_segment"
"hud_threshold_tickmark"
"hud_infinite_ammo_icon"
"hud_player_captured_flag"
"hud_poison"
"hud_player_captured_flag"
"hud_proton_bomb"
"hud_black"
"hud_white"
"hud_vehicle_beam_cannon"
"hud_rep_weap_defense_buff_icon"
"map_mask"
"noise"
"player_icon"
"player_shadow"
"qos_veryverybad"
"redlaser_1"
"spacedust1"
"spray"
"tauntaun_kaadu_icon"
"Tooltips_BorderBox"
"troop_icon"
"turret_icon"
"walker_icon"
"weapon_scope"
"weapon_scope2"
"weapon_scope3"
"weapon_scope4"
"whitecircle"
}
REQN
{
"texture"
"platform=xbox"
"fx_ringbump"
}
REQN
{
"config"
"SoldierAnimation"
"com_sfx_weap_sc_exp_sm"
"com_sfx_weap_sc_exp_md"
"com_sfx_weap_sc_exp_lg"
"com_sfx_weap_sc_exp_xl"
"com_sfx_weap_detpack_exp"
"com_sfx_weap_beam_exp"
"com_sfx_weap_beam_exp_sm"
"com_sfx_weap_beam_exp_md"
"com_sfx_weap_beam_exp_lg"
"com_sfx_weap_beam_exp_xl"
"com_sfx_weap_flamethrower_ord"
"com_sfx_weap_remotedroid_exp"
"com_sfx_weap_remotedroidcharge2"
"com_sfx_chargeup"
"com_sfx_chunksmolder"
"com_sfx_chunktrail"
"com_sfx_chunktrail_sm"
"com_sfx_chunktrail_xs"
"com_sfx_contrail"
"com_sfx_dirtspray_lg"
"com_sfx_dirtspray_sm"
"com_sfx_dustwake"
"com_sfx_exhaust_cloudcar"
"com_sfx_exhaust_jedistarfighter"
"com_sfx_exhaust_jedistarfighter_blue"
"com_sfx_exhaust_kwing"
"com_sfx_exhaust_xwing"
"com_sfx_explosion_lg"
"com_sfx_explosion_sm"
"com_sfx_explosion_xl"
"com_sfx_explosion_xs"
"com_sfx_fireflies"
"com_sfx_landmine"
"com_sfx_ord_exp"
"com_sfx_powerup_blue"
"com_sfx_powerup_red"
"com_sfx_powerup_green"
"com_sfx_buffed_poison"
"com_sfx_buffed_offense"
"com_sfx_buffed_defense"
"com_sfx_buffed_regen"
"com_sfx_buff_offense"
"com_sfx_buff_defense"
"com_sfx_buff_regen"
"com_sfx_buff_poison"
"com_sfx_hackedvehicle"
"com_sfx_inf_damage_disintergrate"
"com_sfx_inf_damage_electricity"
"com_sfx_inf_disintergrate"
"com_sfx_inf_damage_fire"
"com_sfx_inf_damage_smoke"
"com_sfx_forcechoked"
"com_sfx_forcepushed"
"com_sfx_forcepulled"
"com_sfx_mineblink_red"
"com_sfx_mineblink_gold"
"com_sfx_mineblink_green"
"com_sfx_mineblink_blue"
"com_sfx_mineblink_purple"
"com_sfx_ord_flame"
"com_sfx_protontorpedo"
"com_sfx_rainsplash"
"com_sfx_repair"
"com_sfx_sabredeflect"
"com_sfx_sabrehit"
"com_sfx_shieldimpact_sm"
"com_sfx_shieldimpact_xl"
"com_sfx_smokeplume"
"com_sfx_timebomb"
"com_sfx_vehicleflame"
"com_sfx_vehicleflame_sc"
"com_sfx_vehicleflame_speeder"
"com_sfx_vehiclesmoke"
"com_sfx_vehiclesmoke_sc"
"com_sfx_vehiclesmoke_speeder"
"com_sfx_vehiclespark"
"com_sfx_vehiclespark_sc"
"com_sfx_vehiclespark_speeder"
"com_sfx_vehicle_exp"
"com_sfx_walkerstomp"
"com_sfx_waterbulletspray"
"com_sfx_watersplash_lg"
"com_sfx_watersplash_md"
"com_sfx_watersplash_ord"
"com_sfx_watersplash_ord_lg"
"com_sfx_watersplash_ord_md"
"com_sfx_watersplash_sm"
"com_sfx_watersplash_wade"
"com_sfx_watersplash_walker"
"com_sfx_watersplash_xs"
"com_sfx_waterwake_lg"
"com_sfx_waterwake_sm"
"com_sfx_weap_arccaster"
"com_sfx_weap_bluebolt_exp_lg"
"com_sfx_weap_bluebolt_exp_md"
"com_sfx_weap_bluebolt_exp_sm"
"com_sfx_weap_bluebolt_exp_xl"
"com_sfx_weap_bolt_exp_lg"
"com_sfx_weap_bolt_exp_md"
"com_sfx_weap_bolt_exp_sm"
"com_sfx_weap_bolt_exp_xl"
"com_sfx_weap_con_exp_lg"
"com_sfx_weap_con_exp_md"
"com_sfx_weap_con_exp_sm"
"com_sfx_weap_con_exp_xl"
"com_sfx_weap_empmortar_ord"
"com_sfx_weap_emp_exp_lg"
"com_sfx_weap_emp_exp_md"
"com_sfx_weap_emp_exp_sm"
"com_sfx_weap_emp_exp_xl"
"com_sfx_weap_flame_exp_lg"
"com_sfx_weap_flame_exp_md"
"com_sfx_weap_flame_exp_sm"
"com_sfx_weap_flame_exp_xl"
"com_sfx_weap_greenbolt_exp_lg"
"com_sfx_weap_greenbolt_exp_md"
"com_sfx_weap_greenbolt_exp_sm"
"com_sfx_weap_greenbolt_exp_xl"
"com_sfx_weap_grenade_blue"
"com_sfx_weap_grenade_emp_exp"
"com_sfx_weap_grenade_gold"
"com_sfx_weap_grenade_green"
"com_sfx_weap_grenade_radiation_exp"
"com_sfx_weap_grenade_red"
"com_sfx_weap_grenade_schrap_exp"
"com_sfx_weap_grenade_thermal"
"com_sfx_weap_grenade_thermal_exp"
"com_sfx_weap_incinerate_ord"
"com_sfx_weap_incinerate_ord_exp"
"com_sfx_lightning"
"com_sfx_weap_mortartrail_blue"
"com_sfx_weap_mortartrail_red"
"com_sfx_weap_mortartrail_yellow"
"com_sfx_weap_orangebolt_exp_lg"
"com_sfx_weap_orangebolt_exp_md"
"com_sfx_weap_orangebolt_exp_sm"
"com_sfx_weap_orangebolt_exp_xl"
"com_sfx_weap_purplebolt_exp_lg"
"com_sfx_weap_purplebolt_exp_md"
"com_sfx_weap_purplebolt_exp_sm"
"com_sfx_weap_purplebolt_exp_xl"
"com_sfx_weap_rad_exp_lg"
"com_sfx_weap_rad_exp_md"
"com_sfx_weap_rad_exp_sm"
"com_sfx_weap_rad_exp_xl"
"com_sfx_weap_redbolt_exp_lg"
"com_sfx_weap_redbolt_exp_md"
"com_sfx_weap_redbolt_exp_sm"
"com_sfx_weap_redbolt_exp_xl"
"com_sfx_weap_rockettrail"
"com_sfx_weap_rockettrail_blue"
"com_sfx_weap_rockettrail_gold"
"com_sfx_weap_rockettrail_green"
"com_sfx_weap_rockettrail_purple"
"com_sfx_weap_seismiccharge"
"com_sfx_weap_shiplaser_exp_lg"
"com_sfx_weap_shiplaser_exp_md"
"com_sfx_weap_shiplaser_exp_sm"
"com_sfx_weap_spyrifle_ord"
"com_sfx_weap_timebomb"
"com_sfx_weap_yellowbolt_exp_lg"
"com_weap_overheat"
"com_sfx_muzzleflash_lg"
}
REQN
{
"animbank"
"human"
"humanfp"
"humanlz"
}
REQN
{
"model"
"all_weap_inf_thermaldetonator"
"cis_weap_inf_thermaldetonator"
"imp_weap_inf_thermaldetonator"
"rep_weap_inf_thermaldetonator"
"com_weap_inf_thermaldetonator"
"com_item_powerup_dual"
"com_weap_inf_grenadethermal"
"com_weap_inf_grenadethermal_ord"
"com_1st_weap_inf_grenadethermal"
"com_weap_inf_torpedo"
"com_1st_weap_inf_torpedo"
"com_weap_inf_medkit"
"com_weap_inf_repairkit"
"com_weap_missile"
"com_bldg_controlzone"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase"
"com_bldg_inf_defenseturret"
"com_icon_alliance"
"com_icon_imperial"
"com_icon_republic"
"com_icon_CIS"
"com_icon_swap"
"com_weap_probedroid"
"com_smallchunk1"
"com_mediumchunk1"
"com_weap_inf_landmine"
"com_weap_inf_seismic_mine"
"com_weap_inf_detpack"
"coll_drive"
"com_sfx_muzzleflash"
"com_prop_buildzone"
"shell_cube"
"com_weap_inf_binoculars"
"hud_arrow"
"hud_map_fov"
"hud_large_map_fov"
"hud_main_reticule"
"hud_main_reticule_bullseye"
"hud_main_reticule_hit"
"hud_main_reticule_outline"
"hud_main_reticule_criticalhit"
"hud_main_reticule_rocketlockon_active"
"hud_energybar_frame_front"
"hud_energybar_frame_back"
"hud_jetpackbar_frame_front"
"hud_jetpackbar_frame_back"
"hud_vehicle_seatingchart_ai_icon"
"hud_vehicle_seatingchart_empty_icon"
"hud_vehicle_seatingchart_player1_icon"
"hud_weapon_backdrop"
"hud_weapon2_backdrop"
"hud_thermaldetonator"
"hud_detpack_plunger"
"hud_vehicle_lasers"
"hud_vehicle_bombs"
"hud_vehicle_chaingun"
"hud_vehicle_guided_rocket"
"hud_vehicle_flak"
"hud_vehicle_missile"
"hud_vehicle_mortar"
"hud_vehicle_stingers"
"hud_vehicle_recoiless"
"hud_vehicle_torpedo"
"hud_vehicle_beam_cannon"
"hud_hint_backdrop"
"hud_healthbar_frame"
"hud_tooltips_frame"
"hud_infinite_ammo_icon"
"hud_lightsaber"
"hud_force_choke"
"hud_force_saberthrow"
"hud_force_pull"
"hud_force_push"
"hud_force_lightning"
"hud_poison"
"hud_rage"
"hud_rep_weap_defense_buff_icon"
"hud_health_regen"
}
REQN
{
"class"
"com_item_vehicle_spawn"
"com_item_powerup_ammo"
"com_item_powerup_health100"
"com_item_powerup_health25"
"com_item_powerup_dual"
"com_item_powerup_offense"
"com_item_powerup_defense"
"com_item_powerup_energy"
"com_item_weaponrecharge"
"com_item_weaponrecharge_unbuilt"
"com_item_hero_healthrecharge"
"com_item_healthrecharge"
"com_item_healthrecharge_unbuilt"
"com_item_flag"
"com_item_flag_all_carried"
"com_item_flag_cis_carried"
"com_item_flag_imp_carried"
"com_item_flag_rep_carried"
"com_item_null"
"com_item_holocron"
"com_item_flag_all"
"com_item_flag_cis"
"com_item_flag_imp"
"com_item_flag_rep"
"com_prop_barrier_01"
"com_weap_ord_exp"
"com_snd_amb_streaming"
"com_snd_amb_static"
"com_bldg_controlzone"
"com_bldg_controlzone_ctf"
"com_bldg_untakeable_controlzone"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase"
"com_bldg_invisible_controlzone"
"com_bldg_major_controlzone"
"com_bldg_inf_defenseturret"
"com_weap_inf_seismic_mine"
"com_prop_buildzone"
"com_weap_inf_landmine_placed"
"com_weap_inf_landmine"
"com_weap_inf_empmine"
"com_prop_barrier_02"
"com_prop_cratemd_01"
"com_prop_barrel"
"com_prop_cratelg_01"
"com_holo_trap"
"com_inv_col_8"
"com_inv_col_16"
"com_inv_col_32"
"com_inv_col_64"
"com_inf_default"
"com_weap_inf_force_lightning"
"com_weap_inf_force_pull"
"com_weap_inf_force_push"
}
REQN
{
"config"
"hudtransforms"
"1playerhud"
"2playerhud"
"3playerhud"
"4playerhud"
}
REQN
{
"class"
"com_item_vehiclerecharge"
"com_item_vehiclerecharge_unbuilt"
}
}[/code]
{
REQN
{
"script"
"points"
"ifs_sideselect"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
"ifs_cheats"
"ifs_pausemenu"
"game_interface"
}
REQN
{
"texture"
"leaf"
"lightglow"
"lightsabreglow"
"statsscreens_bg"
"ambush_icon"
"blank_icon"
"bluelaser_l"
"blurmask"
"com_icon_ctfflag_all_imp"
"com_icon_ctfflag_rep_cis"
"com_sfx_laser_blue"
"com_sfx_laser_green"
"com_sfx_laser_orange"
"com_sfx_laser_purple"
"com_sfx_laser_red"
"com_sfx_laser_yellow"
"combatspeeder_icon"
"flag_team_carried"
"flag_carried"
"flag_dropped"
"flag_icon"
"fluffy"
"fx_godray"
"fx_snow"
"fx_splash"
"fxrippl1"
"greenlaser_l"
"hud_active_repair_icon"
"hud_blockaderunner_icon"
"hud_clipbar_segment"
"hud_dest_icon"
"hud_detpack_plunger"
"hud_flag_icon"
"hud_flag_timer"
"hud_herobar_saberhilt"
"hud_jetpack_and_energybar_blankfill"
"hud_jetpack_and_energybar_fill"
"hud_map_northpointer"
"hud_map_raster"
"hud_ministardestroyer_icon"
"hud_notallowed"
"hud_objective_icon"
"hud_objective_icon_circle"
"hud_objective_icon_hidden"
"hud_objective_icon_offscreen"
"hud_target_hidden"
"hud_target_hint_hidden"
"hud_target_hint_onscreen"
"hud_target_flag_onscreen"
"hud_target_onscreen"
"hud_target_pointer"
"hud_target_pointer_solid"
"hud_herobar_saberglow"
"hud_reinforcement_icon"
"hud_secondary_refire_segment"
"hud_threshold_tickmark"
"hud_infinite_ammo_icon"
"hud_player_captured_flag"
"hud_poison"
"hud_player_captured_flag"
"hud_proton_bomb"
"hud_black"
"hud_white"
"hud_vehicle_beam_cannon"
"hud_rep_weap_defense_buff_icon"
"map_mask"
"noise"
"player_icon"
"player_shadow"
"qos_veryverybad"
"redlaser_1"
"spacedust1"
"spray"
"tauntaun_kaadu_icon"
"Tooltips_BorderBox"
"troop_icon"
"turret_icon"
"walker_icon"
"weapon_scope"
"weapon_scope2"
"weapon_scope3"
"weapon_scope4"
"whitecircle"
}
REQN
{
"texture"
"platform=xbox"
"fx_ringbump"
}
REQN
{
"config"
"SoldierAnimation"
"com_sfx_weap_sc_exp_sm"
"com_sfx_weap_sc_exp_md"
"com_sfx_weap_sc_exp_lg"
"com_sfx_weap_sc_exp_xl"
"com_sfx_weap_detpack_exp"
"com_sfx_weap_beam_exp"
"com_sfx_weap_beam_exp_sm"
"com_sfx_weap_beam_exp_md"
"com_sfx_weap_beam_exp_lg"
"com_sfx_weap_beam_exp_xl"
"com_sfx_weap_flamethrower_ord"
"com_sfx_weap_remotedroid_exp"
"com_sfx_weap_remotedroidcharge2"
"com_sfx_chargeup"
"com_sfx_chunksmolder"
"com_sfx_chunktrail"
"com_sfx_chunktrail_sm"
"com_sfx_chunktrail_xs"
"com_sfx_contrail"
"com_sfx_dirtspray_lg"
"com_sfx_dirtspray_sm"
"com_sfx_dustwake"
"com_sfx_exhaust_cloudcar"
"com_sfx_exhaust_jedistarfighter"
"com_sfx_exhaust_jedistarfighter_blue"
"com_sfx_exhaust_kwing"
"com_sfx_exhaust_xwing"
"com_sfx_explosion_lg"
"com_sfx_explosion_sm"
"com_sfx_explosion_xl"
"com_sfx_explosion_xs"
"com_sfx_fireflies"
"com_sfx_landmine"
"com_sfx_ord_exp"
"com_sfx_powerup_blue"
"com_sfx_powerup_red"
"com_sfx_powerup_green"
"com_sfx_buffed_poison"
"com_sfx_buffed_offense"
"com_sfx_buffed_defense"
"com_sfx_buffed_regen"
"com_sfx_buff_offense"
"com_sfx_buff_defense"
"com_sfx_buff_regen"
"com_sfx_buff_poison"
"com_sfx_hackedvehicle"
"com_sfx_inf_damage_disintergrate"
"com_sfx_inf_damage_electricity"
"com_sfx_inf_disintergrate"
"com_sfx_inf_damage_fire"
"com_sfx_inf_damage_smoke"
"com_sfx_forcechoked"
"com_sfx_forcepushed"
"com_sfx_forcepulled"
"com_sfx_mineblink_red"
"com_sfx_mineblink_gold"
"com_sfx_mineblink_green"
"com_sfx_mineblink_blue"
"com_sfx_mineblink_purple"
"com_sfx_ord_flame"
"com_sfx_protontorpedo"
"com_sfx_rainsplash"
"com_sfx_repair"
"com_sfx_sabredeflect"
"com_sfx_sabrehit"
"com_sfx_shieldimpact_sm"
"com_sfx_shieldimpact_xl"
"com_sfx_smokeplume"
"com_sfx_timebomb"
"com_sfx_vehicleflame"
"com_sfx_vehicleflame_sc"
"com_sfx_vehicleflame_speeder"
"com_sfx_vehiclesmoke"
"com_sfx_vehiclesmoke_sc"
"com_sfx_vehiclesmoke_speeder"
"com_sfx_vehiclespark"
"com_sfx_vehiclespark_sc"
"com_sfx_vehiclespark_speeder"
"com_sfx_vehicle_exp"
"com_sfx_walkerstomp"
"com_sfx_waterbulletspray"
"com_sfx_watersplash_lg"
"com_sfx_watersplash_md"
"com_sfx_watersplash_ord"
"com_sfx_watersplash_ord_lg"
"com_sfx_watersplash_ord_md"
"com_sfx_watersplash_sm"
"com_sfx_watersplash_wade"
"com_sfx_watersplash_walker"
"com_sfx_watersplash_xs"
"com_sfx_waterwake_lg"
"com_sfx_waterwake_sm"
"com_sfx_weap_arccaster"
"com_sfx_weap_bluebolt_exp_lg"
"com_sfx_weap_bluebolt_exp_md"
"com_sfx_weap_bluebolt_exp_sm"
"com_sfx_weap_bluebolt_exp_xl"
"com_sfx_weap_bolt_exp_lg"
"com_sfx_weap_bolt_exp_md"
"com_sfx_weap_bolt_exp_sm"
"com_sfx_weap_bolt_exp_xl"
"com_sfx_weap_con_exp_lg"
"com_sfx_weap_con_exp_md"
"com_sfx_weap_con_exp_sm"
"com_sfx_weap_con_exp_xl"
"com_sfx_weap_empmortar_ord"
"com_sfx_weap_emp_exp_lg"
"com_sfx_weap_emp_exp_md"
"com_sfx_weap_emp_exp_sm"
"com_sfx_weap_emp_exp_xl"
"com_sfx_weap_flame_exp_lg"
"com_sfx_weap_flame_exp_md"
"com_sfx_weap_flame_exp_sm"
"com_sfx_weap_flame_exp_xl"
"com_sfx_weap_greenbolt_exp_lg"
"com_sfx_weap_greenbolt_exp_md"
"com_sfx_weap_greenbolt_exp_sm"
"com_sfx_weap_greenbolt_exp_xl"
"com_sfx_weap_grenade_blue"
"com_sfx_weap_grenade_emp_exp"
"com_sfx_weap_grenade_gold"
"com_sfx_weap_grenade_green"
"com_sfx_weap_grenade_radiation_exp"
"com_sfx_weap_grenade_red"
"com_sfx_weap_grenade_schrap_exp"
"com_sfx_weap_grenade_thermal"
"com_sfx_weap_grenade_thermal_exp"
"com_sfx_weap_incinerate_ord"
"com_sfx_weap_incinerate_ord_exp"
"com_sfx_lightning"
"com_sfx_weap_mortartrail_blue"
"com_sfx_weap_mortartrail_red"
"com_sfx_weap_mortartrail_yellow"
"com_sfx_weap_orangebolt_exp_lg"
"com_sfx_weap_orangebolt_exp_md"
"com_sfx_weap_orangebolt_exp_sm"
"com_sfx_weap_orangebolt_exp_xl"
"com_sfx_weap_purplebolt_exp_lg"
"com_sfx_weap_purplebolt_exp_md"
"com_sfx_weap_purplebolt_exp_sm"
"com_sfx_weap_purplebolt_exp_xl"
"com_sfx_weap_rad_exp_lg"
"com_sfx_weap_rad_exp_md"
"com_sfx_weap_rad_exp_sm"
"com_sfx_weap_rad_exp_xl"
"com_sfx_weap_redbolt_exp_lg"
"com_sfx_weap_redbolt_exp_md"
"com_sfx_weap_redbolt_exp_sm"
"com_sfx_weap_redbolt_exp_xl"
"com_sfx_weap_rockettrail"
"com_sfx_weap_rockettrail_blue"
"com_sfx_weap_rockettrail_gold"
"com_sfx_weap_rockettrail_green"
"com_sfx_weap_rockettrail_purple"
"com_sfx_weap_seismiccharge"
"com_sfx_weap_shiplaser_exp_lg"
"com_sfx_weap_shiplaser_exp_md"
"com_sfx_weap_shiplaser_exp_sm"
"com_sfx_weap_spyrifle_ord"
"com_sfx_weap_timebomb"
"com_sfx_weap_yellowbolt_exp_lg"
"com_weap_overheat"
"com_sfx_muzzleflash_lg"
}
REQN
{
"animbank"
"human"
"humanfp"
"humanlz"
}
REQN
{
"model"
"all_weap_inf_thermaldetonator"
"cis_weap_inf_thermaldetonator"
"imp_weap_inf_thermaldetonator"
"rep_weap_inf_thermaldetonator"
"com_weap_inf_thermaldetonator"
"com_item_powerup_dual"
"com_weap_inf_grenadethermal"
"com_weap_inf_grenadethermal_ord"
"com_1st_weap_inf_grenadethermal"
"com_weap_inf_torpedo"
"com_1st_weap_inf_torpedo"
"com_weap_inf_medkit"
"com_weap_inf_repairkit"
"com_weap_missile"
"com_bldg_controlzone"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase"
"com_bldg_inf_defenseturret"
"com_icon_alliance"
"com_icon_imperial"
"com_icon_republic"
"com_icon_CIS"
"com_icon_swap"
"com_weap_probedroid"
"com_smallchunk1"
"com_mediumchunk1"
"com_weap_inf_landmine"
"com_weap_inf_seismic_mine"
"com_weap_inf_detpack"
"coll_drive"
"com_sfx_muzzleflash"
"com_prop_buildzone"
"shell_cube"
"com_weap_inf_binoculars"
"hud_arrow"
"hud_map_fov"
"hud_large_map_fov"
"hud_main_reticule"
"hud_main_reticule_bullseye"
"hud_main_reticule_hit"
"hud_main_reticule_outline"
"hud_main_reticule_criticalhit"
"hud_main_reticule_rocketlockon_active"
"hud_energybar_frame_front"
"hud_energybar_frame_back"
"hud_jetpackbar_frame_front"
"hud_jetpackbar_frame_back"
"hud_vehicle_seatingchart_ai_icon"
"hud_vehicle_seatingchart_empty_icon"
"hud_vehicle_seatingchart_player1_icon"
"hud_weapon_backdrop"
"hud_weapon2_backdrop"
"hud_thermaldetonator"
"hud_detpack_plunger"
"hud_vehicle_lasers"
"hud_vehicle_bombs"
"hud_vehicle_chaingun"
"hud_vehicle_guided_rocket"
"hud_vehicle_flak"
"hud_vehicle_missile"
"hud_vehicle_mortar"
"hud_vehicle_stingers"
"hud_vehicle_recoiless"
"hud_vehicle_torpedo"
"hud_vehicle_beam_cannon"
"hud_hint_backdrop"
"hud_healthbar_frame"
"hud_tooltips_frame"
"hud_infinite_ammo_icon"
"hud_lightsaber"
"hud_force_choke"
"hud_force_saberthrow"
"hud_force_pull"
"hud_force_push"
"hud_force_lightning"
"hud_poison"
"hud_rage"
"hud_rep_weap_defense_buff_icon"
"hud_health_regen"
}
REQN
{
"class"
"com_item_vehicle_spawn"
"com_item_powerup_ammo"
"com_item_powerup_health100"
"com_item_powerup_health25"
"com_item_powerup_dual"
"com_item_powerup_offense"
"com_item_powerup_defense"
"com_item_powerup_energy"
"com_item_weaponrecharge"
"com_item_weaponrecharge_unbuilt"
"com_item_hero_healthrecharge"
"com_item_healthrecharge"
"com_item_healthrecharge_unbuilt"
"com_item_flag"
"com_item_flag_all_carried"
"com_item_flag_cis_carried"
"com_item_flag_imp_carried"
"com_item_flag_rep_carried"
"com_item_null"
"com_item_holocron"
"com_item_flag_all"
"com_item_flag_cis"
"com_item_flag_imp"
"com_item_flag_rep"
"com_prop_barrier_01"
"com_weap_ord_exp"
"com_snd_amb_streaming"
"com_snd_amb_static"
"com_bldg_controlzone"
"com_bldg_controlzone_ctf"
"com_bldg_untakeable_controlzone"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase"
"com_bldg_invisible_controlzone"
"com_bldg_major_controlzone"
"com_bldg_inf_defenseturret"
"com_weap_inf_seismic_mine"
"com_prop_buildzone"
"com_weap_inf_landmine_placed"
"com_weap_inf_landmine"
"com_weap_inf_empmine"
"com_prop_barrier_02"
"com_prop_cratemd_01"
"com_prop_barrel"
"com_prop_cratelg_01"
"com_holo_trap"
"com_inv_col_8"
"com_inv_col_16"
"com_inv_col_32"
"com_inv_col_64"
"com_inf_default"
"com_weap_inf_force_lightning"
"com_weap_inf_force_pull"
"com_weap_inf_force_push"
}
REQN
{
"config"
"hudtransforms"
"1playerhud"
"2playerhud"
"3playerhud"
"4playerhud"
}
REQN
{
"class"
"com_item_vehiclerecharge"
"com_item_vehiclerecharge_unbuilt"
}
}[/code]
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Master include for StarWars: Frontline ingame interface, lua
-- component. The game should be able to include this file and nothing
-- else.
gPlatformStr = ScriptCB_GetPlatform()
-- Note: we don't call ScriptCB_GetOnlineService(), which returns what
-- the binary was compiled for (XLive vs GameSpy). We want the current
-- connection type, which is "LAN", "XLive" or "GameSpy"
gOnlineServiceStr = ScriptCB_GetConnectType()
-- gOnlineServiceStr = ScriptCB_GetOnlineService()
gLangStr,gLangEnum = ScriptCB_GetLanguage()
-- Load designer-specified globals
ScriptCB_DoFile("globals")
-- Load player stats points
ScriptCB_DoFile("points")
-- Load utility functions
ScriptCB_DoFile("interface_util")
ScriptCB_DoFile("ifelem_button")
ScriptCB_DoFile("ifelem_roundbutton")
ScriptCB_DoFile("ifelem_flatbutton")
ScriptCB_DoFile("ifelem_buttonwindow")
ScriptCB_DoFile("ifelem_segline")
ScriptCB_DoFile("ifelem_popup")
ScriptCB_DoFile("ifelem_listmanager")
ScriptCB_DoFile("ifelem_helptext")
ScriptCB_DoFile("ifelem_shellscreen")
ScriptCB_DoFile("ifelem_titlebar")
ScriptCB_DoFile("ifelem_borderrect")
ScriptCB_DoFile("ifelem_hslider")
ScriptCB_DoFile("ifelem_form")
ScriptCB_DoFile("ifelem_AnimationMgr")
ScriptCB_DoFile("ifs_movietrans_game")
ScriptCB_DoFile("ifs_opt_top")
ScriptCB_DoFile("ifs_opt_controller_mode")
ScriptCB_DoFile("controller_presets")
ScriptCB_DoFile("ifs_opt_controller_common")
ScriptCB_DoFile("ifs_opt_controller_vehunit")
ScriptCB_DoFile("ifs_opt_general")
ScriptCB_DoFile("ifs_opt_sound")
ScriptCB_DoFile("ifs_opt_mp_listtags")
ScriptCB_DoFile("ifs_opt_mp")
ScriptCB_DoFile("ifs_sideselect")
ScriptCB_DoFile("ifs_charselect")
ScriptCB_DoFile("ifs_mapselect")
ScriptCB_DoFile("ifs_readyselect")
ScriptCB_DoFile("popups_common")
ScriptCB_DoFile("popup_ok")
ScriptCB_DoFile("popup_ab")
ScriptCB_DoFile("popup_busy")
ScriptCB_DoFile("popup_yesno")
ScriptCB_DoFile("popup_yesno_large")
ScriptCB_DoFile("error_popup")
ScriptCB_DoFile("ifs_pausemenu")
ScriptCB_DoFile("ifs_cheats")
ScriptCB_DoFile("ifs_teamstats")
ScriptCB_DoFile("ifs_personalstats")
ScriptCB_DoFile("ifs_awardstats")
ScriptCB_DoFile("ifs_careerstats")
ScriptCB_DoFile("ifs_mp_lobby")
ScriptCB_DoFile("popups_lobby")
ScriptCB_DoFile("popup_vote")
-- Pull in XBox-only pages (with mpxl in the name)
ScriptCB_DoFile("ifs_mpxl_friends")
ScriptCB_DoFile("ifs_mpxl_feedback")
ScriptCB_DoFile("ifs_mpxl_voicemail")
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Master include for StarWars: Frontline ingame interface, lua
-- component. The game should be able to include this file and nothing
-- else.
gPlatformStr = ScriptCB_GetPlatform()
-- Note: we don't call ScriptCB_GetOnlineService(), which returns what
-- the binary was compiled for (XLive vs GameSpy). We want the current
-- connection type, which is "LAN", "XLive" or "GameSpy"
gOnlineServiceStr = ScriptCB_GetConnectType()
-- gOnlineServiceStr = ScriptCB_GetOnlineService()
gLangStr,gLangEnum = ScriptCB_GetLanguage()
-- Load designer-specified globals
ScriptCB_DoFile("globals")
-- Load player stats points
ScriptCB_DoFile("points")
-- Load utility functions
ScriptCB_DoFile("interface_util")
ScriptCB_DoFile("ifelem_button")
ScriptCB_DoFile("ifelem_roundbutton")
ScriptCB_DoFile("ifelem_flatbutton")
ScriptCB_DoFile("ifelem_buttonwindow")
ScriptCB_DoFile("ifelem_segline")
ScriptCB_DoFile("ifelem_popup")
ScriptCB_DoFile("ifelem_listmanager")
ScriptCB_DoFile("ifelem_helptext")
ScriptCB_DoFile("ifelem_shellscreen")
ScriptCB_DoFile("ifelem_titlebar")
ScriptCB_DoFile("ifelem_borderrect")
ScriptCB_DoFile("ifelem_hslider")
ScriptCB_DoFile("ifelem_form")
ScriptCB_DoFile("ifelem_AnimationMgr")
ScriptCB_DoFile("ifs_movietrans_game")
ScriptCB_DoFile("ifs_opt_top")
ScriptCB_DoFile("ifs_opt_controller_mode")
ScriptCB_DoFile("controller_presets")
ScriptCB_DoFile("ifs_opt_controller_common")
ScriptCB_DoFile("ifs_opt_controller_vehunit")
ScriptCB_DoFile("ifs_opt_general")
ScriptCB_DoFile("ifs_opt_sound")
ScriptCB_DoFile("ifs_opt_mp_listtags")
ScriptCB_DoFile("ifs_opt_mp")
ScriptCB_DoFile("ifs_sideselect")
ScriptCB_DoFile("ifs_charselect")
ScriptCB_DoFile("ifs_mapselect")
ScriptCB_DoFile("ifs_readyselect")
ScriptCB_DoFile("popups_common")
ScriptCB_DoFile("popup_ok")
ScriptCB_DoFile("popup_ab")
ScriptCB_DoFile("popup_busy")
ScriptCB_DoFile("popup_yesno")
ScriptCB_DoFile("popup_yesno_large")
ScriptCB_DoFile("error_popup")
ScriptCB_DoFile("ifs_pausemenu")
ScriptCB_DoFile("ifs_cheats")
ScriptCB_DoFile("ifs_teamstats")
ScriptCB_DoFile("ifs_personalstats")
ScriptCB_DoFile("ifs_awardstats")
ScriptCB_DoFile("ifs_careerstats")
ScriptCB_DoFile("ifs_mp_lobby")
ScriptCB_DoFile("popups_lobby")
ScriptCB_DoFile("popup_vote")
-- Pull in XBox-only pages (with mpxl in the name)
ScriptCB_DoFile("ifs_mpxl_friends")
ScriptCB_DoFile("ifs_mpxl_feedback")
ScriptCB_DoFile("ifs_mpxl_voicemail")
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Ingame pause menu
ifspausemenu_vbutton_layout = {
ySpacing = 5,
width = 260,
font = gMenuButtonFont,
buttonlist = {
{ tag = "resume", string = "common.resume", },
{ tag = "lobby", string = "game.pause.playerlist", },
{ tag = "friends", string = "ifs.onlinelobby.friendslist", },
{ tag = "freecam", string = "game.pause.freecam", },
{ tag = "cheats", string = "Cheats", },
{ tag = "opts", string = "ifs.main.options", },
{ tag = "suicide", string = "game.pause.suicide", },
{ tag = "recent", string = "common.mp.recent", },
{ tag = "restart", string = "common.restart", },
{ tag = "quit", string = "common.quit", },
{ tag = "exit", string = "common.quit2windows", },
},
title = "game.pause.title",
}
-- Turns pieces on/off as requested
function ifs_pausemenu_fnSetPieceVis(this, bVis)
IFObj_fnSetVis(this.buttons,bVis)
end
-- Sets text for the camera entry to the right settings
function ifs_pausemenu_fnUpdateFreecamText(this)
if(this.buttons.freecam) then
if(this.bChaseCam) then
RoundIFButtonLabel_fnSetString(this.buttons.freecam,"game.pause.followcam")
else
RoundIFButtonLabel_fnSetString(this.buttons.freecam,"game.pause.freecam")
end
end
end
function ifs_pausemenu_fnGetActiveInstance()
local Active = ScriptCB_GetPausingViewport()
if (Active == 0) then
return ifs_pausemenu
elseif (Active == 1) then
return ifs_pausemenu2
elseif (Active == 2) then
return ifs_pausemenu3
elseif (Active == 3) then
return ifs_pausemenu4
end
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnQuitPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("quit", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_QuitToShell()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnExitPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("exit", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_QuitToWindows()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnSuicidePopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("suicide", this)
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_PlayerSuicide(this.Viewport) -- top player
ScriptCB_Unpause(this.Viewport)
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really restart?" popup is over. If bResult is
-- true, user wanted to restart
function ifs_pausemenu_fnRestartPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("restart", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_RestartMission()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
function ifs_pausemenu_fnDoExit()
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnExitPopupDone
ifs_pausemenu_fnSetPieceVis(ifs_pausemenu, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.main.askquit")
end
function ifs_pausemenu_fnJustExit()
ifs_pausemenu_fnExitPopupDone(true)
end
function ifs_pausemenu_fnSaveProfileCancel()
-- print("ifs_pausemenu_fnSaveProfileCancel")
-- back to the "its dirty, save?" prompt when we enter
--ifs_pausemenu.TryToBackup = 1
-- pop ifs_saveop, return to ifs_pausemenu
ScriptCB_PopScreen()
end
function ifs_pausemenu_fnSaveDirtyAcceptQuit(fRet)
Popup_LoadSave2.fnAccept = nil
Popup_LoadSave2:fnActivate(nil)
ifs_pausemenu.do_save = nil
if(fRet < 1.5) then
-- print("ifs_pausemenu_SaveDirtyAccept(A - Save)")
ifs_pausemenu.do_save = 1
ifs_saveop.doOp = "SaveProfile"
ifs_saveop.OnSuccess = ifs_pausemenu_fnJustExit --ifs_pausemenu_fnDoExit
ifs_saveop.OnCancel = ifs_pausemenu_fnSaveProfileCancel
local iProfileIdx = 1 + ScriptCB_GetPrimaryController()
ifs_saveop.saveName = ScriptCB_GetProfileName(iProfileIdx)
ifs_saveop.saveProfileNum = iProfileIdx
ifs_saveop.NoPromptSave = 1
ifs_movietrans_PushScreen(ifs_saveop)
elseif(fRet < 2.5) then
-- print("ifs_pausemenu_fnSaveDirtyAccept(B - Exit without saving)")
--ifs_pausemenu_fnDoExit()
ifs_pausemenu_fnJustExit()
else
-- print("ifs_pausemenu_fnSaveDirtyAccept(C - Cancel)")
-- show this screen
IFObj_fnSetVis(ifs_pausemenu.buttons,1)
end
end
-- Function shared by instances: enter
function ifs_pausemenu_fnEnter(this, bFwd, iInstance)
if(this.buttons and this.buttons.FriendIcon) then
local IconIdx = ScriptCB_GetFriendListIcon()
local UVs = gXLFriendsEnum2UVs[IconIdx+1] -- lua counts from 1
IFImage_fnSetUVs(this.buttons.FriendIcon,UVs.u,UVs.v,UVs.u+0.25,UVs.v+0.25)
end
-- Default fnEnter doesn't know about the multi-viewport active buttons. So,
-- clear out varbs it uses to keep from bouncing multiple buttons at once
-- NM 8/6/05
gCurScreenTable = this
SetCurButton(nil, this)
this.CurButton = nil
gIFShellScreenTemplate_fnEnter(this, bFwd)
-- if we're returning from the below, bail right back to the game
if((not bFwd) and this.PopAfterPlayerList) then
this.PopAfterPlayerList = nil
ScriptCB_ResetSkipToPlayerList()
ScriptCB_Unpause(this.Viewport)
return
end
-- if we're in a net game and the user hits 'tab', jump right to the player list
if(bFwd and ScriptCB_SkipToPlayerList() and ScriptCB_InNetGame()) then
this.PopAfterPlayerList = 1
ifs_movietrans_PushScreen(ifs_mp_lobby)
return
end
this.PopAfterPlayerList = nil
ScriptCB_ResetSkipToPlayerList()
ifs_pausemenu_fnUpdateFreecamText(this)
if(this.CurButton) then
IFButton_fnSelect(this.buttons[this.CurButton],nil) -- Deactivate old button
end
-- Refresh which buttons are shown
this.buttons.lobby.hidden = gDemoBuild or (not ScriptCB_InNetGame())
if(ScriptCB_GetGameRules() == "metagame") then
this.buttons.restart.hidden = 1
else
this.buttons.restart.hidden = ScriptCB_InNetGame()
end
this.buttons.exit.hidden = (gPlatformStr ~= "PC" or ScriptCB_InNetGame())
this.buttons.freecam.hidden = ScriptCB_InNetGame()
local bShowFriends
if(gPlatformStr == "XBox") then
-- XBox has to worry about which viewport(s) have signed-in users
-- BF2 bug 9214 - NM 8/15/05
local iJoystick = ScriptCB_GetPausingJoystick()
bShowFriends = ScriptCB_XL_IsLoggedIn(nil, iJoystick + 1) -- only visible if successfully signed in
else
-- GS has only one viewport to worry about
bShowFriends = ScriptCB_IsLoggedIn()
end
this.buttons.friends.hidden = not bShowFriends
this.bIsLoggedIn = bShowFriends
if(this.buttons.recent) then
this.buttons.recent.hidden = not ((ScriptCB_InNetGame()) and (gOnlineServiceStr == "XLive"))
end
if(ScriptCB_IsDedicated()) then
this.buttons.freecam.hidden = 1
-- this.buttons.lobby.hidden = 1 -- Disabled NM 7/22/04 - I think we need to show this
this.buttons.opts.hidden = 1
this.buttons.suicide.hidden = 1
elseif (ScriptCB_IsSplitscreen()) then
-- this.buttons.lobby.hidden = 1
this.buttons.exit.hidden = 1
end
-- Hide ability to go to lua screens that are deleted by PS2 when the
-- stats screens opens up. Do NOT modify these without also looking into
-- other ways to free up Lua memory on the PS2 - NM 5/25/05
if(ScriptCB_IsGameOver()) then
this.buttons.lobby.hidden = 1
this.buttons.opts.hidden = 1
this.buttons.suicide.hidden = 1
end
-- Function test added NM 6/14/05. Remove after about a week.
if(ScriptCB_IsGuest and ScriptCB_IsGuest()) then
this.buttons.lobby.hidden = 1
this.buttons.friends.hidden = 1
this.buttons.recent.hidden = 1
this.bIsGuest = 1
bShowFriends = nil -- have code below hide it.
else
this.bIsGuest = nil
end
this.CurButton = ShowHideVerticalButtons(this.buttons,ifspausemenu_vbutton_layout)
if (bFwd) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
end
SetCurButton(this.CurButton, this)
-- Move friends icon if appropriate
if(bShowFriends) then
local fLeft, fTop, fRight, fBot = IFText_fnGetDisplayRect(this.buttons.friends.label)
local TextW = fRight - fLeft
local XPos = fRight + 20
local YPos = this.buttons.friends.y - 15
IFObj_fnSetPos(this.buttons.FriendIcon,XPos,YPos)
else
IFObj_fnSetVis(this.buttons.FriendIcon, nil) -- just hide it.
end
end
-- Function shared by instances: Update
function ifs_pausemenu_fnUpdate(this, fDt)
-- Call default base class's update function (make button bounce)
gIFShellScreenTemplate_fnUpdate(this,fDt)
-- Periodically, see if we're still logged in. As we show 'friends' in
-- the Syslink UI, we need to immediately hide that if the XLive login
-- goes sour.
this.fFriendCheck = this.fFriendCheck - fDt
if((gPlatformStr == "XBox") and (not this.bIsGuest) and (this.fFriendCheck < 0)) then
this.fFriendCheck = 0.2
local iJoystick = ScriptCB_GetPausingJoystick()
local bIsLoggedIn = ScriptCB_XL_IsLoggedIn(nil, iJoystick + 1)
if(this.bIsLoggedIn ~= bIsLoggedIn) then
this.bIsLoggedIn = bIsLoggedIn
this.buttons.friends.hidden = not this.bIsLoggedIn
IFObj_fnSetVis(this.buttons.FriendIcon, this.bIsLoggedIn)
ShowHideVerticalButtons(this.buttons,ifspausemenu_vbutton_layout) -- refresh buttons
if (this.CurButton == "friends") then
this:Input_GeneralUp() -- move off now-disabled option
end
end
end
end
-- Function shared by instances: Input_Accept
function ifs_pausemenu_fnInput_Accept(this)
if(this.bNoInput) then
return
end
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputAccept(this)) then
return
end
ifelm_shellscreen_fnPlaySound(this.acceptSound)
if(this.CurButton == "resume") then
ScriptCB_Unpause(this.Viewport)
elseif (this.CurButton == "quit") then
-- this hack
ScriptCB_SetQuitPlayer(1)
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnQuitPopupDone
Popup_YesNo_Large:fnActivate(1)
if (ScriptCB_GetAmHost()) then
if (ScriptCB_GetGameRules() == "metagame") then
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit_meta")
else
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_host_quit")
end
elseif (ScriptCB_GetGameRules() == "metagame") then
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit_meta")
else
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit")
end
ifs_pausemenu_fnSetPieceVis(this, nil)
elseif (this.CurButton == "freecam") then
this.bChaseCam = not this.bChaseCam
ScriptCB_Freecamera()
ScriptCB_DoConsoleCmd(ToggleQosDisplay)
ifs_pausemenu_fnUpdateFreecamText(this)
elseif (this.CurButton == "exit") then
-- is the current profile dirty?
if(ScriptCB_IsCurProfileDirty(1)) then
-- print("profile dirty, prompting save")
-- hide this screen
IFObj_fnSetVis(ifs_pausemenu.buttons,nil)
-- set the button text
IFText_fnSetString(Popup_LoadSave2.buttons.A.label,ifs_saveop.PlatformBaseStr .. ".saveandexit")
IFText_fnSetString(Popup_LoadSave2.buttons.B.label,ifs_saveop.PlatformBaseStr .. ".exitnosave")
IFText_fnSetString(Popup_LoadSave2.buttons.C.label,ifs_saveop.PlatformBaseStr .. ".cancel")
-- set the button visibility
Popup_LoadSave2:fnActivate(1)
-- set the load/save title text
IFObj_fnSetVis(Popup_LoadSave2.buttons.A.label,1)
IFObj_fnSetVis(Popup_LoadSave2.buttons.B.label,1)
IFObj_fnSetVis(Popup_LoadSave2.buttons.C.label,1)
gPopup_fnSetTitleStr(Popup_LoadSave2, ifs_saveop.PlatformBaseStr .. ".save24")
Popup_LoadSave2_SelectButton(1)
IFObj_fnSetVis(Popup_LoadSave2, not ScriptCB_IsErrorBoxOpen())
Popup_LoadSave2_ResizeButtons()
Popup_LoadSave2.fnAccept = ifs_pausemenu_fnSaveDirtyAcceptQuit
return
end
ifs_pausemenu_fnDoExit()
elseif (this.CurButton == "lobby") then
ifs_movietrans_PushScreen(ifs_mp_lobby)
elseif (this.CurButton == "opts") then
ifs_movietrans_PushScreen(ifs_opt_top)
elseif (this.CurButton == "friends") then
if(ScriptCB_GetOnlineService() == "XLive") then
ifs_mpxl_friends.bRecentMode = nil
ifs_movietrans_PushScreen(ifs_mpxl_friends)
else
ifs_movietrans_PushScreen(ifs_mpgs_friends)
end
elseif (this.CurButton == "recent") then
ifelm_shellscreen_fnPlaySound("shell_menu_accept")
ifs_mpxl_friends.bRecentMode = 1
ifs_movietrans_PushScreen(ifs_mpxl_friends)
elseif (this.CurButton == "stats") then
ifs_movietrans_PushScreen(ifs_teamstats)
elseif (this.CurButton == "cheats") then
ifs_movietrans_PushScreen(ifs_cheats)
elseif (this.CurButton == "restart") then
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnRestartPopupDone
ifs_pausemenu_fnSetPieceVis(this, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_restart")
elseif (this.CurButton == "suicide") then
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnSuicidePopupDone
ifs_pausemenu_fnSetPieceVis(this, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "game.pause.suicide_prompt")
end
end
ifs_pausemenu = NewIFShellScreen {
nologo = 1,
bAcceptIsSelect = 1,
movieIntro = nil, -- played before the screen is displayed
movieBackground = nil, -- played while the screen is displayed
bFriendsIcon = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this,bFwd, 1) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(this.Viewport)
end,
}
ifs_pausemenu2 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 2) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(1)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
ifs_pausemenu3 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
y = -30,
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 3) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(2)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
ifs_pausemenu4 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
y = -30,
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 4) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(3)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
if(not ScriptCB_IsSplitscreen()) then
ifs_pausemenu.Viewport = 0
ifs_pausemenu.CurButton = AddVerticalButtons(ifs_pausemenu.buttons,ifspausemenu_vbutton_layout)
AddIFScreen(ifs_pausemenu, "ifs_pausemenu", 1)
ifs_pausemenu2 = nil -- flush from memory
ifs_pausemenu3 = nil -- flush from memory
ifs_pausemenu4 = nil -- flush from memory
else
-- is splitscreen. Rearrange things
ifspausemenu_vbutton_layout.font = "gamefont_small"
if(ScriptCB_GetNumCameras() > 2) then
local w,h = ScriptCB_GetSafeScreenInfo() -- of the usable screen
ifspausemenu_vbutton_layout.HardWidthMax = w * 0.42
end
-- No gaps between items; we need to compress for space.
ifspausemenu_vbutton_layout.bNoDefaultSizing = 1
ifs_pausemenu.CurButton = AddVerticalButtons(ifs_pausemenu.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu.Viewport = 0
AddIFScreen(ifs_pausemenu,"ifs_pausemenu")
ifs_pausemenu2.CurButton = AddVerticalButtons(ifs_pausemenu2.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu2.Viewport = 1
AddIFScreen(ifs_pausemenu2,"ifs_pausemenu2")
ifs_pausemenu2 = DoPostDelete(ifs_pausemenu2)
if(gPlatformStr == "XBox") then
ifs_pausemenu3.CurButton = AddVerticalButtons(ifs_pausemenu3.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu3.Viewport = 2
AddIFScreen(ifs_pausemenu3,"ifs_pausemenu3")
ifs_pausemenu3 = DoPostDelete(ifs_pausemenu3)
ifs_pausemenu4.CurButton = AddVerticalButtons(ifs_pausemenu4.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu4.Viewport = 3
AddIFScreen(ifs_pausemenu4,"ifs_pausemenu4")
ifs_pausemenu4 = DoPostDelete(ifs_pausemenu4)
end
end
ifs_pausemenu = DoPostDelete(ifs_pausemenu)[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Ingame pause menu
ifspausemenu_vbutton_layout = {
ySpacing = 5,
width = 260,
font = gMenuButtonFont,
buttonlist = {
{ tag = "resume", string = "common.resume", },
{ tag = "lobby", string = "game.pause.playerlist", },
{ tag = "friends", string = "ifs.onlinelobby.friendslist", },
{ tag = "freecam", string = "game.pause.freecam", },
{ tag = "cheats", string = "Cheats", },
{ tag = "opts", string = "ifs.main.options", },
{ tag = "suicide", string = "game.pause.suicide", },
{ tag = "recent", string = "common.mp.recent", },
{ tag = "restart", string = "common.restart", },
{ tag = "quit", string = "common.quit", },
{ tag = "exit", string = "common.quit2windows", },
},
title = "game.pause.title",
}
-- Turns pieces on/off as requested
function ifs_pausemenu_fnSetPieceVis(this, bVis)
IFObj_fnSetVis(this.buttons,bVis)
end
-- Sets text for the camera entry to the right settings
function ifs_pausemenu_fnUpdateFreecamText(this)
if(this.buttons.freecam) then
if(this.bChaseCam) then
RoundIFButtonLabel_fnSetString(this.buttons.freecam,"game.pause.followcam")
else
RoundIFButtonLabel_fnSetString(this.buttons.freecam,"game.pause.freecam")
end
end
end
function ifs_pausemenu_fnGetActiveInstance()
local Active = ScriptCB_GetPausingViewport()
if (Active == 0) then
return ifs_pausemenu
elseif (Active == 1) then
return ifs_pausemenu2
elseif (Active == 2) then
return ifs_pausemenu3
elseif (Active == 3) then
return ifs_pausemenu4
end
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnQuitPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("quit", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_QuitToShell()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnExitPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("exit", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_QuitToWindows()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really quit?" popup is over. If bResult is
-- true, user wanted to quit
function ifs_pausemenu_fnSuicidePopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("suicide", this)
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_PlayerSuicide(this.Viewport) -- top player
ScriptCB_Unpause(this.Viewport)
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
-- Callback for when the "really restart?" popup is over. If bResult is
-- true, user wanted to restart
function ifs_pausemenu_fnRestartPopupDone(bResult)
local this = ifs_pausemenu_fnGetActiveInstance()
SetCurButton("restart", this)
if((gPlatformStr == "PC") or (not bResult)) then -- fix for BF2 bug 5091, 5724
ifs_pausemenu_fnSetPieceVis(this,1) -- always restore screen
else
this.bNoInput = 1
end
if(bResult) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
ScriptCB_RestartMission()
else
ifelm_shellscreen_fnPlaySound(this.cancelSound)
end
Popup_YesNo_Large.fnDone = nil
end
function ifs_pausemenu_fnDoExit()
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnExitPopupDone
ifs_pausemenu_fnSetPieceVis(ifs_pausemenu, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.main.askquit")
end
function ifs_pausemenu_fnJustExit()
ifs_pausemenu_fnExitPopupDone(true)
end
function ifs_pausemenu_fnSaveProfileCancel()
-- print("ifs_pausemenu_fnSaveProfileCancel")
-- back to the "its dirty, save?" prompt when we enter
--ifs_pausemenu.TryToBackup = 1
-- pop ifs_saveop, return to ifs_pausemenu
ScriptCB_PopScreen()
end
function ifs_pausemenu_fnSaveDirtyAcceptQuit(fRet)
Popup_LoadSave2.fnAccept = nil
Popup_LoadSave2:fnActivate(nil)
ifs_pausemenu.do_save = nil
if(fRet < 1.5) then
-- print("ifs_pausemenu_SaveDirtyAccept(A - Save)")
ifs_pausemenu.do_save = 1
ifs_saveop.doOp = "SaveProfile"
ifs_saveop.OnSuccess = ifs_pausemenu_fnJustExit --ifs_pausemenu_fnDoExit
ifs_saveop.OnCancel = ifs_pausemenu_fnSaveProfileCancel
local iProfileIdx = 1 + ScriptCB_GetPrimaryController()
ifs_saveop.saveName = ScriptCB_GetProfileName(iProfileIdx)
ifs_saveop.saveProfileNum = iProfileIdx
ifs_saveop.NoPromptSave = 1
ifs_movietrans_PushScreen(ifs_saveop)
elseif(fRet < 2.5) then
-- print("ifs_pausemenu_fnSaveDirtyAccept(B - Exit without saving)")
--ifs_pausemenu_fnDoExit()
ifs_pausemenu_fnJustExit()
else
-- print("ifs_pausemenu_fnSaveDirtyAccept(C - Cancel)")
-- show this screen
IFObj_fnSetVis(ifs_pausemenu.buttons,1)
end
end
-- Function shared by instances: enter
function ifs_pausemenu_fnEnter(this, bFwd, iInstance)
if(this.buttons and this.buttons.FriendIcon) then
local IconIdx = ScriptCB_GetFriendListIcon()
local UVs = gXLFriendsEnum2UVs[IconIdx+1] -- lua counts from 1
IFImage_fnSetUVs(this.buttons.FriendIcon,UVs.u,UVs.v,UVs.u+0.25,UVs.v+0.25)
end
-- Default fnEnter doesn't know about the multi-viewport active buttons. So,
-- clear out varbs it uses to keep from bouncing multiple buttons at once
-- NM 8/6/05
gCurScreenTable = this
SetCurButton(nil, this)
this.CurButton = nil
gIFShellScreenTemplate_fnEnter(this, bFwd)
-- if we're returning from the below, bail right back to the game
if((not bFwd) and this.PopAfterPlayerList) then
this.PopAfterPlayerList = nil
ScriptCB_ResetSkipToPlayerList()
ScriptCB_Unpause(this.Viewport)
return
end
-- if we're in a net game and the user hits 'tab', jump right to the player list
if(bFwd and ScriptCB_SkipToPlayerList() and ScriptCB_InNetGame()) then
this.PopAfterPlayerList = 1
ifs_movietrans_PushScreen(ifs_mp_lobby)
return
end
this.PopAfterPlayerList = nil
ScriptCB_ResetSkipToPlayerList()
ifs_pausemenu_fnUpdateFreecamText(this)
if(this.CurButton) then
IFButton_fnSelect(this.buttons[this.CurButton],nil) -- Deactivate old button
end
-- Refresh which buttons are shown
this.buttons.lobby.hidden = gDemoBuild or (not ScriptCB_InNetGame())
if(ScriptCB_GetGameRules() == "metagame") then
this.buttons.restart.hidden = 1
else
this.buttons.restart.hidden = ScriptCB_InNetGame()
end
this.buttons.exit.hidden = (gPlatformStr ~= "PC" or ScriptCB_InNetGame())
this.buttons.freecam.hidden = ScriptCB_InNetGame()
local bShowFriends
if(gPlatformStr == "XBox") then
-- XBox has to worry about which viewport(s) have signed-in users
-- BF2 bug 9214 - NM 8/15/05
local iJoystick = ScriptCB_GetPausingJoystick()
bShowFriends = ScriptCB_XL_IsLoggedIn(nil, iJoystick + 1) -- only visible if successfully signed in
else
-- GS has only one viewport to worry about
bShowFriends = ScriptCB_IsLoggedIn()
end
this.buttons.friends.hidden = not bShowFriends
this.bIsLoggedIn = bShowFriends
if(this.buttons.recent) then
this.buttons.recent.hidden = not ((ScriptCB_InNetGame()) and (gOnlineServiceStr == "XLive"))
end
if(ScriptCB_IsDedicated()) then
this.buttons.freecam.hidden = 1
-- this.buttons.lobby.hidden = 1 -- Disabled NM 7/22/04 - I think we need to show this
this.buttons.opts.hidden = 1
this.buttons.suicide.hidden = 1
elseif (ScriptCB_IsSplitscreen()) then
-- this.buttons.lobby.hidden = 1
this.buttons.exit.hidden = 1
end
-- Hide ability to go to lua screens that are deleted by PS2 when the
-- stats screens opens up. Do NOT modify these without also looking into
-- other ways to free up Lua memory on the PS2 - NM 5/25/05
if(ScriptCB_IsGameOver()) then
this.buttons.lobby.hidden = 1
this.buttons.opts.hidden = 1
this.buttons.suicide.hidden = 1
end
-- Function test added NM 6/14/05. Remove after about a week.
if(ScriptCB_IsGuest and ScriptCB_IsGuest()) then
this.buttons.lobby.hidden = 1
this.buttons.friends.hidden = 1
this.buttons.recent.hidden = 1
this.bIsGuest = 1
bShowFriends = nil -- have code below hide it.
else
this.bIsGuest = nil
end
this.CurButton = ShowHideVerticalButtons(this.buttons,ifspausemenu_vbutton_layout)
if (bFwd) then
ifelm_shellscreen_fnPlaySound(this.acceptSound)
end
SetCurButton(this.CurButton, this)
-- Move friends icon if appropriate
if(bShowFriends) then
local fLeft, fTop, fRight, fBot = IFText_fnGetDisplayRect(this.buttons.friends.label)
local TextW = fRight - fLeft
local XPos = fRight + 20
local YPos = this.buttons.friends.y - 15
IFObj_fnSetPos(this.buttons.FriendIcon,XPos,YPos)
else
IFObj_fnSetVis(this.buttons.FriendIcon, nil) -- just hide it.
end
end
-- Function shared by instances: Update
function ifs_pausemenu_fnUpdate(this, fDt)
-- Call default base class's update function (make button bounce)
gIFShellScreenTemplate_fnUpdate(this,fDt)
-- Periodically, see if we're still logged in. As we show 'friends' in
-- the Syslink UI, we need to immediately hide that if the XLive login
-- goes sour.
this.fFriendCheck = this.fFriendCheck - fDt
if((gPlatformStr == "XBox") and (not this.bIsGuest) and (this.fFriendCheck < 0)) then
this.fFriendCheck = 0.2
local iJoystick = ScriptCB_GetPausingJoystick()
local bIsLoggedIn = ScriptCB_XL_IsLoggedIn(nil, iJoystick + 1)
if(this.bIsLoggedIn ~= bIsLoggedIn) then
this.bIsLoggedIn = bIsLoggedIn
this.buttons.friends.hidden = not this.bIsLoggedIn
IFObj_fnSetVis(this.buttons.FriendIcon, this.bIsLoggedIn)
ShowHideVerticalButtons(this.buttons,ifspausemenu_vbutton_layout) -- refresh buttons
if (this.CurButton == "friends") then
this:Input_GeneralUp() -- move off now-disabled option
end
end
end
end
-- Function shared by instances: Input_Accept
function ifs_pausemenu_fnInput_Accept(this)
if(this.bNoInput) then
return
end
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputAccept(this)) then
return
end
ifelm_shellscreen_fnPlaySound(this.acceptSound)
if(this.CurButton == "resume") then
ScriptCB_Unpause(this.Viewport)
elseif (this.CurButton == "quit") then
-- this hack
ScriptCB_SetQuitPlayer(1)
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnQuitPopupDone
Popup_YesNo_Large:fnActivate(1)
if (ScriptCB_GetAmHost()) then
if (ScriptCB_GetGameRules() == "metagame") then
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit_meta")
else
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_host_quit")
end
elseif (ScriptCB_GetGameRules() == "metagame") then
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit_meta")
else
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_quit")
end
ifs_pausemenu_fnSetPieceVis(this, nil)
elseif (this.CurButton == "freecam") then
this.bChaseCam = not this.bChaseCam
ScriptCB_Freecamera()
ScriptCB_DoConsoleCmd(ToggleQosDisplay)
ifs_pausemenu_fnUpdateFreecamText(this)
elseif (this.CurButton == "exit") then
-- is the current profile dirty?
if(ScriptCB_IsCurProfileDirty(1)) then
-- print("profile dirty, prompting save")
-- hide this screen
IFObj_fnSetVis(ifs_pausemenu.buttons,nil)
-- set the button text
IFText_fnSetString(Popup_LoadSave2.buttons.A.label,ifs_saveop.PlatformBaseStr .. ".saveandexit")
IFText_fnSetString(Popup_LoadSave2.buttons.B.label,ifs_saveop.PlatformBaseStr .. ".exitnosave")
IFText_fnSetString(Popup_LoadSave2.buttons.C.label,ifs_saveop.PlatformBaseStr .. ".cancel")
-- set the button visibility
Popup_LoadSave2:fnActivate(1)
-- set the load/save title text
IFObj_fnSetVis(Popup_LoadSave2.buttons.A.label,1)
IFObj_fnSetVis(Popup_LoadSave2.buttons.B.label,1)
IFObj_fnSetVis(Popup_LoadSave2.buttons.C.label,1)
gPopup_fnSetTitleStr(Popup_LoadSave2, ifs_saveop.PlatformBaseStr .. ".save24")
Popup_LoadSave2_SelectButton(1)
IFObj_fnSetVis(Popup_LoadSave2, not ScriptCB_IsErrorBoxOpen())
Popup_LoadSave2_ResizeButtons()
Popup_LoadSave2.fnAccept = ifs_pausemenu_fnSaveDirtyAcceptQuit
return
end
ifs_pausemenu_fnDoExit()
elseif (this.CurButton == "lobby") then
ifs_movietrans_PushScreen(ifs_mp_lobby)
elseif (this.CurButton == "opts") then
ifs_movietrans_PushScreen(ifs_opt_top)
elseif (this.CurButton == "friends") then
if(ScriptCB_GetOnlineService() == "XLive") then
ifs_mpxl_friends.bRecentMode = nil
ifs_movietrans_PushScreen(ifs_mpxl_friends)
else
ifs_movietrans_PushScreen(ifs_mpgs_friends)
end
elseif (this.CurButton == "recent") then
ifelm_shellscreen_fnPlaySound("shell_menu_accept")
ifs_mpxl_friends.bRecentMode = 1
ifs_movietrans_PushScreen(ifs_mpxl_friends)
elseif (this.CurButton == "stats") then
ifs_movietrans_PushScreen(ifs_teamstats)
elseif (this.CurButton == "cheats") then
ifs_movietrans_PushScreen(ifs_cheats)
elseif (this.CurButton == "restart") then
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnRestartPopupDone
ifs_pausemenu_fnSetPieceVis(this, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "ifs.pause.warn_restart")
elseif (this.CurButton == "suicide") then
Popup_YesNo_Large.CurButton = "no" -- default
Popup_YesNo_Large.fnDone = ifs_pausemenu_fnSuicidePopupDone
ifs_pausemenu_fnSetPieceVis(this, nil)
Popup_YesNo_Large:fnActivate(1)
gPopup_fnSetTitleStr(Popup_YesNo_Large, "game.pause.suicide_prompt")
end
end
ifs_pausemenu = NewIFShellScreen {
nologo = 1,
bAcceptIsSelect = 1,
movieIntro = nil, -- played before the screen is displayed
movieBackground = nil, -- played while the screen is displayed
bFriendsIcon = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this,bFwd, 1) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(this.Viewport)
end,
}
ifs_pausemenu2 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 2) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(1)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
ifs_pausemenu3 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
y = -30,
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 3) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(2)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
ifs_pausemenu4 = NewIFShellScreen2 {
nologo = 1,
bFriendsIcon = 1,
bAcceptIsSelect = 1,
bDimBackdrop = 1,
bNohelptext_backPC = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = 0.5, -- center
y = -30,
},
Enter = function(this, bFwd)
ifs_pausemenu_fnEnter(this, bFwd, 4) -- Call function shared between instances
end,
Exit = function(this, bFwd)
SetCurButton(nil, this) -- clear out button highlight
this.CurButton = nil
end,
fFriendCheck = 0.1,
Update = function(this, fDt)
ifs_pausemenu_fnUpdate(this, fDt)
end,
Input_Accept = function(this)
ifs_pausemenu_fnInput_Accept(this) -- Call function shared between instances
end,
-- Override default behavior
Input_Back = function(this)
if(this.bNoInput) then
return
end
ifelm_shellscreen_fnPlaySound(this.exitSound)
ScriptCB_Unpause(3)
end,
Input_GeneralUp = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_up")
SetCurButton(this.CurButton, this)
end
end,
Input_GeneralDown = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputUp(this)) then
return
end
if(this.buttons) then
this.CurButton = FollowButtonLink(this.buttons,this.CurButton,"link_down")
SetCurButton(this.CurButton, this)
end
end,
}
if(not ScriptCB_IsSplitscreen()) then
ifs_pausemenu.Viewport = 0
ifs_pausemenu.CurButton = AddVerticalButtons(ifs_pausemenu.buttons,ifspausemenu_vbutton_layout)
AddIFScreen(ifs_pausemenu, "ifs_pausemenu", 1)
ifs_pausemenu2 = nil -- flush from memory
ifs_pausemenu3 = nil -- flush from memory
ifs_pausemenu4 = nil -- flush from memory
else
-- is splitscreen. Rearrange things
ifspausemenu_vbutton_layout.font = "gamefont_small"
if(ScriptCB_GetNumCameras() > 2) then
local w,h = ScriptCB_GetSafeScreenInfo() -- of the usable screen
ifspausemenu_vbutton_layout.HardWidthMax = w * 0.42
end
-- No gaps between items; we need to compress for space.
ifspausemenu_vbutton_layout.bNoDefaultSizing = 1
ifs_pausemenu.CurButton = AddVerticalButtons(ifs_pausemenu.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu.Viewport = 0
AddIFScreen(ifs_pausemenu,"ifs_pausemenu")
ifs_pausemenu2.CurButton = AddVerticalButtons(ifs_pausemenu2.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu2.Viewport = 1
AddIFScreen(ifs_pausemenu2,"ifs_pausemenu2")
ifs_pausemenu2 = DoPostDelete(ifs_pausemenu2)
if(gPlatformStr == "XBox") then
ifs_pausemenu3.CurButton = AddVerticalButtons(ifs_pausemenu3.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu3.Viewport = 2
AddIFScreen(ifs_pausemenu3,"ifs_pausemenu3")
ifs_pausemenu3 = DoPostDelete(ifs_pausemenu3)
ifs_pausemenu4.CurButton = AddVerticalButtons(ifs_pausemenu4.buttons,ifspausemenu_vbutton_layout)
ifs_pausemenu4.Viewport = 3
AddIFScreen(ifs_pausemenu4,"ifs_pausemenu4")
ifs_pausemenu4 = DoPostDelete(ifs_pausemenu4)
end
end
ifs_pausemenu = DoPostDelete(ifs_pausemenu)[/code]
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Top page for the options pages hierarchy
ifs_cheats_vbutton_layout = {
-- yTop = 0,
ySpacing = 5,
width = 360,
font = gMenuButtonFont,
buttonlist = {
{ tag = "unlock_hero", string = "Unlock Heroes", },
{ tag = "reinforcements", string = "Add 50 reinforcements", },
{ tag = "victory", string = "Force Mission Victory", },
{ tag = "enhanced_weapons", string = "Enhanced Weaponry", },
{ tag = "extra_vehicles", string = "Extra Vehicles", },
{ tag = "no_ai_vehicles", string = "No AI in Vehicles", },
{ tag = "unlock_units", string = "Unlock All Units", },
{ tag = "uber_soldier", string = "Super Soldier", },
{ tag = "classic_flyers", string = "Classic Flyers", },
},
title = "ifs.Main.options",
-- rotY = 40,
}
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
ifs_cheats = NewIFShellScreen {
nologo = 1,
bAcceptIsSelect = 1,
movieIntro = nil, -- played before the screen is displayed
bDimBackdrop = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = gDefaultButtonScreenRelativeY, -- center
},
Enter = function(this, bFwd)
gIFShellScreenTemplate_fnEnter(this, bFwd) -- call default enter function
-- Show/hide buttons only when entering from another screen, not backing in
if(bFwd) then
-- hide some buttons
local bShellActive = ScriptCB_GetShellActive()
-- Function test added NM 6/8/05. Remove after about a week.
if(ScriptCB_PausingIsPrimary) then
this.buttons.sound.hidden = not ScriptCB_PausingIsPrimary()
else
this.buttons.sound.hidden = (ScriptCB_GetPausingViewport() ~= 0)
end
this.CurButton = ShowHideVerticalButtons(this.buttons,ifs_cheats_vbutton_layout)
SetCurButton(this.CurButton)
end
end, -- function Enter()
Input_Accept = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputAccept(this)) then
return
end
ifelm_shellscreen_fnPlaySound(this.acceptSound)
--everybody!
if (this.CurButton == "unlock_hero") then
UnlockHeroForTeam(1)
UnlockHeroForTeam(2)
elseif (this.CurButton == "reinforcements") then
AddReinforcements(1, 50)
AddReinforcements(2, 50)
elseif (this.CurButton == "victory") then
MissionVictory(1)
MissionVictory(2)
elseif (this.CurButton == "enhanced_weapons") then
ActivateBonus(1, "team_bonus_advanced_blasters")
ActivateBonus(2, "team_bonus_advanced_blasters")
elseif (this.CurButton == "extra_vehicles") then
SetHistorical(1)
elseif (this.CurButton == "no_ai_vehicles") then
ForceAIOutOfVehicles(1)
elseif (this.CurButton == "unlock_units") then
local properties = { { name = "PointsToUnlock", value = "0" }, }
uf_changeClassProperties( uf_classes, properties )
elseif (this.CurButton == "uber_soldier") then
local properties = {
{ name = "AddHealth", value = "1986" },
{ name = "EnergyRestore", value = "1986" },
{ name = "EnergyRestoreIdle", value = "1986" },
}
uf_changeClassProperties( uf_classes, properties )
elseif (this.CurButton == "classic_flyers") then
SetGroundFlyerMap(1)
end
end,
Input_Back = function(this)
-- just exit
ScriptCB_PopScreen()
end,
}
function uf_changeClassProperties( class, property )
--for each given class
local cIndex
for cIndex = 1, table.getn(class) do
--print( "uf_changeClassProperties(): Class Index, Name:", cIndex, class[cIndex] )
--for each given property
local pIndex
for pIndex = 1, table.getn(property) do
--print( "uf_changeClassProperties(): Property Index, Name, Value:", pIndex, property[pIndex].name, property[pIndex].value )
--change it if the class really exists
if FindEntityClass(class[cIndex]) ~= FindEntityClass("Zerted hopes no one names a class like this") then
SetClassProperty( class[cIndex], property[pIndex].name, property[pIndex].value )
end--end FindEntityClass
end--end property loop
end--end class loop
end--end uf_ChangeClassProperties()
function ifs_cheats_fnBuildScreen(this)
local w
local h
w,h = ScriptCB_GetSafeScreenInfo()
if(ScriptCB_GetShellActive() and (gPlatformStr ~= "PC")) then
ifs_cheats_vbutton_layout.bLeftJustifyButtons = 1
end
this.CurButton = AddVerticalButtons(this.buttons,ifs_cheats_vbutton_layout)
end
ifs_cheats_fnBuildScreen(ifs_cheats)
ifs_cheats_fnBuildScreen = nil
AddIFScreen(ifs_cheats,"ifs_cheats")
ifs_cheats = DoPostDelete(ifs_cheats)[/code]
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Top page for the options pages hierarchy
ifs_cheats_vbutton_layout = {
-- yTop = 0,
ySpacing = 5,
width = 360,
font = gMenuButtonFont,
buttonlist = {
{ tag = "unlock_hero", string = "Unlock Heroes", },
{ tag = "reinforcements", string = "Add 50 reinforcements", },
{ tag = "victory", string = "Force Mission Victory", },
{ tag = "enhanced_weapons", string = "Enhanced Weaponry", },
{ tag = "extra_vehicles", string = "Extra Vehicles", },
{ tag = "no_ai_vehicles", string = "No AI in Vehicles", },
{ tag = "unlock_units", string = "Unlock All Units", },
{ tag = "uber_soldier", string = "Super Soldier", },
{ tag = "classic_flyers", string = "Classic Flyers", },
},
title = "ifs.Main.options",
-- rotY = 40,
}
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
ifs_cheats = NewIFShellScreen {
nologo = 1,
bAcceptIsSelect = 1,
movieIntro = nil, -- played before the screen is displayed
bDimBackdrop = 1,
buttons = NewIFContainer {
ScreenRelativeX = 0.5, -- center
ScreenRelativeY = gDefaultButtonScreenRelativeY, -- center
},
Enter = function(this, bFwd)
gIFShellScreenTemplate_fnEnter(this, bFwd) -- call default enter function
-- Show/hide buttons only when entering from another screen, not backing in
if(bFwd) then
-- hide some buttons
local bShellActive = ScriptCB_GetShellActive()
-- Function test added NM 6/8/05. Remove after about a week.
if(ScriptCB_PausingIsPrimary) then
this.buttons.sound.hidden = not ScriptCB_PausingIsPrimary()
else
this.buttons.sound.hidden = (ScriptCB_GetPausingViewport() ~= 0)
end
this.CurButton = ShowHideVerticalButtons(this.buttons,ifs_cheats_vbutton_layout)
SetCurButton(this.CurButton)
end
end, -- function Enter()
Input_Accept = function(this)
-- If base class handled this work, then we're done
if(gShellScreen_fnDefaultInputAccept(this)) then
return
end
ifelm_shellscreen_fnPlaySound(this.acceptSound)
--everybody!
if (this.CurButton == "unlock_hero") then
UnlockHeroForTeam(1)
UnlockHeroForTeam(2)
elseif (this.CurButton == "reinforcements") then
AddReinforcements(1, 50)
AddReinforcements(2, 50)
elseif (this.CurButton == "victory") then
MissionVictory(1)
MissionVictory(2)
elseif (this.CurButton == "enhanced_weapons") then
ActivateBonus(1, "team_bonus_advanced_blasters")
ActivateBonus(2, "team_bonus_advanced_blasters")
elseif (this.CurButton == "extra_vehicles") then
SetHistorical(1)
elseif (this.CurButton == "no_ai_vehicles") then
ForceAIOutOfVehicles(1)
elseif (this.CurButton == "unlock_units") then
local properties = { { name = "PointsToUnlock", value = "0" }, }
uf_changeClassProperties( uf_classes, properties )
elseif (this.CurButton == "uber_soldier") then
local properties = {
{ name = "AddHealth", value = "1986" },
{ name = "EnergyRestore", value = "1986" },
{ name = "EnergyRestoreIdle", value = "1986" },
}
uf_changeClassProperties( uf_classes, properties )
elseif (this.CurButton == "classic_flyers") then
SetGroundFlyerMap(1)
end
end,
Input_Back = function(this)
-- just exit
ScriptCB_PopScreen()
end,
}
function uf_changeClassProperties( class, property )
--for each given class
local cIndex
for cIndex = 1, table.getn(class) do
--print( "uf_changeClassProperties(): Class Index, Name:", cIndex, class[cIndex] )
--for each given property
local pIndex
for pIndex = 1, table.getn(property) do
--print( "uf_changeClassProperties(): Property Index, Name, Value:", pIndex, property[pIndex].name, property[pIndex].value )
--change it if the class really exists
if FindEntityClass(class[cIndex]) ~= FindEntityClass("Zerted hopes no one names a class like this") then
SetClassProperty( class[cIndex], property[pIndex].name, property[pIndex].value )
end--end FindEntityClass
end--end property loop
end--end class loop
end--end uf_ChangeClassProperties()
function ifs_cheats_fnBuildScreen(this)
local w
local h
w,h = ScriptCB_GetSafeScreenInfo()
if(ScriptCB_GetShellActive() and (gPlatformStr ~= "PC")) then
ifs_cheats_vbutton_layout.bLeftJustifyButtons = 1
end
this.CurButton = AddVerticalButtons(this.buttons,ifs_cheats_vbutton_layout)
end
ifs_cheats_fnBuildScreen(ifs_cheats)
ifs_cheats_fnBuildScreen = nil
AddIFScreen(ifs_cheats,"ifs_cheats")
ifs_cheats = DoPostDelete(ifs_cheats)[/code]