|
UFO: Alien Invasion
|
Manage popups. More...
#include "../../DateTime.h"#include "../../cl_shared.h"#include "cp_campaign.h"#include "cp_mapfightequip.h"#include "cp_geoscape.h"#include "cp_popup.h"#include "cp_missions.h"#include "cp_time.h"#include "cp_aircraft_callbacks.h"#include "../../ui/ui_dataids.h"
Go to the source code of this file.
Data Structures | |
| struct | popup_intercept_t |
Macros | |
| #define | POPUP_INTERCEPT_MAX_AIRCRAFT 64 |
| #define | AIR_ForeachSorted(var, sorter, userdata, sortedlist) |
Functions | |
| bool | CL_DisplayHomebasePopup (aircraft_t *aircraft, bool alwaysDisplay) |
| Display the popup_homebase. | |
| static void | CL_PopupChangeHomebase_f (void) |
| User select a base in the popup_homebase change homebase to selected base. | |
| static int | AIR_SortByDistance (linkedList_t *aircraftEntry1, linkedList_t *aircraftEntry2, const void *userData) |
| void | CL_DisplayPopupInterceptMission (mission_t *mission) |
| Display the popup_mission. | |
| void | CL_DisplayPopupInterceptUFO (aircraft_t *ufo) |
| Display the popup_intercept. | |
| static aircraft_t * | CL_PopupInterceptGetAircraft (void) |
| return the selected aircraft in popup_intercept Close the popup if required | |
| static void | CL_PopupInterceptClick_f (void) |
| User select an item in the popup_aircraft Make the aircraft attack the corresponding mission or UFO. | |
| static void | CL_PopupInterceptRClick_f (void) |
| User select an item in the popup_aircraft with right click Opens up the aircraft menu. | |
| static void | CL_PopupInterceptBaseClick_f (void) |
| User select a base in the popup_aircraft Make the base attack the corresponding UFO. | |
| void | CL_PopupInit (void) |
| Initialise popups. | |
| void | CP_Popup (const char *title, const char *text,...) |
Wrapper around UI_Popup. | |
Variables | |
| static popup_intercept_t | popupIntercept |
| static int | popupNum |
| static linkedList_t * | popupListData = nullptr |
| static uiNode_t * | popupListNode = nullptr |
| static int | INVALID_BASE = -1 |
Manage popups.
Definition in file cp_popup.cpp.
| #define AIR_ForeachSorted | ( | var, | |
| sorter, | |||
| userdata, | |||
| sortedlist ) |
Definition at line 179 of file cp_popup.cpp.
Referenced by CL_DisplayPopupInterceptMission(), and CL_DisplayPopupInterceptUFO().
| #define POPUP_INTERCEPT_MAX_AIRCRAFT 64 |
Max aircraft in popup list
Definition at line 39 of file cp_popup.cpp.
Referenced by CL_DisplayPopupInterceptMission(), and CL_DisplayPopupInterceptUFO().
|
static |
Definition at line 169 of file cp_popup.cpp.
References linkedList_t::data, GetDistanceOnGlobe(), and aircraft_t::pos.
Referenced by CL_DisplayPopupInterceptMission(), and CL_DisplayPopupInterceptUFO().
| bool CL_DisplayHomebasePopup | ( | aircraft_t * | aircraft, |
| bool | alwaysDisplay ) |
Display the popup_homebase.
| [in] | aircraft | Pointer to aircraft we want to change homebase. |
| [in] | alwaysDisplay | False if popup should be displayed only if at least one base is available. |
< Set color for selected entry.
Definition at line 67 of file cp_popup.cpp.
References _, AIR_CheckMoveIntoNewHomebase(), B_GetNext(), cgi, Com_sprintf(), CP_GameTimeStop(), GEO_SelectAircraft(), aircraft_t::homebase, base_t::idx, INVALID_BASE, LIST_Add(), MAX_VAR, base_t::name, popupListData, popupListNode, popupNum, and VectorSet.
Referenced by AIR_ShowChangeHomebaseAircraft_f(), and CL_PopupChangeHomebase_f().
Display the popup_mission.
Definition at line 185 of file cp_popup.cpp.
References _, AIR_AircraftStatusToName(), AIR_CanIntercept(), AIR_CRASHED, AIR_ForeachSorted, AIR_GetTeamSize(), AIR_SortByDistance(), AIR_STATS_SPEED, cgi, Com_sprintf(), CP_GameTimeStop(), CP_SecondConvert(), GetDistanceOnGlobe(), POPUP_INTERCEPT_MAX_AIRCRAFT, popupIntercept, mission_t::pos, DateTime::SECONDS_PER_HOUR, and TEXT_AIRCRAFT_LIST.
Referenced by MIS_GeoSelectMission_f().
| void CL_DisplayPopupInterceptUFO | ( | aircraft_t * | ufo | ) |
Display the popup_intercept.
Definition at line 238 of file cp_popup.cpp.
References _, AII_BaseCanShoot(), AII_InstallationCanShoot(), AIR_AircraftHasEnoughFuel(), AIR_AircraftStatusToName(), AIR_CanIntercept(), AIR_ForeachSorted, AIR_GetTeamSize(), AIR_SortByDistance(), AIRFIGHT_ChooseWeapon(), AIRFIGHT_WEAPON_CAN_NEVER_SHOOT, B_GetNext(), cgi, Com_sprintf(), CP_GameTimeStop(), DEBUG_CLIENT, INS_Foreach, base_t::name, POPUP_INTERCEPT_MAX_AIRCRAFT, popupIntercept, aircraft_t::pos, TEXT_AIRCRAFT_LIST, TEXT_BASE_LIST, and va().
Referenced by UFO_GeoSelectUFO_f().
User select a base in the popup_homebase change homebase to selected base.
< Use this so we do not change the original popupListData pointer.
Definition at line 123 of file cp_popup.cpp.
References AIR_CheckMoveIntoNewHomebase(), AIR_MoveAircraftIntoNewHomebase(), B_GetFoundedBaseByIDX(), cgi, CL_DisplayHomebasePopup(), data, DEBUG_CLIENT, GEO_GetSelectedAircraft, i, INVALID_BASE, popupListData, and popupNum.
Referenced by CL_PopupInit().
Initialise popups.
Definition at line 458 of file cp_popup.cpp.
References cgi, CL_PopupChangeHomebase_f(), CL_PopupInterceptBaseClick_f(), CL_PopupInterceptClick_f(), CL_PopupInterceptRClick_f(), OBJZERO, and popupIntercept.
Referenced by CP_CampaignInit().
User select a base in the popup_aircraft Make the base attack the corresponding UFO.
Definition at line 390 of file cp_popup.cpp.
References AII_BaseCanShoot(), AII_InstallationCanShoot(), B_GetNext(), base_t::batteries, installation_t::batteries, cgi, GEO_GetSelectedUFO, i, INS_Foreach, installation_t::installationTemplate, base_t::lasers, installationTemplate_t::maxBatteries, base_t::numBatteries, base_t::numLasers, and baseWeapon_t::target.
Referenced by CL_PopupInit().
User select an item in the popup_aircraft Make the aircraft attack the corresponding mission or UFO.
Definition at line 341 of file cp_popup.cpp.
References _, AIR_SendAircraftPursuingUFO(), AIR_SendAircraftToMission(), B_COMMAND, B_GetBuildingStatus(), CL_PopupInterceptGetAircraft(), CP_Popup(), aircraft_t::homebase, and popupIntercept.
Referenced by CL_PopupInit().
|
static |
return the selected aircraft in popup_intercept Close the popup if required
Definition at line 319 of file cp_popup.cpp.
References cgi, and popupIntercept.
Referenced by CL_PopupInterceptClick_f(), and CL_PopupInterceptRClick_f().
User select an item in the popup_aircraft with right click Opens up the aircraft menu.
Definition at line 370 of file cp_popup.cpp.
References AIR_AircraftSelect(), B_SelectBase(), cgi, CL_PopupInterceptGetAircraft(), GEO_ResetAction(), and aircraft_t::homebase.
Referenced by CL_PopupInit().
| void CP_Popup | ( | const char * | title, |
| const char * | text, | ||
| ... ) |
Wrapper around UI_Popup.
Definition at line 474 of file cp_popup.cpp.
References cgi, and Q_vsnprintf().
Referenced by AIM_AircraftStart_f(), AIR_SendAircraftToMission(), B_BuildBase_f(), B_BuildBuilding_f(), B_BuildingDestroy_f(), B_BuildingOpenAfterClick_f(), BS_Buy_f(), CL_PopupInterceptClick_f(), E_HireEmployee(), INS_BuildInstallation_f(), MS_AddNewMessage(), PR_ProductionIncrease_f(), RS_AssignScientist(), SAV_GameQuickLoad_f(), and SAV_GameSave_f().
|
static |
Definition at line 55 of file cp_popup.cpp.
Referenced by CL_DisplayHomebasePopup(), and CL_PopupChangeHomebase_f().
|
static |
Data about popup_intercept
Definition at line 48 of file cp_popup.cpp.
Referenced by CL_DisplayPopupInterceptMission(), CL_DisplayPopupInterceptUFO(), CL_PopupInit(), CL_PopupInterceptClick_f(), and CL_PopupInterceptGetAircraft().
|
static |
Further datas needed when popup is clicked
Definition at line 52 of file cp_popup.cpp.
Node used for popup
Definition at line 53 of file cp_popup.cpp.
|
static |
Reservation-popup info Number of entries in the popup list
Definition at line 51 of file cp_popup.cpp.
Referenced by CL_DisplayHomebasePopup(), and CL_PopupChangeHomebase_f().