ui_main.c File Reference

#include "ui_main.h"
#include "ui_internal.h"
#include "ui_draw.h"
#include "ui_timer.h"
#include "ui_font.h"
#include "ui_sound.h"
#include "../client.h"
Include dependency graph for ui_main.c:

Go to the source code of this file.

Defines

#define MAX_CONFUNC_SIZE   512
#define UI_HUNK_SIZE   2*1024*1024

Functions

static void UI_CheckCvar (const cvar_t *cvar)
int UI_DebugMode (void)
void UI_SetCvar (const char *name, const char *str, float value)
static void UI_Modify_f (void)
 Adds a given value to the numeric representation of a cvar. Also performs min and max check for that value.
static void UI_ModifyWrap_f (void)
 Adds a given value to the numeric representation of a cvar. Also performs min and max check for that value. If there would be an overflow we use the min value - and if there would be an underrun, we use the max value.
static void UI_Translate_f (void)
 Shows the corresponding strings in the UI Example: Options window - fullscreen: yes.
void UI_ExecuteConfunc (const char *fmt,...)
 Executes confunc - just to identify those confuncs in the code - in this frame.
void UI_Reinit (void)
void UI_Shutdown (void)
 Reset and free the UI data hunk.
void UI_Init (void)

Variables

cvar_tmn_sequence
cvar_tmn_hud
uiGlobal_t ui_global
struct memPool_sui_dynStringPool
struct memPool_sui_dynPool
struct memPool_sui_sysPool

Detailed Description

Definition in file ui_main.c.


Define Documentation

#define MAX_CONFUNC_SIZE   512

Definition at line 238 of file ui_main.c.

Referenced by UI_ExecuteConfunc().

#define UI_HUNK_SIZE   2*1024*1024

Definition at line 324 of file ui_main.c.

Referenced by UI_Init().


Function Documentation

static void UI_CheckCvar ( const cvar_t cvar  )  [static]
See also:
UI_DisplayNotice
Todo:
move it into a better file

Definition at line 52 of file ui_main.c.

References _, CVAR_R_CONTEXT, CVAR_R_IMAGES, cvar_s::flags, cvar_s::modified, and UI_DisplayNotice().

Referenced by UI_SetCvar().

int UI_DebugMode ( void   ) 
See also:
UI_DisplayNotice
Todo:
move it into a better file

Definition at line 67 of file ui_main.c.

References cvar_s::integer.

Referenced by UI_Draw(), and UI_GetNodeInTreeAtPosition().

void UI_ExecuteConfunc ( const char *  fmt,
  ... 
)

Executes confunc - just to identify those confuncs in the code - in this frame.

Parameters:
[in] fmt Construct string it will execute (command and param)

Definition at line 244 of file ui_main.c.

References Cmd_ExecuteString(), MAX_CONFUNC_SIZE, and Q_vsnprintf().

Referenced by AC_UpdateMenu(), AIM_AircraftEquipMenuUpdate_f(), AIM_DrawAircraftSlots(), AIM_EmphazeAmmoSlotText(), AIM_NoEmphazeAmmoSlotText(), AIM_UpdateItemDescription(), AIR_AircraftSelect(), B_BaseInit_f(), B_BuildingInit(), BaseSummary_SelectBase_f(), BDEF_BaseDefenceMenuUpdate_f(), BS_BuyItem_f(), BS_BuyType(), BS_BuyType_f(), BS_MarketClick_f(), BS_MarketScroll_f(), BS_SellItem_f(), BS_UpdateItem(), CL_ActorAddToTeamList(), CL_ActorEquipmentSelect_f(), CL_ActorPilotSelect_f(), CL_ActorRemoveFromTeamList(), CL_ActorStateChange(), CL_ActorTeamSelect_f(), CL_AssignPilot_f(), CL_AssignSoldier_f(), CL_DoEndRound(), CL_NationStatsUpdate_f(), CL_ParseTeamInfoMessage(), CL_ResearchSelect_f(), CL_Reset(), CL_UpdateEmployeeList(), CL_UpdateEquipmentMenuParameters_f(), E_EmployeeHire_f(), E_EmployeeList_f(), E_EmployeeListScroll_f(), GAME_InitializeBattlescape(), GAME_MP_StartBattlescape(), GAME_SK_HideDropships(), GAME_SK_HideUFOs(), HOS_UpdateMenu(), HUD_ActorSelectionChangeListener(), HUD_DisplayFiremodeEntry(), HUD_DisplayImpossibleReaction(), HUD_DisplayPossibleReaction(), HUD_HideFiremodes(), HUD_RefreshButtons(), HUD_SetWeaponButton(), HUD_Update(), HUD_UpdateAllActors(), INV_ItemDescription(), INV_UpdateObject_f(), Irc_Client_CmdPrivmsg(), MAP_UpdateGeoscapeDock(), MP_AddChatMessage(), MP_MultiplayerTeamSlotComments_f(), MP_TeamSelect_f(), MP_UpdateActiveTeamList(), MSO_Set(), MSO_UpdateVisibleButtons(), PR_ProductionDown_f(), PR_ProductionIncrease_f(), PR_ProductionInfo(), PR_ProductionStop_f(), PR_ProductionType_f(), PR_ProductionUp_f(), RS_InitGUI(), RS_UpdateResearchStatus(), SAV_GameReadGameComment(), TR_Init_f(), TR_TransferList_Scroll_f(), TR_TransferListClear_f(), TR_TransferSelect(), UI_GenAllRadarMapRelease_f(), UI_GenPreviewRadarMap_f(), UI_MaterialEditorUpdate(), UP_Article(), UP_ChangeDisplay(), UP_Click_f(), UR_DialogInitSell_f(), UR_DialogInitStore_f(), UR_DialogSelectSellNation_f(), and UR_DialogSortByColumn_f().

