本文整理汇总了C++中uiimport_t类的典型用法代码示例。如果您正苦于以下问题:C++ uiimport_t类的具体用法?C++ uiimport_t怎么用?C++ uiimport_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了uiimport_t类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: UI_Init
/*
=================
UI_Init
=================
*/
void UI_Init( int apiVersion, uiimport_t *uiimport )
{
gameinfo_import_t gameinfo_import;
ui = *uiimport;
if ( apiVersion != UI_API_VERSION ) {
ui.Error( ERR_FATAL, "Bad UI_API_VERSION: expected %i, got %i\n", UI_API_VERSION, apiVersion );
}
_UI_Init(qfalse);
// get static data (glconfig, media)
ui.GetGlconfig( &uis.glconfig );
uis.scaley = uis.glconfig.vidHeight * (1.0/480.0);
uis.scalex = uis.glconfig.vidWidth * (1.0/640.0);
gameinfo_import.FS_FOpenFile = ui.FS_FOpenFile;
gameinfo_import.FS_Read = ui.FS_Read;
gameinfo_import.FS_ReadFile = ui.FS_ReadFile;
gameinfo_import.FS_FreeFile = ui.FS_FreeFile;
gameinfo_import.FS_FCloseFile = ui.FS_FCloseFile;
gameinfo_import.Cvar_Set = ui.Cvar_Set;
gameinfo_import.Cvar_VariableStringBuffer = ui.Cvar_VariableStringBuffer;
gameinfo_import.Cvar_Create = ui.Cvar_Create;
gameinfo_import.Printf = ui.Printf;
// GI_Init( &gameinfo_import );
Menu_Cache( );
ui.Cvar_Create( "cg_drawCrosshair", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create ("s_language", "english", CVAR_ARCHIVE | CVAR_NORESTART);
}
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:40,代码来源:ui_atoms.cpp
示例2: UI_Init
/*
=================
UI_Init
=================
*/
void UI_Init( int apiVersion, uiimport_t *uiimport, qboolean inGameLoad )
{
ui = *uiimport;
if ( apiVersion != UI_API_VERSION ) {
ui.Error( ERR_FATAL, "Bad UI_API_VERSION: expected %i, got %i\n", UI_API_VERSION, apiVersion );
}
// get static data (glconfig, media)
ui.GetGlconfig( &uis.glconfig );
uis.scaley = uis.glconfig.vidHeight * (1.0/480.0);
uis.scalex = uis.glconfig.vidWidth * (1.0/640.0);
Menu_Cache( );
ui.Cvar_Create( "cg_drawCrosshair", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create ("s_language", "english", CVAR_ARCHIVE | CVAR_NORESTART);
#ifndef JK2_MODE
ui.Cvar_Create( "g_char_model", "jedi_tf", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_head", "head_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_torso", "torso_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_skin_legs", "lower_a1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_red", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_green", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_char_color_blue", "255", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber_type", "single", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber", "single_1", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber2", "", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber_color", "yellow", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "g_saber2_color", "yellow", CVAR_ARCHIVE|CVAR_SAVEGAME|CVAR_NORESTART );
ui.Cvar_Create( "ui_forcepower_inc", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "tier_storyinfo", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "tiers_complete", "", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "ui_prisonerobj_currtotal", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "ui_prisonerobj_mintotal", "0", CVAR_ROM|CVAR_SAVEGAME|CVAR_NORESTART);
ui.Cvar_Create( "g_dismemberment", "3", CVAR_ARCHIVE );//0 = none, 1 = arms and hands, 2 = legs, 3 = waist and head
ui.Cvar_Create( "cg_gunAutoFirst", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_crosshairIdentifyTarget", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "g_subtitles", "0", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "d_slowmodeath", "3", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_shadows", "1", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_runpitch", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_runroll", "0.005", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobup", "0.005", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobpitch", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "cg_bobroll", "0.002", CVAR_ARCHIVE );
ui.Cvar_Create( "ui_disableWeaponSway", "0", CVAR_ARCHIVE );
#endif
_UI_Init(inGameLoad);
}
开发者ID:AlexXT,项目名称:OpenJK,代码行数:65,代码来源:ui_atoms.cpp
示例3: UI_DrawNamedPic
/*
================
UI_DrawNamedPic
=================
*/
void UI_DrawNamedPic( float x, float y, float width, float height, const char *picname )
{
qhandle_t hShader;
hShader = ui.R_RegisterShaderNoMip( picname );
ui.R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:12,代码来源:ui_atoms.cpp
示例4: UI_FillRect
/*
================
UI_FillRect
Coordinates are 640*480 virtual values
=================
*/
void UI_FillRect( float x, float y, float width, float height, const float *color )
{
ui.R_SetColor( color );
ui.R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, uis.whiteShader );
ui.R_SetColor( NULL );
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:15,代码来源:ui_atoms.cpp
示例5: UI_RegisterFont
int UI_RegisterFont(const char *fontName)
{
int iFontIndex = ui.R_RegisterFont(fontName);
if (iFontIndex == 0)
{
iFontIndex = ui.R_RegisterFont("ergoec"); // fall back
}
return iFontIndex;
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:10,代码来源:ui_atoms.cpp
示例6: UI_SetActiveMenu
/*
=================
UI_SetActiveMenu -
this should be the ONLY way the menu system is brought up
=================
*/
void UI_SetActiveMenu( const char* menuname,const char *menuID )
{
// this should be the ONLY way the menu system is brought up (besides the UI_ConsoleCommand below)
if (cls.state != CA_DISCONNECTED && !ui.SG_GameAllowedToSaveHere(qtrue)) //don't check full sytem, only if incamera
{
return;
}
if ( !menuname ) {
UI_ForceMenuOff();
return;
}
//make sure force-speed and slowmodeath doesn't slow down menus - NOTE: they should reset the timescale when the game un-pauses
Cvar_SetValue( "timescale", 1.0f );
UI_Cursor_Show(qtrue);
// enusure minumum menu data is cached
Menu_Cache();
if ( Q_stricmp (menuname, "mainMenu") == 0 )
{
UI_MainMenu();
return;
}
if ( Q_stricmp (menuname, "ingame") == 0 )
{
ui.Cvar_Set( "cl_paused", "1" );
UI_InGameMenu(menuID);
return;
}
if ( Q_stricmp (menuname, "datapad") == 0 )
{
ui.Cvar_Set( "cl_paused", "1" );
UI_DataPadMenu();
return;
}
#ifndef JK2_MODE
if ( Q_stricmp (menuname, "missionfailed_menu") == 0 )
{
Menus_CloseAll();
Menus_ActivateByName("missionfailed_menu");
ui.Key_SetCatcher( KEYCATCH_UI );
return;
}
#endif
}
开发者ID:AlexXT,项目名称:OpenJK,代码行数:58,代码来源:ui_atoms.cpp
示例7: UI_SetCvarFloat
void UI_SetCvarFloat( const char *cvar, float value )
{
char s[ 16 ];
sprintf( s, "%f", value );
uii.Cvar_Set( cvar, s );
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:7,代码来源:ui_init.cpp
示例8: UI_SaveMenu_f
/*
===============
UI_SaveMenu_f
===============
*/
static void UI_SaveMenu_f( void )
{
ui.PrecacheScreenshot();
trap_Key_SetCatcher( KEYCATCH_UI );
Menus_ActivateByName("ingamesaveMenu");
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:12,代码来源:ui_atoms.cpp
示例9: UI_DrawHandlePic
/*
================
UI_DrawHandlePic
=================
*/
void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader )
{
float s0;
float s1;
float t0;
float t1;
if( w < 0 ) { // flip about horizontal
w = -w;
s0 = 1;
s1 = 0;
}
else {
s0 = 0;
s1 = 1;
}
if( h < 0 ) { // flip about vertical
h = -h;
t0 = 1;
t1 = 0;
}
else {
t0 = 0;
t1 = 1;
}
ui.R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:34,代码来源:ui_atoms.cpp
示例10: UI_SetCvarInt
void UI_SetCvarInt( const char *cvar, int value )
{
char s[ 16 ];
sprintf( s, "%d", value );
uii.Cvar_Set( cvar, s );
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:7,代码来源:ui_init.cpp
示例11: sizeof
/*
=================
UI_Argv
=================
*/
static char *UI_Argv( int arg )
{
static char buffer[MAX_STRING_CHARS];
ui.Argv( arg, buffer, sizeof( buffer ) );
return buffer;
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:13,代码来源:ui_atoms.cpp
示例12: UI_SaveMenu_f
/*
===============
UI_SaveMenu_f
===============
*/
static void UI_SaveMenu_f( void )
{
#ifdef JK2_MODE
ui.PrecacheScreenshot();
#endif
trap_Key_SetCatcher( KEYCATCH_UI );
Menus_ActivateByName("ingamesaveMenu");
}
开发者ID:AlexXT,项目名称:OpenJK,代码行数:14,代码来源:ui_atoms.cpp
示例13: UI_GetCvarInt
int UI_GetCvarInt( const char *name, int def )
{
cvar_t *cvar = uii.Cvar_Find( name );
if( !cvar )
{
return def;
}
return cvar->integer;
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:11,代码来源:ui_init.cpp
示例14: UI_GetCvarFloat
float UI_GetCvarFloat( const char *name, float def )
{
cvar_t *cvar = uii.Cvar_Find( name );
if( !cvar )
{
return def;
}
return cvar->value;
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:11,代码来源:ui_init.cpp
示例15: UI_ConsoleCommand
qboolean UI_ConsoleCommand( void )
{
char *cmd;
if (!ui.SG_GameAllowedToSaveHere(qtrue)) //only check if incamera
{
return qfalse;
}
cmd = UI_Argv( 0 );
// ensure minimum menu data is available
Menu_Cache();
if ( Q_stricmp (cmd, "ui_cache") == 0 )
{
UI_Cache_f();
return qtrue;
}
if ( Q_stricmp (cmd, "levelselect") == 0 )
{
UI_LoadMenu_f();
return qtrue;
}
if ( Q_stricmp (cmd, "ui_teamOrders") == 0 )
{
UI_SaveMenu_f();
return qtrue;
}
if ( Q_stricmp (cmd, "ui_report") == 0 )
{
UI_Report();
return qtrue;
}
#ifndef JK2_MODE
if ( Q_stricmp (cmd, "ui_load") == 0 )
{
UI_Load();
return qtrue;
}
#endif
return qfalse;
}
开发者ID:AlexXT,项目名称:OpenJK,代码行数:48,代码来源:ui_atoms.cpp
示例16:
const char *UI_ConfigString( int index )
{
return uii.GetConfigstring( index );
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:4,代码来源:ui_init.cpp
示例17: UI_UpdateScreen
/*
=================
UI_UpdateScreen
=================
*/
void UI_UpdateScreen( void )
{
ui.UpdateScreen();
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:9,代码来源:ui_atoms.cpp
示例18: UI_ForceMenuOff
/*
=================
UI_ForceMenuOff
=================
*/
void UI_ForceMenuOff (void)
{
ui.Key_SetCatcher( ui.Key_GetCatcher() & ~KEYCATCH_UI );
ui.Key_ClearStates();
ui.Cvar_Set( "cl_paused", "0" );
}
开发者ID:blaenk,项目名称:jedioutcast,代码行数:11,代码来源:ui_atoms.cpp
示例19: UI_ListFiles
void UI_ListFiles( const char *filespec )
{
ui.fileList.RemoveAllItems();
uii.File_ListFiles( filespec );
}
开发者ID:kingtiger01,项目名称:openmohaa-1,代码行数:5,代码来源:ui_init.cpp
注:本文中的uiimport_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论