Xonotic
|
#include "mapvoting.qh"
#include <client/draw.qh>
#include <client/hud/_mod.qh>
#include <client/hud/panel/scoreboard.qh>
#include <common/mapinfo.qh>
#include <common/util.qh>
Go to the source code of this file.
Variables | |
float | gametypevote |
vector | gtv_text_size |
vector | gtv_text_size_small |
string | mapvote_chosenmap |
float | mv_abstain |
int | mv_columns |
string | mv_desc [MAPVOTE_COUNT] |
float | mv_detail |
float | mv_flags [MAPVOTE_COUNT] |
float | mv_flags_start [MAPVOTE_COUNT] |
string | mv_maps [MAPVOTE_COUNT] |
int | mv_mouse_selection |
int | mv_num_maps |
float | mv_ownvote |
string | mv_pics [MAPVOTE_COUNT] |
string | mv_pk3 [MAPVOTE_COUNT] |
entity | mv_pk3list |
float | mv_preview [MAPVOTE_COUNT] |
int | mv_selection |
int | mv_selection_keyboard |
float | mv_timeout |
float | mv_top2_alpha |
float | mv_top2_time |
float | mv_votes [MAPVOTE_COUNT] |
int | n_ssdirs |
const int | NUM_SSDIRS = 4 |
string | ssdirs [NUM_SSDIRS] |
Definition at line 506 of file mapvoting.qc.
References entity(), LOG_INFO, mv_pk3list, and TC.
Referenced by LocalCommand_mv_download(), and MapVote_CheckPK3().
void GameTypeVote_DrawGameTypeItem | ( | vector | pos, |
float | maxh, | ||
float | tsize, | ||
string | gtype, | ||
string | pic, | ||
float | _count, | ||
int | id | ||
) |
Definition at line 96 of file mapvoting.qc.
References alpha, argv(), autocvar_hud_panel_mapvote_highlight_border, drawborderlines(), drawfill(), DRAWFLAG_NORMAL, drawpic(), drawstring(), entity(), getWrappedLine(), getWrappedLine_remaining, gtv_text_size, gtv_text_size_small, hud_fontsize, MapVote_FormatMapItem(), MapVote_RGB(), max(), mv_desc, mv_flags, mv_flags_start, mv_ownvote, mv_pk3, mv_selection, mv_top2_alpha, next, NULL, panel_fg_alpha, spawn(), TC, tokenizebyseparator, and vector().
Definition at line 619 of file mapvoting.qc.
References autocvar_menu_skin, MapInfo_Type_Description(), MapInfo_Type_FromString(), MapInfo_Type_ToText(), mv_desc, mv_flags, mv_maps, mv_pics, mv_pk3, mv_preview, name, precache_pic(), PreviewExists(), ReadString, strcat(), strlen(), strzone(), and TC.
Referenced by MapVote_Init().
Definition at line 559 of file mapvoting.qc.
References MapVote_CheckPK3(), mv_abstain, mv_num_maps, mv_preview, PreviewExists(), and TC.
Referenced by MapVote_ReadOption().
Definition at line 537 of file mapvoting.qc.
References Cmd_MapVote_MapDownload(), entity(), ftos(), localcmd, mv_pk3list, spawn(), strcat(), TC, and tokenize_console.
Referenced by MapVote_CheckPic().
void MapVote_Draw | ( | ) |
Definition at line 343 of file mapvoting.qc.
References chat_posy, chat_sizey, draw_beginBoldFont, gametypevote, gtv_text_size, gtv_text_size_small, hud_fontsize, HUD_GetFontsize(), HUD_Panel_LoadCvars(), HUD_Scale_Disable(), mv_active, vector(), vid_conheight, vid_conwidth, xmax, xmin, ymax, and ymin.
Definition at line 283 of file mapvoting.qc.
References MapVote_FormatMapItem(), MapVote_RGB(), TC, and vector().
void MapVote_DrawMapItem | ( | vector | pos, |
float | isize, | ||
float | tsize, | ||
string | map, | ||
string | pic, | ||
float | _count, | ||
int | id | ||
) |
Definition at line 208 of file mapvoting.qc.
References autocvar_hud_panel_mapvote_highlight_border, draw_UseSkinFor(), drawborderlines(), drawfill(), DRAWFLAG_NORMAL, drawgetimagesize(), drawpic(), drawstring(), hud_fontsize, MapVote_FormatMapItem(), MapVote_RGB(), max(), min(), mv_flags, mv_ownvote, mv_selection, mv_top2_alpha, panel_fg_alpha, stringwidth, TC, and vector().
Definition at line 62 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawAbstain(), and MapVote_DrawMapItem().
void MapVote_Init | ( | ) |
Definition at line 663 of file mapvoting.qc.
References autocvar_hud_cursormode, gametypevote, GameTypeVote_ReadOption(), mapvote_chosenmap, MapVote_ReadMask(), MapVote_ReadOption(), min(), mousepos, mv_abstain, mv_active, mv_detail, mv_flags, mv_flags_start, mv_num_maps, mv_ownvote, mv_pk3list, mv_selection, mv_selection_keyboard, mv_timeout, mv_votes, n_ssdirs, NULL, NUM_SSDIRS, ReadString, ssdirs, string_null, strzone(), vid_conheight, and vid_conwidth.
Referenced by MapVote_Finished(), MapVote_Think(), and NET_HANDLE().
Definition at line 796 of file mapvoting.qc.
References ftos(), hudShiftState, imp, K_ALT, K_CTRL, K_DOWNARROW, K_ENTER, K_KP_0, K_KP_1, K_KP_2, K_KP_3, K_KP_4, K_KP_5, K_KP_6, K_KP_7, K_KP_8, K_KP_9, K_KP_ENTER, K_LEFTARROW, K_MOUSE1, K_MOUSE2, K_RIGHTARROW, K_SHIFT, K_SPACE, K_UPARROW, localcmd, MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_SendChoice(), min(), mousepos, mv_active, mv_mouse_selection, mv_num_maps, mv_selection, mv_selection_keyboard, S_ALT, S_CTRL, S_SHIFT, strcat(), and TC.
Referenced by CSQC_InputEvent().
Definition at line 774 of file mapvoting.qc.
References imp, mv_columns, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent().
Definition at line 728 of file mapvoting.qc.
References imp, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent().
Definition at line 740 of file mapvoting.qc.
References imp, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent().
Definition at line 752 of file mapvoting.qc.
References ceil(), imp, mv_columns, mv_flags, mv_num_maps, mv_ownvote, and TC.
Referenced by MapVote_InputEvent().
void MapVote_ReadMask | ( | ) |
Definition at line 574 of file mapvoting.qc.
References BIT, mv_flags, and mv_num_maps.
Referenced by MapVote_Init(), and MapVote_UpdateMask().
Definition at line 602 of file mapvoting.qc.
References bound(), MapVote_CheckPic(), mv_flags, mv_maps, mv_pics, mv_pk3, mv_preview, n_ssdirs, ReadString, ssdirs, strcat(), strzone(), and TC.
Referenced by MapVote_Init().
Definition at line 83 of file mapvoting.qc.
References mv_flags, mv_ownvote, mv_selection, and TC.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawAbstain(), and MapVote_DrawMapItem().
Definition at line 310 of file mapvoting.qc.
References mousepos, mv_abstain, mv_mouse_selection, mv_num_maps, mv_selection, and mv_selection_keyboard.
Definition at line 722 of file mapvoting.qc.
References ftos(), localcmd, strcat(), and TC.
Referenced by MapVote_InputEvent().
void MapVote_UpdateMask | ( | ) |
Definition at line 917 of file mapvoting.qc.
References MapVote_ReadMask(), mv_top2_time, and time.
Referenced by NET_HANDLE().
void MapVote_UpdateVotes | ( | ) |
Definition at line 923 of file mapvoting.qc.
References mv_detail, mv_flags, mv_num_maps, mv_ownvote, and mv_votes.
Referenced by NET_HANDLE().
NET_HANDLE | ( | ENT_CLIENT_MAPVOTE | , |
bool | isnew | ||
) |
Definition at line 942 of file mapvoting.qc.
References make_pure, MapVote_Init(), MapVote_UpdateMask(), and MapVote_UpdateVotes().
NET_HANDLE | ( | TE_CSQC_PICTURE | , |
bool | isNew | ||
) |
Definition at line 958 of file mapvoting.qc.
References Net_MapVote_Picture().
void Net_MapVote_Picture | ( | ) |
Definition at line 964 of file mapvoting.qc.
References mv_pics, mv_preview, and strzone().
Referenced by NET_HANDLE().
Definition at line 49 of file mapvoting.qc.
References autocvar_cl_readpicture_force, fexists(), and strcat().
Referenced by GameTypeVote_ReadOption(), and MapVote_CheckPic().
float gametypevote |
Definition at line 40 of file mapvoting.qc.
Referenced by DoNextMapOverride(), GameTypeVote_Finished(), GameTypeVote_Start(), MapVote_CheckRules_2(), MapVote_Draw(), MapVote_Finished(), MapVote_Init(), MapVote_SendEntity(), and MapVote_Suggest().
vector gtv_text_size |
Definition at line 42 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Draw().
vector gtv_text_size_small |
Definition at line 43 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Draw().
string mapvote_chosenmap |
Definition at line 41 of file mapvoting.qc.
Referenced by MapVote_Init().
float mv_abstain |
Definition at line 28 of file mapvoting.qc.
Referenced by MapVote_CheckPic(), MapVote_Init(), and MapVote_Selection().
int mv_columns |
Definition at line 36 of file mapvoting.qc.
Referenced by MapVote_MoveDown(), and MapVote_MoveUp().
string mv_desc[MAPVOTE_COUNT] |
Definition at line 22 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and GameTypeVote_ReadOption().
float mv_detail |
Definition at line 30 of file mapvoting.qc.
Referenced by MapVote_FormatMapItem(), MapVote_Init(), and MapVote_UpdateVotes().
float mv_flags[MAPVOTE_COUNT] |
Definition at line 25 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), GameTypeVote_ReadOption(), MapVote_DrawMapItem(), MapVote_Init(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_ReadMask(), MapVote_ReadOption(), MapVote_RGB(), and MapVote_UpdateVotes().
float mv_flags_start[MAPVOTE_COUNT] |
Definition at line 26 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_Init().
string mv_maps[MAPVOTE_COUNT] |
Definition at line 19 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), and MapVote_ReadOption().
int mv_mouse_selection |
Definition at line 37 of file mapvoting.qc.
Referenced by MapVote_InputEvent(), and MapVote_Selection().
int mv_num_maps |
Definition at line 17 of file mapvoting.qc.
Referenced by MapVote_CheckPic(), MapVote_Init(), MapVote_InputEvent(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_ReadMask(), MapVote_Selection(), and MapVote_UpdateVotes().
float mv_ownvote |
Definition at line 29 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawMapItem(), MapVote_Init(), MapVote_MoveDown(), MapVote_MoveLeft(), MapVote_MoveRight(), MapVote_MoveUp(), MapVote_RGB(), and MapVote_UpdateVotes().
string mv_pics[MAPVOTE_COUNT] |
Definition at line 20 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), MapVote_ReadOption(), and Net_MapVote_Picture().
string mv_pk3[MAPVOTE_COUNT] |
Definition at line 21 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), GameTypeVote_ReadOption(), and MapVote_ReadOption().
entity mv_pk3list |
Definition at line 27 of file mapvoting.qc.
Referenced by Cmd_MapVote_MapDownload(), MapVote_CheckPK3(), and MapVote_Init().
float mv_preview[MAPVOTE_COUNT] |
Definition at line 23 of file mapvoting.qc.
Referenced by GameTypeVote_ReadOption(), MapVote_CheckPic(), MapVote_ReadOption(), and Net_MapVote_Picture().
int mv_selection |
Definition at line 35 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), MapVote_DrawMapItem(), MapVote_Init(), MapVote_InputEvent(), MapVote_RGB(), and MapVote_Selection().
int mv_selection_keyboard |
Definition at line 38 of file mapvoting.qc.
Referenced by MapVote_Init(), MapVote_InputEvent(), and MapVote_Selection().
float mv_timeout |
Definition at line 31 of file mapvoting.qc.
Referenced by MapVote_Init().
float mv_top2_alpha |
Definition at line 33 of file mapvoting.qc.
Referenced by GameTypeVote_DrawGameTypeItem(), and MapVote_DrawMapItem().
float mv_top2_time |
Definition at line 32 of file mapvoting.qc.
Referenced by MapVote_UpdateMask().
float mv_votes[MAPVOTE_COUNT] |
Definition at line 24 of file mapvoting.qc.
Referenced by MapVote_Init(), and MapVote_UpdateVotes().
int n_ssdirs |
Definition at line 47 of file mapvoting.qc.
Referenced by MapVote_Init(), and MapVote_ReadOption().
const int NUM_SSDIRS = 4 |
Definition at line 45 of file mapvoting.qc.
Referenced by MapVote_Init().
string ssdirs[NUM_SSDIRS] |
Definition at line 46 of file mapvoting.qc.
Referenced by MapVote_Init(), and MapVote_ReadOption().