void UI_Init ( void   ) 
static void UI_Modify_f ( void   )  [static]

Adds a given value to the numeric representation of a cvar. Also performs min and max check for that value.

See also:
UI_ModifyWrap_f

Definition at line 102 of file ui_main.c.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_GetValue(), and Cvar_SetValue().

Referenced by UI_Init().

static void UI_ModifyWrap_f ( void   )  [static]

Adds a given value to the numeric representation of a cvar. Also performs min and max check for that value. If there would be an overflow we use the min value - and if there would be an underrun, we use the max value.

See also:
UI_Modify_f

Definition at line 126 of file ui_main.c.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_GetValue(), and Cvar_SetValue().

Referenced by UI_Init().

void UI_Reinit ( void   ) 

Reinit input and font

Definition at line 258 of file ui_main.c.

References UI_InitFonts(), UI_InvalidateMouse(), and UI_ReleaseInput().

Referenced by VID_Restart_f().

void UI_SetCvar ( const char *  name,
const char *  str,
float  value 
)
Parameters:
[in] name Name of the cvar
[in] str Might be NULL if you want to set a float value
[in] value Float value to set
Todo:
move it into a better file

Definition at line 82 of file ui_main.c.

References Com_Printf(), Cvar_FindVar(), Cvar_Set(), Cvar_SetValue(), cvar_s::name, and UI_CheckCvar().

Referenced by UI_AbstractOptionSetCurrentValue(), UI_BarNodeCapturedMouseMove(), UI_CheckBoxNodeActivate(), UI_NodeSetProperty(), UI_RadioButtonNodeActivate(), and UI_SpinnerNodeStep().

void UI_Shutdown ( void   ) 

Reset and free the UI data hunk.

Note:
Even called in case of an error when CL_Shutdown was called - maybe even before CL_InitLocal (and thus UI_Init) was called
See also:
CL_Shutdown
UI_Init

Definition at line 272 of file ui_main.c.

References uiGlobal_s::adata, uiGlobal_s::adataize, uiNode_s::behaviour, Cmd_Exists(), Cmd_RemoveCommand(), uiNode_s::firstChild, Mem_Free, Mem_FreePool, uiNode_s::name, uiNode_s::next, uiGlobal_s::numWindows, uiNode_s::parent, UI_GetNodeBehaviour(), and uiGlobal_s::windows.

Referenced by CL_Shutdown().

static void UI_Translate_f ( void   )  [static]

Shows the corresponding strings in the UI Example: Options window - fullscreen: yes.

Todo:
overflow check
Todo:
overflow check

Definition at line 149 of file ui_main.c.

References _, Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_GetString(), Cvar_Set(), and MAX_VAR.

Referenced by UI_Init().


Variable Documentation

Todo:
client code should manage itself this vars

Definition at line 35 of file ui_main.c.

Referenced by CL_SequenceStart_f().

Definition at line 41 of file ui_main.c.

Referenced by UI_AbstractValueNew(), UI_AllocNodeWithoutNew(), and UI_ModelNodeNew().

Definition at line 40 of file ui_main.c.

Referenced by UI_FreeStringProperty(), and UI_NodeSetProperty().


Generated by  doxygen 1.6.2