#include "ui_main.h"
#include "ui_nodes.h"
#include "ui_popup.h"
#include "ui_actions.h"
#include "node/ui_node_abstractnode.h"
Go to the source code of this file.
Defines | |
#define | POPUPBUTTON_WINDOW_NAME "popup_button" |
#define | POPUPBUTTON_NODE_NAME "popup_button_" |
#define | POPUP_WINDOW_NAME "popup" |
Functions | |
void | UI_Popup (const char *title, const char *text) |
Popup on geoscape. | |
uiNode_t * | UI_PopupList (const char *title, const char *headline, linkedList_t *entries, const char *clickAction) |
Generates a popup that contains a list of selectable choices. | |
static void | UI_SetOneButton (uiNode_t *window, const char *button, const char *clickAction) |
Set string and action button. | |
void | UI_PopupButton (const char *title, const char *text, const char *clickAction1, const char *clickText1, const char *tooltip1, const char *clickAction2, const char *clickText2, const char *tooltip2, const char *clickAction3, const char *clickText3, const char *tooltip3) |
Generates a popup that contains up to 3 buttons. | |
Variables | |
char | popupText [UI_MAX_SMALLTEXTLEN] |
strings to be used for popup when text is not static | |
static char | popupAction1 [UI_MAX_SMALLTEXTLEN] |
static char | popupAction2 [UI_MAX_SMALLTEXTLEN] |
static char | popupAction3 [UI_MAX_SMALLTEXTLEN] |
Definition in file ui_popup.c.
#define POPUP_WINDOW_NAME "popup" |
Definition at line 33 of file ui_popup.c.
Referenced by UI_Popup().
#define POPUPBUTTON_NODE_NAME "popup_button_" |
Definition at line 32 of file ui_popup.c.
Referenced by UI_PopupButton().
#define POPUPBUTTON_WINDOW_NAME "popup_button" |
Definition at line 31 of file ui_popup.c.
Referenced by UI_PopupButton().
void UI_Popup | ( | const char * | title, | |
const char * | text | |||
) |
Popup on geoscape.
Definition at line 46 of file ui_popup.c.
References Cvar_Set(), POPUP_WINDOW_NAME, TEXT_POPUP_INFO, UI_IsWindowOnStack(), UI_PushWindow(), and UI_RegisterText().
Referenced by AIM_AircraftStart_f(), AIR_SendAircraftToMission(), B_BuildingOpenAfterClick(), B_CheckBuildingStatusForMenu_f(), B_MarkBuildingDestroy(), B_SetBuildingByClick(), BS_BuyAircraft_f(), BS_BuyItem_f(), BS_CheckAndDoBuyItem(), BS_SellAircraft_f(), CL_BookmarkAdd_f(), CL_CanMultiplayerStart(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_PopupInterceptClick_f(), CL_ResearchType_f(), CP_PopupList(), E_HireEmployee(), GAME_MP_Results(), GAME_MP_StartServer_f(), GAME_SK_Results(), INS_BuildInstallation_f(), Irc_Logic_ReadMessages(), Irc_Proto_ProcessServerMsg(), MP_SaveTeamMultiplayer_f(), PR_ProductionIncrease_f(), PR_QueueNew(), RS_AssignScientist(), RS_ResearchStart_f(), RS_ResearchStop_f(), RS_ShowPedia_f(), SAV_GameContinue_f(), SAV_GameLoad_f(), SAV_GameQuickLoad_f(), SAV_GameSave_f(), TR_CheckAircraft(), TR_CheckAlien(), TR_CheckEmployee(), TR_CheckItem(), and TR_TransferListSelect_f().
void UI_PopupButton | ( | const char * | title, | |
const char * | text, | |||
const char * | clickAction1, | |||
const char * | clickText1, | |||
const char * | tooltip1, | |||
const char * | clickAction2, | |||
const char * | clickText2, | |||
const char * | tooltip2, | |||
const char * | clickAction3, | |||
const char * | clickText3, | |||
const char * | tooltip3 | |||
) |
Generates a popup that contains up to 3 buttons.
[in] | title | Title of the popup. |
[in] | text | Text to display in the popup (use popupText if text is NULL). |
[in] | clickAction1 | Action to perform when one clicked on the first button. |
[in] | clickText1 | String that will be written in first button. |
[in] | tooltip1 | Tooltip of first button. |
[in] | clickAction2 | Action to perform when one clicked on the second button. |
[in] | clickText2 | String that will be written in second button. |
[in] | tooltip2 | Tooltip of second button. |
[in] | clickAction3 | Action to perform when one clicked on the third button. |
[in] | clickText3 | String that will be written in third button. |
[in] | tooltip3 | Tooltip of third button. |
Definition at line 146 of file ui_popup.c.
References Com_Error(), Cvar_Set(), ERR_FATAL, uiNode_s::name, popupAction1, popupAction2, popupAction3, POPUPBUTTON_NODE_NAME, POPUPBUTTON_WINDOW_NAME, popupText, TEXT_POPUP_INFO, UI_GetWindow(), UI_IsWindowOnStack(), UI_PushWindow(), UI_RegisterText(), UI_SetOneButton(), and va().
Referenced by B_MarkBuildingDestroy(), and INS_DestroyInstallation_f().
uiNode_t* UI_PopupList | ( | const char * | title, | |
const char * | headline, | |||
linkedList_t * | entries, | |||
const char * | clickAction | |||
) | [read] |
Generates a popup that contains a list of selectable choices.
[in] | title | Title of the popup. |
[in] | headline | First line of text written in the popup. |
[in] | entries | List of the selectables choices. |
[in] | clickAction | Action to perform when one clicked on the popup. |
Definition at line 61 of file ui_popup.c.
References Com_Error(), Cvar_Set(), uiAction_s::d, EA_CMD, ERR_FATAL, Mem_Free, uiNode_s::name, uiNode_s::onClick, POPUPLIST_NODE_NAME, POPUPLIST_WINDOW_NAME, uiAction_s::terminal, TEXT_LIST, TEXT_POPUP_INFO, UI_GetNode(), UI_GetWindow(), UI_IsWindowOnStack(), UI_PoolAllocAction(), UI_PushWindow(), UI_RegisterLinkedListText(), UI_RegisterText(), and UI_ResetData().
Referenced by CL_DisplayHomebasePopup(), and HUD_PopupFiremodeReservation().
static void UI_SetOneButton | ( | uiNode_t * | window, | |
const char * | button, | |||
const char * | clickAction | |||
) | [static] |
Set string and action button.
[in] | window | window where buttons are modified. |
[in] | button | Name of the node of the button. |
[in] | clickAction | Action to perform when button is clicked. |
Definition at line 106 of file ui_popup.c.
References Com_Error(), uiAction_s::d, EA_CMD, ERR_FATAL, uiNode_s::invis, Mem_Free, uiNode_s::name, uiNode_s::onClick, qfalse, qtrue, uiAction_s::terminal, UI_GetNode(), and UI_PoolAllocAction().
Referenced by UI_PopupButton().
char popupAction1[UI_MAX_SMALLTEXTLEN] [static] |
Definition at line 37 of file ui_popup.c.
Referenced by UI_PopupButton().
char popupAction2[UI_MAX_SMALLTEXTLEN] [static] |
Definition at line 38 of file ui_popup.c.
Referenced by UI_PopupButton().
char popupAction3[UI_MAX_SMALLTEXTLEN] [static] |
Definition at line 39 of file ui_popup.c.
Referenced by UI_PopupButton().
char popupText[UI_MAX_SMALLTEXTLEN] |
strings to be used for popup when text is not static
Definition at line 36 of file ui_popup.c.
Referenced by B_BuildingOpenAfterClick(), B_CheckBuildingStatusForMenu_f(), CL_CanMultiplayerStart(), CP_BaseAttackStartMission(), GAME_MP_Results(), GAME_SK_Results(), Irc_Proto_ProcessServerMsg(), SAV_GameContinue_f(), SAV_GameLoad_f(), SAV_GameQuickLoad_f(), SAV_GameSave_f(), TR_CheckEmployee(), and UI_PopupButton().