Initial commit of IW4x rawfiles as of IW4x version 0.6.1
This commit is contained in:
1 parent
123c13c92e
commit
aa7fa3afcf
705 files changed
+287401
No files matched your search
@@ -0,0 +1,980 @@
|
||||
//#define ENABLE_BUTTON_BG 1 // enables button background image
|
||||
#define ENABLE_SEPARATOR 1 // enables separator bars
|
||||
#define ENABLE_TITLE_BG 1 // enables menu title background graphics
|
||||
|
||||
/*
|
||||
#ifndef CHOICE_SIZE_X
|
||||
#error "CHOICE_SIZE_X undefined"
|
||||
#endif
|
||||
#ifndef CHOICE_SIZE_Y
|
||||
#error "CHOICE_SIZE_Y undefined"
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef CHOICE_SIZE_X
|
||||
#define CHOICE_SIZE_X 150
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SIZE_Y
|
||||
#define CHOICE_SIZE_Y 22
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SIDEITEM_SIZE_X
|
||||
#define CHOICE_SIDEITEM_SIZE_X 64
|
||||
#endif
|
||||
#ifndef CHOICE_SIDEITEM_SPACING
|
||||
#define CHOICE_SIDEITEM_SPACING 16
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_GROUP
|
||||
#define CHOICE_GROUP ""
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_X_START
|
||||
#define CHOICE_X_START 58
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_X_SPACING
|
||||
#define CHOICE_X_SPACING 250
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_Y_START
|
||||
#define CHOICE_Y_START 82
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_Y_SPACING
|
||||
#define CHOICE_Y_SPACING 20
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_Y_COUNT
|
||||
#define CHOICE_Y_COUNT 20
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXT_OFFSET_X
|
||||
#define CHOICE_TEXT_OFFSET_X 22
|
||||
#endif
|
||||
#ifndef SECTION_TEXT_OFFSET_X
|
||||
#define SECTION_TEXT_OFFSET_X 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_ACCEPT_ALIGN_X
|
||||
#define CHOICE_ACCEPT_ALIGN_X 6
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_ACCEPT_ALIGN_Y
|
||||
#define CHOICE_ACCEPT_ALIGN_Y 2
|
||||
#endif
|
||||
|
||||
#ifndef NEW_X_OFFSET
|
||||
#define NEW_X_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef NEW_Y_OFFSET
|
||||
#define NEW_Y_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef TITLE_Y_OFFSET
|
||||
#define TITLE_Y_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef TITLE_X_OFFSET
|
||||
#define TITLE_X_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_FOCUS_SOUND
|
||||
#define CHOICE_FOCUS_SOUND "mouse_over"
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTSIZE
|
||||
#define CHOICE_TEXTSIZE TEXTSIZE_DEFAULT
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTFONT
|
||||
#define CHOICE_TEXTFONT UI_FONT_NORMAL
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_HEADERCOLOR
|
||||
#define CHOICE_HEADERCOLOR 1 1 1 0.75
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTCOLOR
|
||||
#define CHOICE_TEXTCOLOR 1 1 1 0.5
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTCOLOR_CAPT
|
||||
#define CHOICE_TEXTCOLOR_CAPT CHOICE_TEXTCOLOR
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTSTYLE
|
||||
#define CHOICE_TEXTSTYLE 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTALIGN
|
||||
#define CHOICE_TEXTALIGN ITEM_ALIGN_MIDDLE_LEFT
|
||||
#endif
|
||||
|
||||
#ifndef ALT_HINT_X_OFFSET
|
||||
#define ALT_HINT_X_OFFSET -16
|
||||
#endif
|
||||
|
||||
#ifndef SECTION_X_OFFSET
|
||||
#define SECTION_X_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_TEXTCOLOR_DISABLED
|
||||
#define CHOICE_TEXTCOLOR_DISABLED 0.5 0.5 0.5 0.5
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SEP_WIDTH
|
||||
#define CHOICE_SEP_WIDTH 130
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SEP_OFFSET_X
|
||||
#define CHOICE_SEP_OFFSET_X 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SEP_OFFSET_Y
|
||||
#define CHOICE_SEP_OFFSET_Y 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_DVAR_WIDTH_OFFSET
|
||||
#define CHOICE_DVAR_WIDTH_OFFSET 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_DVAR_TEXTALIGN
|
||||
#define CHOICE_DVAR_TEXTALIGN ITEM_ALIGN_MIDDLE_RIGHT
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_DVAR_OFFSET_X
|
||||
#define CHOICE_DVAR_OFFSET_X (0 - CHOICE_TEXT_OFFSET_X)
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_SEP_BACKGROUND
|
||||
#define CHOICE_SEP_BACKGROUND "gradient_fadein"
|
||||
#endif
|
||||
|
||||
#ifndef HIGHLIGHT_SHADER_ART
|
||||
#define HIGHLIGHT_SHADER_ART "button_highlight_end"
|
||||
#endif
|
||||
|
||||
#ifndef ALTERNATE_HINT_SHADER
|
||||
#define ALTERNATE_HINT_SHADER "alternate_hint"
|
||||
#endif
|
||||
|
||||
#ifndef ALTERNATE_HINT_COLOR
|
||||
#define ALTERNATE_HINT_COLOR 1 1 1 1 //0.55 0.95 0.55 0.9//0 1 0 0.35//0.75 .75 0.8 1
|
||||
#endif
|
||||
|
||||
#ifndef HIGHLIGHT_COLOR
|
||||
#define HIGHLIGHT_COLOR 0.2 0.25 0.35 0.25
|
||||
#endif
|
||||
#ifndef HIGHLIGHT_BORDER_COLOR
|
||||
#define HIGHLIGHT_BORDER_COLOR 0.8 0.95 1 0.4
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_HORIZONTAL_ALIGN
|
||||
#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_DEFAULT
|
||||
#endif
|
||||
#ifndef CHOICE_VERTICAL_ALIGN
|
||||
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_DEFAULT
|
||||
#endif
|
||||
|
||||
#ifndef HIGHLIGHT_BORDER
|
||||
#define HIGHLIGHT_BORDER WINDOW_BORDER_RAISED
|
||||
#endif
|
||||
|
||||
#ifndef HIGHLIGHT_SHADER
|
||||
#define HIGHLIGHT_SHADER "white"
|
||||
#endif
|
||||
|
||||
#ifndef A_BUTTON_SIZE
|
||||
#define A_BUTTON_SIZE 0.33
|
||||
#endif
|
||||
|
||||
#ifndef A_BUTTON_OFFSET_X
|
||||
#define A_BUTTON_OFFSET_X (0-4)
|
||||
#endif
|
||||
|
||||
#ifndef A_BUTTON_FONT
|
||||
#define A_BUTTON_FONT UI_FONT_NORMAL
|
||||
#endif
|
||||
|
||||
#ifndef A_BUTTON_OFFSET_Y
|
||||
#define A_BUTTON_OFFSET_Y 0
|
||||
#endif
|
||||
|
||||
#ifndef A_BUTTON_OFFSET_Y
|
||||
#define A_BUTTON_OFFSET_Y 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PS3
|
||||
#define A_BUTTON_BG_COLOR 0.25 0.25 0.25 1
|
||||
#else
|
||||
#define A_BUTTON_BG_COLOR 0 0 0 1
|
||||
#endif
|
||||
|
||||
#define A_BUTTON_TEXTSTYLE ITEM_TEXTSTYLE_NORMAL
|
||||
|
||||
#ifndef A_BUTTON_COLOR
|
||||
#define A_BUTTON_COLOR 1 1 1 1
|
||||
#endif
|
||||
|
||||
#ifndef BUTTON_BG_COLOR
|
||||
#define BUTTON_BG_COLOR 0.9 0.9 1 0.07
|
||||
#endif
|
||||
|
||||
// ------------ splitscreen ----------------
|
||||
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
#if !defined( CHOICE_SEP_1 ) || !defined( CHOICE_SEP_SPACING )
|
||||
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) 0
|
||||
#elif !defined( CHOICE_SEP_2 )
|
||||
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : CHOICE_SEP_SPACING )
|
||||
#elif !defined( CHOICE_SEP_3 )
|
||||
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : ( (itemIndex <= CHOICE_SEP_2) ? CHOICE_SEP_SPACING : CHOICE_SEP_SPACING * 2 ) )
|
||||
#else
|
||||
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) ((itemIndex <= CHOICE_SEP_1) ? 0 : ( (itemIndex <= CHOICE_SEP_2) ? CHOICE_SEP_SPACING : ( (itemIndex <= CHOICE_SEP_3) ? CHOICE_SEP_SPACING * 2 : CHOICE_SEP_SPACING * 3) ) )
|
||||
#endif
|
||||
|
||||
#define CHOICE_ROW( itemIndex ) ((itemIndex - 1) % CHOICE_Y_COUNT)
|
||||
#define CHOICE_COL( itemIndex ) ((itemIndex - 1 - ((itemIndex - 1) % CHOICE_Y_COUNT)) / CHOICE_Y_COUNT)
|
||||
|
||||
#define CHOICE_X( itemIndex ) (CHOICE_X_START + CHOICE_X_SPACING * CHOICE_COL( itemIndex ))
|
||||
#define CHOICE_Y( itemIndex ) (CHOICE_Y_START + CHOICE_Y_SPACING * CHOICE_ROW( itemIndex ) + CHOICE_SEP_TOTAL_SPACING( itemIndex ))
|
||||
#define CHOICE_ORIGIN( itemIndex ) CHOICE_X( itemIndex ) CHOICE_Y( itemIndex )
|
||||
#define CHOICE_RECT( itemIndex ) CHOICE_ORIGIN( itemIndex ) CHOICE_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN
|
||||
|
||||
#define FOOTNOTE_RECT( x, y ) x y 240 60 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN
|
||||
|
||||
// ======================================================================================================================================
|
||||
// ======================================================================================================================================
|
||||
// ======================================================================================================================================
|
||||
|
||||
#define CHOICE_HIGHLIGHT( itemIndex, vis ) \
|
||||
CHOICE_HIGHLIGHT_CUSTOM( itemIndex, HIGHLIGHT_COLOR, HIGHLIGHT_BORDER_COLOR, vis )
|
||||
|
||||
#define UI_EDGE( porigin, palign, poffset_x, poffset_y, pcolor ) UI_EDGE_RAW( porigin, palign, 5, 20, poffset_x, poffset_y, pcolor )
|
||||
|
||||
#define UI_EDGE_REVERSE( porigin, palign, poffset_x, poffset_y, pcolor ) UI_EDGE_RAW( porigin, palign, -5, 20, poffset_x, poffset_y, pcolor )
|
||||
|
||||
#define UI_EDGE_RAW( porigin, palign, pw, ph, poffset_x, poffset_y, pcolor ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect porigin pw ph palign \
|
||||
origin poffset_x poffset_y \
|
||||
background HIGHLIGHT_SHADER_ART \
|
||||
forecolor pcolor \
|
||||
visible 1; \
|
||||
decoration \
|
||||
} \
|
||||
|
||||
#define CHOICE_BUTTON_BG( itemIndex, visArg ) CHOICE_BUTTON_BG_RAW( itemIndex, "gradient_fadein", BUTTON_BG_COLOR, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_BG_RAW( itemIndex, bgimage, foreColorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X-(CHOICE_SIZE_Y/4)) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp material( bgimage ); \
|
||||
forecolor foreColorArg \
|
||||
visible visArg; \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (CHOICE_X( itemIndex )+(CHOICE_SIZE_X-(CHOICE_SIZE_Y/4))) CHOICE_Y( itemIndex ) (CHOICE_SIZE_Y/4) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER_ART \
|
||||
forecolor foreColorArg \
|
||||
visible visArg; \
|
||||
decoration \
|
||||
} \
|
||||
|
||||
#define CHOICE_HIGHLIGHT_CUSTOM( itemIndex, foreColorArg, borderColorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X-(CHOICE_SIZE_Y/4)) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER \
|
||||
forecolor foreColorArg \
|
||||
border HIGHLIGHT_BORDER \
|
||||
bordersize 2 \
|
||||
bordercolor borderColorArg \
|
||||
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP ); \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (CHOICE_X( itemIndex )+(CHOICE_SIZE_X-(CHOICE_SIZE_Y/4))) CHOICE_Y( itemIndex ) (CHOICE_SIZE_Y/4) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER_ART \
|
||||
forecolor foreColorArg \
|
||||
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP ); \
|
||||
decoration \
|
||||
} \
|
||||
CHOICE_ACCEPT_HINT( itemIndex, visArg )
|
||||
|
||||
// used for custom highlights for itemDefs that are special and can not use itemIndex or complie with the strict alignment of this macro set
|
||||
#define CHOICE_HIGHLIGHT_CUSTOM_2( px, py, pw, ph, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (px+(ph/4)) py (-(pw-(ph/4))) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER \
|
||||
forecolor BUTTON_BG_COLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect px py (-(ph/4)) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER_ART \
|
||||
forecolor BUTTON_BG_COLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (px+(ph/4)) py (-(pw-(ph/4))) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER \
|
||||
forecolor HIGHLIGHT_COLOR \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect px py (-(ph/4)) ph CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
background HIGHLIGHT_SHADER_ART \
|
||||
forecolor HIGHLIGHT_COLOR \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
|
||||
|
||||
//CHOICE_TEXT_OFFSET_X
|
||||
|
||||
#if defined( CONSOLE ) && !defined( SPLITSCREEN )
|
||||
#define CHOICE_ACCEPT_HINT( itemIndex, vis ) \
|
||||
itemDef \
|
||||
{ \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
origin A_BUTTON_OFFSET_X A_BUTTON_OFFSET_Y \
|
||||
text "@PLATFORM_UI_SELECTBUTTON" \
|
||||
textfont A_BUTTON_FONT \
|
||||
textscale A_BUTTON_SIZE \
|
||||
textstyle A_BUTTON_TEXTSTYLE \
|
||||
textAlign CHOICE_TEXTALIGN \
|
||||
textAlignX 0\
|
||||
textAlignY -1\
|
||||
forecolor 1 1 1 1 \
|
||||
visible when( localVarInt( ui_highlight ) == itemIndex && localVarString( ui_choicegroup ) == CHOICE_GROUP && vis ); \
|
||||
decoration \
|
||||
}
|
||||
#else // #if defined( CONSOLE ) && !defined( SPLITSCREEN )
|
||||
#define CHOICE_ACCEPT_HINT( itemIndex, vis )
|
||||
#endif // #else // #if defined( CONSOLE ) && !defined( SPLITSCREEN )
|
||||
|
||||
#define CHOICE_MENU_TITLE_SS( titleArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
origin ORIGIN_TITLE \
|
||||
forecolor COLOR_TITLE \
|
||||
exp text( titleArg ) \
|
||||
textalignx -14 \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_DEFAULT \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textalign ITEM_ALIGN_TOP_LEFT \
|
||||
visible 1 \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_MENU_TITLE( titleArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
origin ORIGIN_TITLE \
|
||||
forecolor COLOR_TITLE \
|
||||
exp text( titleArg ) \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_TITLE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textalign ITEM_ALIGN_TOP_LEFT \
|
||||
textaligny TITLE_Y_OFFSET \
|
||||
textalignx TITLE_X_OFFSET \
|
||||
visible 1 \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_MENU_TITLE_VIS( titleArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
origin ORIGIN_TITLE \
|
||||
forecolor COLOR_TITLE \
|
||||
text titleArg \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_TITLE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textalign ITEM_ALIGN_TOP_LEFT \
|
||||
visible when( visArg ) \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_SECTION_TITLE( itemIndex, titleArg ) \
|
||||
CHOICE_SECTION_TITLE_VIS( itemIndex, titleArg, 1 )
|
||||
|
||||
#define CHOICE_SECTION_TITLE_VIS( itemIndex, titleArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (SECTION_X_OFFSET+0) 7 240 0.5 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
origin CHOICE_ORIGIN( itemIndex ) \
|
||||
background "line_horizontal" \
|
||||
forecolor 1 1 1 0.85 \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (SECTION_X_OFFSET+20) 8 200 10 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
origin CHOICE_ORIGIN( itemIndex ) \
|
||||
background "line_horizontal" \
|
||||
forecolor 0.4 0.6 1 0.8 \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (SECTION_X_OFFSET+0) 19 240 0.5 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
origin CHOICE_ORIGIN( itemIndex ) \
|
||||
background "line_horizontal" \
|
||||
forecolor 1 1 1 0.85 \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect (SECTION_X_OFFSET+0) -1 240 24 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
origin CHOICE_ORIGIN( itemIndex ) \
|
||||
forecolor 1 1 1 0.8 \
|
||||
exp text( titleArg );\
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_DEFAULT \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign ITEM_ALIGN_MIDDLE_CENTER \
|
||||
textAlignX SECTION_TEXT_OFFSET_X \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_SEPARATOR( afterItemIndex ) \
|
||||
CHOICE_SEPARATOR_VIS( afterItemIndex, when( ENABLE_SEPARATOR ) )
|
||||
|
||||
#define CHOICE_SEPARATOR_VIS( afterItemIndex, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (CHOICE_SEP_OFFSET_X) (CHOICE_Y_SPACING + CHOICE_SEP_SPACING / 2 + CHOICE_SEP_OFFSET_Y - 3 ) CHOICE_SEP_WIDTH 8 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
origin CHOICE_ORIGIN( afterItemIndex ) \
|
||||
background CHOICE_SEP_BACKGROUND \
|
||||
forecolor BUTTON_BG_COLOR \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_BUTTON( itemIndex, textArg, actionArg ) \
|
||||
CHOICE_BUTTON_VIS( itemIndex, textArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_BUTTON_NOHI( itemIndex, textArg, actionArg ) \
|
||||
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_BUTTON_VIS( itemIndex, textArg, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_VIS_ADV( itemIndex, textArg, actionArg, visArg, vis ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, vis ) \
|
||||
CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_VIS_NOHI( itemIndex, textArg, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, ;, ;, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, 1 )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, 1 )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS_ADV( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, vis ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, vis ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS_NOHI( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, ; )
|
||||
|
||||
#define CHOICE_BUTTON_EX( itemIndex, textArg, actionArg, extraArgs ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, 1 ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, ;, ;, 1, extraArgs )
|
||||
|
||||
#define CHOICE_BUTTON_EX_ADV( itemIndex, textArg, actionArg, extraArgs, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, 1 ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, ;, ;, visArg, extraArgs )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS_EX_ADV( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs, vis ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, vis ) \
|
||||
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs )
|
||||
|
||||
#define CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( itemIndex, textArg, actionArg, onFocusArg, leaveFocusArg, visArg, extraArgs ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textfont CHOICE_TEXTFONT \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign CHOICE_TEXTALIGN \
|
||||
textAlignX CHOICE_TEXT_OFFSET_X \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
extraArgs \
|
||||
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
|
||||
} \
|
||||
|
||||
|
||||
#define CHOICE_DBUTTON_VIS_NOHI( itemIndex, textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textfont CHOICE_TEXTFONT \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign CHOICE_TEXTALIGN \
|
||||
textAlignX CHOICE_TEXT_OFFSET_X \
|
||||
forecolor CHOICE_TEXTCOLOR_DISABLED \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
|
||||
#define CHOICE_DBUTTON_VIS( itemIndex, textArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign CHOICE_TEXTALIGN \
|
||||
textAlignX CHOICE_TEXT_OFFSET_X \
|
||||
forecolor CHOICE_TEXTCOLOR_DISABLED \
|
||||
visible visArg \
|
||||
decoration \
|
||||
} \
|
||||
|
||||
#define CHOICE_DVARENUMLIST( itemIndex, textArg, dvarArg, dvarListArg, actionArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_DVARENUM, dvarEnumList dvarListArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVARENUMLIST_VIS( itemIndex, textArg, dvarArg, dvarListArg, actionArg, visArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_DVARENUM, dvarEnumList dvarListArg, actionArg, visArg )
|
||||
|
||||
#define CHOICE_DVARSTRINGLIST( itemIndex, textArg, dvarArg, strListArg, actionArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarStrList strListArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVARSTRINGLIST_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, visArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarStrList strListArg, actionArg, visArg )
|
||||
|
||||
#define CHOICE_DVARFLOATLIST( itemIndex, textArg, dvarArg, strListArg, actionArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVARFLOATLIST_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, visArg ) \
|
||||
CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, visArg )
|
||||
|
||||
#define CHOICE_DVARFLOATLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, strListArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
|
||||
CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, ITEM_TYPE_MULTI, dvarFloatList strListArg, actionArg, onFocusArg, leaveFocusArg, visArg )
|
||||
|
||||
#define CHOICE_DVARLIST_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, visArg ) \
|
||||
CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, ;, ;, visArg )
|
||||
|
||||
#define CHOICE_DVARLIST_FOCUS_VIS( itemIndex, textArg, dvarArg, listTypeArg, listArg, actionArg, onFocusArg, leaveFocusArg, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type listTypeArg \
|
||||
dvar dvarArg \
|
||||
listArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+CHOICE_DVAR_WIDTH_OFFSET) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign CHOICE_DVAR_TEXTALIGN \
|
||||
textalignx CHOICE_DVAR_OFFSET_X \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg ; \
|
||||
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
|
||||
}
|
||||
|
||||
#define CHOICE_STATUS_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textalign ITEM_ALIGN_MIDDLE_RIGHT \
|
||||
textalignx (0 - CHOICE_TEXT_OFFSET_X) \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor colorArg \
|
||||
visible visArg ; \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_NEWICON_VIS( itemIndex, imageArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect (CHOICE_X( itemIndex ) + CHOICE_SIZE_X + NEW_X_OFFSET ) (CHOICE_Y( itemIndex )+2+NEW_Y_OFFSET) (CHOICE_SIZE_Y*2) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp material( imageArg ) \
|
||||
visible visArg ; \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_LEFTITEM_VIS( itemIndex, textArg, colorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect (CHOICE_X( itemIndex ) - CHOICE_SIDEITEM_SIZE_X - CHOICE_SIDEITEM_SPACING) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp text( textArg ); \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textfont CHOICE_TEXTFONT \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor colorArg \
|
||||
visible visArg ; \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_RIGHTITEM_VIS( itemIndex, textArg, colorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_TEXT \
|
||||
rect (CHOICE_X( itemIndex ) + CHOICE_SIDEITEM_SIZE_X + CHOICE_SIDEITEM_SPACING) CHOICE_Y( itemIndex ) CHOICE_SIDEITEM_SIZE_X CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp text( textArg ); \
|
||||
textalign ITEM_ALIGN_MIDDLE_RIGHT \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor colorArg \
|
||||
visible visArg ; \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_DVAREDIT_NUMERIC( itemIndex, textArg, dvarArg, max_chars, actionArg ) \
|
||||
CHOICE_DVAREDIT_NUMERIC_VIS( itemIndex, textArg, dvarArg, max_chars, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVAREDIT_NUMERIC_VIS( itemIndex, textArg, dvarArg, max_chars, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, 1 ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_CAPTION( itemIndex, textArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_NUMERICFIELD \
|
||||
text " " \
|
||||
dvar dvarArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textalignx (CHOICE_SIZE_X+8) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
maxChars max_chars \
|
||||
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_DVAREDIT( itemIndex, textArg, dvarArg, actionArg ) \
|
||||
CHOICE_DVAREDIT_VIS( itemIndex, textArg, dvarArg, 31, 18, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVAREDIT_VIS( itemIndex, textArg, dvarArg, max_chars, max_paintchars, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, 1 ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_CAPTION( itemIndex, textArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_EDITFIELD \
|
||||
text " " \
|
||||
dvar dvarArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textalignx (CHOICE_SIZE_X+8) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
maxChars max_chars \
|
||||
maxpaintchars max_paintchars \
|
||||
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
|
||||
}
|
||||
|
||||
#define CHOICE_DVARSLIDER( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg ) \
|
||||
CHOICE_DVARSLIDER_VIS( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVARSLIDER_VIS( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, visArg ) \
|
||||
CHOICE_DVARSLIDER_VIS_EX( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, ;, 1 )
|
||||
|
||||
#define CHOICE_DVARSLIDER_VIS_EX( itemIndex, textArg, dvarArg, defaultArg, minArg, maxArg, actionArg, extraArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, 1 ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_CAPTION( itemIndex, textArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_SLIDER \
|
||||
dvarfloat dvarArg defaultArg minArg maxArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textalignx (CHOICE_SIZE_X+20) /*(-(CHOICE_TEXT_OFFSET_X))*/ \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
extraArg \
|
||||
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_DVARYESNO( itemIndex, textArg, dvarArg, actionArg ) \
|
||||
CHOICE_DVARYESNO_VIS( itemIndex, textArg, dvarArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_DVARYESNO_VIS( itemIndex, textArg, dvarArg, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, 1 ) \
|
||||
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_YESNO \
|
||||
dvar dvarArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
|
||||
}
|
||||
|
||||
#define CHOICE_BIND( itemIndex, textArg, cmdArg, actionArg ) \
|
||||
CHOICE_BIND_VIS( itemIndex, textArg, cmdArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_BIND_VIS( itemIndex, textArg, cmdArg, actionArg, visArg ) \
|
||||
CHOICE_BUTTON_BG( itemIndex, visArg ) \
|
||||
CHOICE_HIGHLIGHT( itemIndex, visArg ) \
|
||||
CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BIND \
|
||||
dvar cmdArg \
|
||||
rect CHOICE_ORIGIN( itemIndex ) (CHOICE_SIZE_X+120) CHOICE_SIZE_Y CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
textalignx (CHOICE_SIZE_X+20)/*(-(CHOICE_TEXT_OFFSET_X))*/ \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, show keyBindStatus, hide keyBindStatus ) \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_CAPTION( itemIndex, textArg ) \
|
||||
CHOICE_CAPTION_VIS( itemIndex, textArg, 1 )
|
||||
|
||||
#define CHOICE_CAPTION_COLOR( itemIndex, textArg, colorArg ) \
|
||||
CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, colorArg, 1 )
|
||||
|
||||
#define CHOICE_CAPTION_VIS( itemIndex, textArg, visArg ) \
|
||||
CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, CHOICE_TEXTCOLOR_CAPT, visArg )
|
||||
|
||||
#define CHOICE_CAPTION_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign CHOICE_TEXTALIGN \
|
||||
textAlignX CHOICE_TEXT_OFFSET_X \
|
||||
forecolor colorArg \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_SUBTEXT_COLOR_VIS( itemIndex, textArg, colorArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect CHOICE_RECT( itemIndex ) \
|
||||
exp text( textArg ); \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale CHOICE_TEXTSIZE \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
textAlign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
forecolor colorArg \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_SCRIPTS_ACTION( itemIndex, actionArg ) \
|
||||
CHOICE_SCRIPTS_ALL( itemIndex, actionArg, ;, ; )
|
||||
|
||||
|
||||
|
||||
#define CHOICE_SCRIPTS_ALL( itemIndex, actionArg, onFocusArg, leaveFocusArg ) \
|
||||
onFocus \
|
||||
{ \
|
||||
play CHOICE_FOCUS_SOUND; \
|
||||
setLocalVarInt ui_highlight itemIndex; \
|
||||
setLocalVarString ui_choicegroup CHOICE_GROUP; \
|
||||
onFocusArg \
|
||||
} \
|
||||
leaveFocus \
|
||||
{ \
|
||||
setLocalVarInt ui_highlight 0; \
|
||||
leaveFocusArg \
|
||||
} \
|
||||
action \
|
||||
{ \
|
||||
play "mouse_click"; \
|
||||
actionArg; \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_APPLY( textArg, actionArg ) \
|
||||
CHOICE_APPLY_VIS( textArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_APPLY_VIS( textArg, actionArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect 430 422 100 16 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
text textArg \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_DEFAULT \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
textAlign ITEM_ALIGN_MIDDLE_CENTER \
|
||||
forecolor COLOR_FOCUSED \
|
||||
visible visArg ; \
|
||||
action \
|
||||
{ \
|
||||
play "mouse_click"; \
|
||||
actionArg; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define CHOICE_BACK( textArg, actionArg ) \
|
||||
CHOICE_BACK_VIS( textArg, actionArg, 1 )
|
||||
|
||||
#define CHOICE_BACK_VIS( textArg, actionArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect 270 422 100 16 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
text textArg \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_DEFAULT \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
textAlign ITEM_ALIGN_MIDDLE_CENTER \
|
||||
forecolor COLOR_FOCUSED \
|
||||
visible visArg ; \
|
||||
action \
|
||||
{ \
|
||||
play "mouse_click"; \
|
||||
actionArg; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_FOOTNOTE( textArg, x, y ) \
|
||||
CHOICE_FOOTNOTE_VIS( textArg, x, y, 1 )
|
||||
|
||||
#define CHOICE_FOOTNOTE_VIS( textArg, x, y, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
text textArg \
|
||||
rect FOOTNOTE_RECT( x, y ) \
|
||||
autowrapped \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale TEXTSIZE_SMALL \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
textalign ITEM_ALIGN_TOP_LEFT \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
|
||||
#define CHOICE_KEYBINDHELP \
|
||||
itemDef \
|
||||
{ \
|
||||
name keyBindStatus \
|
||||
rect -190 -8 300 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM \
|
||||
ownerdraw UI_KEYBINDSTATUS \
|
||||
textstyle ITEM_TEXTSTYLE_SHADOWED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
backcolor 0 0 0 0 \
|
||||
forecolor .9 .9 .9 1 \
|
||||
border 0 \
|
||||
bordercolor .5 .5 .5 .5 \
|
||||
textscale TEXTSIZE_SMALL \
|
||||
textalign ITEM_ALIGN_MIDDLE_LEFT \
|
||||
visible 0 \
|
||||
decoration \
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,406 @@
|
||||
// Assumes that "choices_setup_common" has already been included
|
||||
|
||||
#ifndef CHOICE_POPUP_BORDER_X
|
||||
#define CHOICE_POPUP_BORDER_X 19
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_BORDER_Y
|
||||
#define CHOICE_POPUP_BORDER_Y 20
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_TITLE_WIDTH
|
||||
#define CHOICE_POPUP_TITLE_WIDTH 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_TITLE_HEIGHT
|
||||
#define CHOICE_POPUP_TITLE_HEIGHT 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_TITLE_TEXTSIZE
|
||||
#define CHOICE_POPUP_TITLE_TEXTSIZE TEXTSIZE_DEFAULT
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_SUBTITLE_WIDTH
|
||||
#define CHOICE_POPUP_SUBTITLE_WIDTH 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_SUBTITLE_HEIGHT
|
||||
#define CHOICE_POPUP_SUBTITLE_HEIGHT 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_SUBTITLE_TEXTSIZE
|
||||
#define CHOICE_POPUP_SUBTITLE_TEXTSIZE TEXTSIZE_SMALL
|
||||
#endif
|
||||
|
||||
#ifndef CENTER_POPUP_ON_CLOSE
|
||||
#define CENTER_POPUP_ON_CLOSE play "mouse_click";
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_BORDER_WIDTH
|
||||
#define CHOICE_POPUP_BORDER_WIDTH 2
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_BORDER_COLOR
|
||||
#define CHOICE_POPUP_BORDER_COLOR 1 1 1 0.5
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_BACKCOLOR
|
||||
#define CHOICE_POPUP_BACKCOLOR 0.2 0.2 0.22 1 //0.85 //0.1412 0.1412 0.1812 0.75
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_BACKCOLOR_NOALPHA
|
||||
#define CHOICE_POPUP_BACKCOLOR_NOALPHA 0.1412 0.1412 0.1812
|
||||
#endif
|
||||
|
||||
#undef CHOICE_FOCUS_SOUND
|
||||
#define CHOICE_FOCUS_SOUND "mouse_submenu_over"
|
||||
|
||||
#ifndef CHOICE_POPUP_OFFSET_X
|
||||
#define CHOICE_POPUP_OFFSET_X 0
|
||||
#endif
|
||||
|
||||
#ifndef CHOICE_POPUP_OFFSET_Y
|
||||
#define CHOICE_POPUP_OFFSET_Y 0
|
||||
#endif
|
||||
|
||||
#define CHOICE_POPUP_WIDTH ((CHOICE_POPUP_BORDER_X * 2) + ((CHOICE_POPUP_TITLE_WIDTH > CHOICE_SIZE_X) ? CHOICE_POPUP_TITLE_WIDTH : CHOICE_SIZE_X))
|
||||
#define CHOICE_POPUP_HEIGHT( itemCount ) (CHOICE_POPUP_TITLE_HEIGHT + CHOICE_POPUP_SUBTITLE_HEIGHT + (CHOICE_Y_SPACING * (itemCount) + CHOICE_POPUP_BORDER_Y * 2))
|
||||
|
||||
#ifndef POPUP_NOPOS
|
||||
#undef CHOICE_X_START
|
||||
#define CHOICE_X_START ((CHOICE_POPUP_WIDTH - CHOICE_SIZE_X) / 2 - 2)
|
||||
|
||||
#undef CHOICE_Y_START
|
||||
#define CHOICE_Y_START (CHOICE_POPUP_TITLE_HEIGHT + CHOICE_POPUP_SUBTITLE_HEIGHT + CHOICE_POPUP_BORDER_Y)
|
||||
|
||||
#undef CHOICE_SEP_TOTAL_SPACING
|
||||
#define CHOICE_SEP_TOTAL_SPACING( itemIndex ) 0
|
||||
|
||||
#undef CHOICE_GROUP
|
||||
#define CHOICE_GROUP "popmenu"
|
||||
#endif
|
||||
|
||||
#define CHOICE_SIDEIMAGE_X 0
|
||||
#define CHOICE_SIDEIMAGE_Y 0
|
||||
|
||||
#define CHOICE_SIDETITLE_X 0
|
||||
#define CHOICE_SIDETITLE_Y 0
|
||||
|
||||
#define CHOICE_SIDETEXT_X 0
|
||||
#define CHOICE_SIDETEXT_Y 0
|
||||
|
||||
|
||||
#define CHOICE_POPMENU_SETUP( nameArg, itemCount, xArg, yArg, onEscArg ) \
|
||||
CHOICE_POPMENU_SETUP_ONOPEN( nameArg, itemCount, xArg, yArg, onEscArg, focusfirst )
|
||||
|
||||
#define CHOICE_POPMENU_SETUP_ONOPEN( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg ) \
|
||||
CHOICE_POPMENU_SETUP_ONOPEN_EX( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg, ; )
|
||||
|
||||
|
||||
#define CHOICE_POPMENU_SETUP_ONOPEN_EX( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg, extraArgs ) \
|
||||
name nameArg \
|
||||
fullscreen 0 \
|
||||
rect (xArg + 1) (yArg + 1) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
backcolor CHOICE_POPUP_BACKCOLOR \
|
||||
border 1 \
|
||||
bordersize CHOICE_POPUP_BORDER_WIDTH \
|
||||
bordercolor CHOICE_POPUP_BORDER_COLOR \
|
||||
focusColor COLOR_FOCUSED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
popup \
|
||||
extraArgs \
|
||||
onOpen \
|
||||
{ \
|
||||
onOpenArg; \
|
||||
} \
|
||||
onESC \
|
||||
{ \
|
||||
play "mouse_click"; \
|
||||
close self; \
|
||||
onEscArg; \
|
||||
}
|
||||
|
||||
#define CHOICE_POPMENU_TITLE( textArg ) \
|
||||
CHOICE_POPMENU_TITLE_VIS( textArg, 1 )
|
||||
|
||||
#define CHOICE_POPMENU_TITLE_VIS( textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect ((CHOICE_POPUP_WIDTH - CHOICE_POPUP_TITLE_WIDTH) / 2) (CHOICE_POPUP_BORDER_Y/2) CHOICE_POPUP_TITLE_WIDTH CHOICE_POPUP_TITLE_HEIGHT CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp text(textArg); \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale CHOICE_POPUP_TITLE_TEXTSIZE \
|
||||
textAlign ITEM_ALIGN_TOP_CENTER \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
decoration \
|
||||
}
|
||||
|
||||
#define CHOICE_POPMENU_SUBTITLE( textArg ) \
|
||||
CHOICE_POPMENU_SUBTITLE_VIS( textArg, 1 )
|
||||
|
||||
#define CHOICE_POPMENU_SUBTITLE_VIS( textArg, visArg ) \
|
||||
itemDef \
|
||||
{ \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect CHOICE_POPUP_BORDER_X (CHOICE_POPUP_BORDER_Y + CHOICE_POPUP_TITLE_HEIGHT) (CHOICE_POPUP_WIDTH - (CHOICE_POPUP_BORDER_Y*2)) CHOICE_POPUP_SUBTITLE_HEIGHT CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
exp text(textArg); \
|
||||
textfont UI_FONT_NORMAL \
|
||||
textscale CHOICE_POPUP_SUBTITLE_TEXTSIZE \
|
||||
textAlign ITEM_ALIGN_TOP_LEFT \
|
||||
textstyle CHOICE_TEXTSTYLE \
|
||||
forecolor CHOICE_TEXTCOLOR \
|
||||
visible visArg \
|
||||
decoration \
|
||||
autowrapped \
|
||||
}
|
||||
|
||||
#ifdef PC
|
||||
#define PREPROC_CANCEL_OVERLAY(shadow_visArg,itemCount) \
|
||||
itemDef { \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect -600 -800 2000 2000 0 0 \
|
||||
text "" \
|
||||
textfont UI_FONT_NORMAL \
|
||||
visible 1 \
|
||||
onfocus{ setdvar ui_popup_close_icon "1" } \
|
||||
leavefocus{ setdvar ui_popup_close_icon "0" } \
|
||||
action{ close self; } \
|
||||
}\
|
||||
itemDef { \
|
||||
type ITEM_TYPE_BUTTON \
|
||||
rect -4 -4 CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) 0 0 \
|
||||
text "" \
|
||||
textfont UI_FONT_NORMAL \
|
||||
visible 1 \
|
||||
action{ ; } \
|
||||
}\
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect -600 -800 2000 2000 0 0 \
|
||||
forecolor 0 0 0 0.275 \
|
||||
exp material( "white" ); \
|
||||
visible when( shadow_visArg ); \
|
||||
decoration \
|
||||
}
|
||||
#else
|
||||
#define PREPROC_CANCEL_OVERLAY(shadow_visArg,itemCount) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect -600 -800 2000 2000 0 0 \
|
||||
forecolor 0 0 0 0.275 \
|
||||
exp material( "white" ); \
|
||||
visible when( shadow_visArg ); \
|
||||
decoration \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define IMPROVED_POPUP_SETUP( nameArg, itemCount, xArg, yArg, onEscArg, shadow_visArg ) \
|
||||
IMPROVED_POPUP_SETUP_ONOPEN( nameArg, itemCount, xArg, yArg, onEscArg, focusfirst, shadow_visArg )
|
||||
|
||||
#define IMPROVED_POPUP_SETUP_ONOPEN( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg, shadow_visArg ) \
|
||||
IMPROVED_POPUP_SETUP_RAW( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg, ;, shadow_visArg )
|
||||
|
||||
#define IMPROVED_POPUP_SETUP_RAW( nameArg, itemCount, xArg, yArg, onEscArg, onOpenArg, extraArgs, shadow_visArg ) \
|
||||
name nameArg \
|
||||
visible 0 \
|
||||
fullscreen 0 \
|
||||
rect (xArg+0) (yArg+56) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN \
|
||||
tokenReplacement \
|
||||
border 1 \
|
||||
bordersize CHOICE_POPUP_BORDER_WIDTH \
|
||||
bordercolor 0 0 0 0 \
|
||||
focusColor COLOR_FOCUSED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
popup \
|
||||
extraArgs \
|
||||
onOpen \
|
||||
{ \
|
||||
onOpenArg; \
|
||||
} \
|
||||
onESC \
|
||||
{ \
|
||||
play "mouse_click"; \
|
||||
close self; \
|
||||
onEscArg; \
|
||||
}\
|
||||
PREPROC_CANCEL_OVERLAY( shadow_visArg, itemCount ) \
|
||||
PREPROC_SHADER_DRAW( -4 -4 CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ), 0 0, "white", CHOICE_POPUP_BACKCOLOR, 1, CHOICE_POPUP_BORDER_WIDTH, CHOICE_POPUP_BORDER_COLOR )
|
||||
|
||||
//PREPROC_TEXT_DRAW( 0 0 10 10, 0 0, text "x", TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_MIDDLE_LEFT, CHOICE_POPUP_BORDER_COLOR visible when( dvarInt(ui_popup_close_icon) ); )
|
||||
|
||||
//PREPROC_SHADER_DRAW( -4 -4 CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ), 0 0, "white", 0 0 0 0, 1, CHOICE_POPUP_BORDER_WIDTH, 0 0 0 0.8 visible when( dvarInt(ui_popup_close_icon) ); )
|
||||
|
||||
#define CENTER_POPUP_SETUP( nameArg, itemCount, onEscArg, shadow_visArg ) \
|
||||
CENTER_POPUP_SETUP_ONOPEN( nameArg, itemCount, onEscArg, focusfirst, shadow_visArg )
|
||||
|
||||
#define CENTER_POPUP_SETUP_ONOPEN( nameArg, itemCount, onEscArg, onOpenArg, shadow_visArg ) \
|
||||
CENTER_POPUP_SETUP_RAW( nameArg, itemCount, onEscArg, onOpenArg, ;, shadow_visArg )
|
||||
|
||||
#ifndef NO_BG_CLOSE
|
||||
#define CENTER_POPUP_SETUP_RAW( nameArg, itemCount, onEscArg, onOpenArg, extraArgs, shadow_visArg ) \
|
||||
name nameArg \
|
||||
fullscreen 0 \
|
||||
rect (0-(CHOICE_POPUP_WIDTH/2)) (0-(CHOICE_POPUP_HEIGHT( itemCount )/2)) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
tokenReplacement \
|
||||
border 1 \
|
||||
backcolor 0 0 0 0 \
|
||||
bordersize CHOICE_POPUP_BORDER_WIDTH \
|
||||
bordercolor CHOICE_POPUP_BORDER_COLOR \
|
||||
focusColor COLOR_FOCUSED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
popup \
|
||||
extraArgs \
|
||||
onOpen \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 1; \
|
||||
onOpenArg; \
|
||||
} \
|
||||
onClose \
|
||||
{ \
|
||||
CENTER_POPUP_ON_CLOSE \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
} \
|
||||
onESC \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
close self; \
|
||||
onEscArg; \
|
||||
} \
|
||||
PREPROC_CANCEL_OVERLAY( shadow_visArg, itemCount ) \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_BORDER_WIDTH*2)) (CHOICE_POPUP_HEIGHT( itemCount )-(CHOICE_POPUP_BORDER_WIDTH*2)) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
background "white" \
|
||||
forecolor CHOICE_POPUP_BACKCOLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
}
|
||||
#else
|
||||
#define CENTER_POPUP_SETUP_RAW( nameArg, itemCount, onEscArg, onOpenArg, extraArgs, shadow_visArg ) \
|
||||
name nameArg \
|
||||
fullscreen 0 \
|
||||
rect (0-(CHOICE_POPUP_WIDTH/2)) (0-(CHOICE_POPUP_HEIGHT( itemCount )/2)) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
tokenReplacement \
|
||||
border 1 \
|
||||
backcolor 0 0 0 0 \
|
||||
bordersize CHOICE_POPUP_BORDER_WIDTH \
|
||||
bordercolor CHOICE_POPUP_BORDER_COLOR \
|
||||
focusColor COLOR_FOCUSED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
popup \
|
||||
extraArgs \
|
||||
onOpen \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 1; \
|
||||
onOpenArg; \
|
||||
} \
|
||||
onClose \
|
||||
{ \
|
||||
CENTER_POPUP_ON_CLOSE \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
} \
|
||||
onESC \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
close self; \
|
||||
onEscArg; \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_BORDER_WIDTH*2)) (CHOICE_POPUP_HEIGHT( itemCount )-(CHOICE_POPUP_BORDER_WIDTH*2)) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
background "white" \
|
||||
forecolor CHOICE_POPUP_BACKCOLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PUBLIC_BETA
|
||||
#define CENTER_POPUP_SETUP_BETA( nameArg, itemCount, onEscArg, onOpenArg, extraArgs, shadow_visArg ) \
|
||||
name nameArg \
|
||||
fullscreen 0 \
|
||||
rect (0-(CHOICE_POPUP_WIDTH/2)) (0-(CHOICE_POPUP_HEIGHT( itemCount )/2)) CHOICE_POPUP_WIDTH CHOICE_POPUP_HEIGHT( itemCount ) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
border 0 \
|
||||
backcolor 0 0 0 0 \
|
||||
focusColor COLOR_FOCUSED \
|
||||
style WINDOW_STYLE_FILLED \
|
||||
popup \
|
||||
extraArgs \
|
||||
onOpen \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 1; \
|
||||
onOpenArg; \
|
||||
} \
|
||||
onClose \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
} \
|
||||
onESC \
|
||||
{ \
|
||||
setLocalVarBool ui_centerPopup 0; \
|
||||
play "mouse_click"; \
|
||||
close self; \
|
||||
onEscArg; \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_BORDER_WIDTH*2)) (CHOICE_POPUP_HEIGHT( itemCount )-(CHOICE_POPUP_BORDER_WIDTH*2)) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
background "white" \
|
||||
forecolor CHOICE_POPUP_BACKCOLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 (CHOICE_POPUP_TITLE_HEIGHT/4) CHOICE_POPUP_WIDTH (CHOICE_POPUP_HEIGHT( itemCount )-(CHOICE_POPUP_TITLE_HEIGHT/4)) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
background "white" \
|
||||
forecolor CHOICE_POPUP_BACKCOLOR \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_TITLE_HEIGHT/4)) CHOICE_POPUP_TITLE_HEIGHT HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
forecolor 0.1 0.1 0.1 1 \
|
||||
exp material( "white" ); \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect 0 0 (CHOICE_POPUP_WIDTH-(CHOICE_POPUP_TITLE_HEIGHT/4)) CHOICE_POPUP_TITLE_HEIGHT HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
forecolor 0.9 0.95 1 0.4 \
|
||||
exp material( "gradient_fadein" ); \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect ((CHOICE_POPUP_WIDTH-0)-(CHOICE_POPUP_TITLE_HEIGHT/4)) 0 (CHOICE_POPUP_TITLE_HEIGHT/4) (CHOICE_POPUP_TITLE_HEIGHT) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
forecolor 0.1 0.1 0.1 1 \
|
||||
exp material( "button_highlight_end" ); \
|
||||
visible 1 \
|
||||
decoration \
|
||||
} \
|
||||
itemDef \
|
||||
{ \
|
||||
style WINDOW_STYLE_SHADER \
|
||||
rect ((CHOICE_POPUP_WIDTH-0)-(CHOICE_POPUP_TITLE_HEIGHT/4)) 0 (CHOICE_POPUP_TITLE_HEIGHT/4) (CHOICE_POPUP_TITLE_HEIGHT) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER \
|
||||
forecolor 0.9 0.95 1 0.4 \
|
||||
exp material( "button_highlight_end" ); \
|
||||
visible 1 \
|
||||
decoration \
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "ui/menudefinition.h"
|
||||
|
||||
// Size define for the hud compass
|
||||
// These are used for both the dynamic & non-dynamic compass drawing
|
||||
// If these are changed, the cgame should be recompiled
|
||||
#define COMPASS_SIZE 109
|
||||
#define MINIMAP_X 11.5
|
||||
#define MINIMAP_Y 5
|
||||
#define MINIMAP_W 89.5
|
||||
#define MINIMAP_H 89.5
|
||||
|
||||
#define COMPASS_SIZE_MP 125
|
||||
#define MINIMAP_X_MP 0
|
||||
#define MINIMAP_Y_MP 12
|
||||
#define MINIMAP_W_MP 102
|
||||
#define MINIMAP_H_MP 102
|
||||
|
||||
#define FULLSCREEN 0 0 640 480
|
||||
#define FULLSCREEN_WIDE -107 0 854 480
|
||||
|
||||
#define ORIGIN_TITLE 48 40
|
||||
#define ORIGIN_TITLE_SS 104 120
|
||||
|
||||
//#define FONTSCALE_SMALL 0.3125 // 15
|
||||
//#define FONTSCALE_SMALL 0.3333 // 16
|
||||
#define FONTSCALE_SMALL 0.3750 // 18
|
||||
#define FONTSCALE_NORMAL 0.4583
|
||||
#define FONTSCALE_BOLD 0.4583
|
||||
#define FONTSCALE_BIG 0.5833
|
||||
#define FONTSCALE_EXTRABIG 1.0000
|
||||
|
||||
// new settings
|
||||
#define TEXTSIZE_SMALL FONTSCALE_SMALL
|
||||
#define TEXTSIZE_SMALL_SS (FONTSCALE_SMALL*2)
|
||||
#define TEXTSIZE_DEFAULT FONTSCALE_NORMAL
|
||||
#define TEXTSIZE_DEFAULT_SS (FONTSCALE_NORMAL*2)
|
||||
#define TEXTSIZE_TITLE FONTSCALE_BIG
|
||||
#define TEXTSIZE_TITLE_SS 1
|
||||
// end new settings
|
||||
/*
|
||||
// old settings
|
||||
#define TEXTSIZE_SMALL 0.333
|
||||
#define TEXTSIZE_SMALL_SS 0.666
|
||||
#define TEXTSIZE_DEFAULT 0.45
|
||||
#define TEXTSIZE_DEFAULT_SS 0.9
|
||||
#define TEXTSIZE_TITLE 0.5
|
||||
#define TEXTSIZE_TITLE_SS 1
|
||||
// end old settings
|
||||
*/
|
||||
|
||||
#define TEXTSIZE_BOLD TEXTSIZE_DEFAULT
|
||||
#define TEXTSIZE_BIG TEXTSIZE_TITLE
|
||||
|
||||
#define COLOR_TITLE 1 0.8 0.4 1
|
||||
#define COLOR_FOCUSED 1 1 1 1
|
||||
#define COLOR_UNFOCUSED 0.4823 0.4823 0.4823 1
|
||||
#define COLOR_DISABLED 0.35 0.35 0.35 1
|
||||
#define COLOR_SAFEAREA 0 0 1 1
|
||||
|
||||
#define BUTTON_A 1
|
||||
#define BUTTON_B 2
|
||||
#define BUTTON_X 3
|
||||
#define BUTTON_Y 4
|
||||
#define BUTTON_LSHLDR 5
|
||||
#define BUTTON_RSHLDR 6
|
||||
#define BUTTON_START 14
|
||||
#define BUTTON_BACK 15
|
||||
#define BUTTON_LSTICK 16
|
||||
#define BUTTON_RSTICK 17
|
||||
#define BUTTON_LTRIG 18
|
||||
#define BUTTON_RTRIG 19
|
||||
#define DPAD_UP 20
|
||||
#define DPAD_DOWN 21
|
||||
#define DPAD_LEFT 22
|
||||
#define DPAD_RIGHT 23
|
||||
#define APAD_UP 28
|
||||
#define APAD_DOWN 29
|
||||
#define APAD_LEFT 30
|
||||
#define APAD_RIGHT 31
|
||||
|
||||
#define COLOR_USMC 0.6 0.64 0.69
|
||||
#define COLOR_ARAB 0.65 0.57 0.41
|
||||
#define COLOR_USSR 0.52 0.28 0.28
|
||||
#define COLOR_SAS 0 0 0
|
||||
|
||||
#define DEFAULT_MP_CFG "default_mp.cfg"
|
||||
#define SPLITSCREEN_MP_CFG "default_splitscreen.cfg"
|
||||
#define SYSTEMLINK_MP_CFG "default_systemlink.cfg"
|
||||
#define XBOXLIVE_MP_CFG "default_xboxlive.cfg"
|
||||
|
||||
#define MAX_RANK int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1))
|
||||
#define MAX_PRESTIGE int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1))
|
||||
|
||||
#define PRESTIGE_AVAIL (stat(2326) < MAX_PRESTIGE && stat(2301) == int(tableLookup("mp/rankTable.csv",0,MAX_RANK,7)))
|
||||
#define PRESTIGE_NEXT (stat(2326) < MAX_PRESTIGE && stat(252) == MAX_RANK)
|
||||
#define PRESTIGE_FINISH (stat(2326) == MAX_PRESTIGE)
|
||||
|
||||
#define CAN_RANK_UP (stat(252) < MAX_RANK || stat(2326) < MAX_PRESTIGE)
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
// Update menudefinition.h in the code source if you change this file.
|
||||
|
||||
#define ITEM_TYPE_TEXT 0 // simple text
|
||||
#define ITEM_TYPE_BUTTON 1 // button, basically text with a border
|
||||
#define ITEM_TYPE_RADIOBUTTON 2 // toggle button, may be grouped
|
||||
#define ITEM_TYPE_CHECKBOX 3 // check box
|
||||
#define ITEM_TYPE_EDITFIELD 4 // editable text, associated with a dvar
|
||||
#define ITEM_TYPE_COMBO 5 // drop down list
|
||||
#define ITEM_TYPE_LISTBOX 6 // scrollable list
|
||||
#define ITEM_TYPE_MODEL 7 // model
|
||||
#define ITEM_TYPE_OWNERDRAW 8 // owner draw, name specs what it is
|
||||
#define ITEM_TYPE_NUMERICFIELD 9 // editable text, associated with a dvar
|
||||
#define ITEM_TYPE_SLIDER 10 // mouse speed, volume, etc.
|
||||
#define ITEM_TYPE_YESNO 11 // yes no dvar setting
|
||||
#define ITEM_TYPE_MULTI 12 // multiple list setting, enumerated
|
||||
#define ITEM_TYPE_DVARENUM 13 // multiple list setting, enumerated from a dvar
|
||||
#define ITEM_TYPE_BIND 14 // bind
|
||||
#define ITEM_TYPE_MENUMODEL 15 // special menu model
|
||||
#define ITEM_TYPE_VALIDFILEFIELD 16 // text must be valid for use in a dos filename
|
||||
#define ITEM_TYPE_DECIMALFIELD 17 // editable text, associated with a dvar, which allows decimal input
|
||||
#define ITEM_TYPE_UPREDITFIELD 18 // editable text, associated with a dvar
|
||||
#define ITEM_TYPE_GAME_MESSAGE_WINDOW 19 // game message window
|
||||
#define ITEM_TYPE_NEWSTICKER 20
|
||||
|
||||
#define ITEM_ALIGN_LEFT 0 // aligns left of text to left of containing rectangle
|
||||
#define ITEM_ALIGN_CENTER 1 // aligns center of text to center of containing rectangle
|
||||
#define ITEM_ALIGN_RIGHT 2 // aligns right of text to right of containing rectangle
|
||||
#define ITEM_ALIGN_X_MASK 3
|
||||
|
||||
#define ITEM_ALIGN_LEGACY 0 // aligns bottom of text to top of containing rectangle
|
||||
#define ITEM_ALIGN_TOP 4 // aligns top of text to top of containing rectangle
|
||||
#define ITEM_ALIGN_MIDDLE 8 // aligns middle of text to middle of containing rectangle
|
||||
#define ITEM_ALIGN_BOTTOM 12 // aligns bottom of text to bottom of containing rectangle
|
||||
#define ITEM_ALIGN_Y_MASK 12
|
||||
|
||||
#define ITEM_ALIGN_LEGACY_LEFT 0
|
||||
#define ITEM_ALIGN_LEGACY_CENTER 1
|
||||
#define ITEM_ALIGN_LEGACY_RIGHT 2
|
||||
#define ITEM_ALIGN_TOP_LEFT 4
|
||||
#define ITEM_ALIGN_TOP_CENTER 5
|
||||
#define ITEM_ALIGN_TOP_RIGHT 6
|
||||
#define ITEM_ALIGN_MIDDLE_LEFT 8
|
||||
#define ITEM_ALIGN_MIDDLE_CENTER 9
|
||||
#define ITEM_ALIGN_MIDDLE_RIGHT 10
|
||||
#define ITEM_ALIGN_BOTTOM_LEFT 12
|
||||
#define ITEM_ALIGN_BOTTOM_CENTER 13
|
||||
#define ITEM_ALIGN_BOTTOM_RIGHT 14
|
||||
|
||||
#define ITEM_TEXTSTYLE_NORMAL 0 // normal text
|
||||
#define ITEM_TEXTSTYLE_BLINK 1 // fast blinking
|
||||
#define ITEM_TEXTSTYLE_SHADOWED 3 // drop shadow ( need a color for this )
|
||||
#define ITEM_TEXTSTYLE_SHADOWEDMORE 6 // drop shadow ( need a color for this )
|
||||
#define ITEM_TEXTSTYLE_MONOSPACE 128
|
||||
|
||||
#define WINDOW_BORDER_NONE 0 // no border
|
||||
#define WINDOW_BORDER_FULL 1 // full border based on border color ( single pixel )
|
||||
#define WINDOW_BORDER_HORZ 2 // horizontal borders only
|
||||
#define WINDOW_BORDER_VERT 3 // vertical borders only
|
||||
#define WINDOW_BORDER_KCGRADIENT 4 // horizontal border using the gradient bars
|
||||
#define WINDOW_BORDER_RAISED 5 // darken the bottom and right sides of the border
|
||||
#define WINDOW_BORDER_SUNKEN 6 // darken the top and left sides of the border
|
||||
|
||||
#define WINDOW_STYLE_EMPTY 0 // no background
|
||||
#define WINDOW_STYLE_FILLED 1 // filled with background color
|
||||
#define WINDOW_STYLE_GRADIENT 2 // gradient bar based on background color
|
||||
#define WINDOW_STYLE_SHADER 3 // shader based on background color
|
||||
#define WINDOW_STYLE_TEAMCOLOR 4 // team color
|
||||
#define WINDOW_STYLE_DVAR_SHADER 5 // draws the shader specified by the dvar
|
||||
#define WINDOW_STYLE_LOADBAR 6 // shader based on background color
|
||||
|
||||
#define MODE_BOTTOMUP_ALIGN_TOP 0 // text appears on bottom of list and moves up to specified Y coordinate as old text fades out
|
||||
#define MODE_BOTTOMUP_ALIGN_BOTTOM 1 // text appears on bottom of list and moves away from specified Y coordinate as new text pushes it up
|
||||
#define MODE_TOPDOWN_ALIGN_TOP 2 // text appears on top of list and moves away from specified Y coordinate as new text pushes it down
|
||||
#define MODE_TOPDOWN_ALIGN_BOTTOM 3 // text appears on top of list and moves down to specified Y coordinate as old text fades out
|
||||
|
||||
#define MENU_TRUE 1
|
||||
#define MENU_FALSE 0
|
||||
|
||||
#define HUD_VERTICAL 0x00
|
||||
#define HUD_HORIZONTAL 0x01
|
||||
|
||||
#define RANGETYPE_ABSOLUTE 0
|
||||
#define RANGETYPE_RELATIVE 1
|
||||
|
||||
// list box element types
|
||||
#define LISTBOX_TEXT 0x00
|
||||
#define LISTBOX_IMAGE 0x01
|
||||
|
||||
// list feeders
|
||||
#define FEEDER_HEADS 0x00 // model heads
|
||||
#define FEEDER_MAPS 0x01 // text maps based on game type
|
||||
#define FEEDER_SERVERS 0x02 // servers
|
||||
#define FEEDER_CLAN_MEMBERS 0x03 // clan names
|
||||
#define FEEDER_ALLMAPS 0x04 // all maps available, in graphic format
|
||||
#define FEEDER_REDTEAM_LIST 0x05 // red team members
|
||||
#define FEEDER_BLUETEAM_LIST 0x06 // blue team members
|
||||
#define FEEDER_PLAYER_LIST 0x07 // players
|
||||
#define FEEDER_TEAM_LIST 0x08 // team members for team voting
|
||||
#define FEEDER_MODS 0x09 // team members for team voting
|
||||
#define FEEDER_DEMOS 0x0a // team members for team voting
|
||||
#define FEEDER_SCOREBOARD 0x0b // team members for team voting
|
||||
#define FEEDER_Q3HEADS 0x0c // model heads
|
||||
#define FEEDER_SERVERSTATUS 0x0d // server status
|
||||
#define FEEDER_FINDPLAYER 0x0e // find player
|
||||
#define FEEDER_CINEMATICS 0x0f // cinematics
|
||||
#define FEEDER_SAVEGAMES 0x10 // savegames
|
||||
#define FEEDER_PICKSPAWN 0x11
|
||||
#define FEEDER_LOBBY_MEMBERS 0x12 // list of players in your party
|
||||
#define FEEDER_LOBBY_MEMBERS_TALK 0x13 // icon for whether they are speaking or not
|
||||
#define FEEDER_MUTELIST 0x14 // list of musted players
|
||||
#define FEEDER_PLAYERSTALKING 0x15 // list of players who are currently talking
|
||||
#define FEEDER_SPLITSCREENPLAYERS 0x16 // list of all players who are playing splitscreen
|
||||
#define FEEDER_LOBBY_MEMBERS_READY 0x17 // icon for whether they are ready or not
|
||||
#define FEEDER_PLAYER_PROFILES 0x18 // player profiles
|
||||
#define FEEDER_PARTY_MEMBERS 0x19 // list of players in your party
|
||||
#define FEEDER_PARTY_MEMBERS_TALK 0x1a // icon for whether they are speaking or not
|
||||
#define FEEDER_PARTY_MEMBERS_READY 0x1b // icon for whether they are ready or not
|
||||
#define FEEDER_PLAYLISTS 0x1c // list of all playlists
|
||||
#define FEEDER_GAMEMODES 0x1d // list of all game type modes, including any player custom modes
|
||||
#define FEEDER_LEADERBOARD 0x1e // list of rows for a leaderboard
|
||||
#define FEEDER_MYTEAM_MEMBERS 0x20 // list of marine team members
|
||||
#define FEEDER_MYTEAM_MEMBERS_TALK 0x21 // icon for whether they are speaking
|
||||
#define FEEDER_ENEMY_MEMBERS 0x22 // list of opfor team members
|
||||
#define FEEDER_ENEMY_MEMBERS_TALK 0x23 // icon for whether they are speaking
|
||||
#define FEEDER_LOBBY_MEMBERS_STAT 0x24 // last round stats for lobby members
|
||||
#define FEEDER_MYTEAM_MEMBERS_STAT 0x25 // last round stats for marine team members
|
||||
#define FEEDER_ENEMY_MEMBERS_STAT 0x26 // last round stats for opfor team members
|
||||
#define FEEDER_ONLINEFRIENDS 0x27 // list of your online friends
|
||||
#define FEEDER_LOBBY_MEMBERS_RANK 0x28 // rank icon
|
||||
#define FEEDER_PARTY_MEMBERS_RANK 0x29 // rank icon
|
||||
#define FEEDER_ENEMY_MEMBERS_RANK 0x30 // rank icon
|
||||
#define FEEDER_MYTEAM_MEMBERS_RANK 0x31 // rank icon
|
||||
|
||||
// display flags
|
||||
#define CG_SHOW_BLUE_TEAM_HAS_REDFLAG 0x00000001
|
||||
#define CG_SHOW_RED_TEAM_HAS_BLUEFLAG 0x00000002
|
||||
#define CG_SHOW_ANYTEAMGAME 0x00000004
|
||||
#define CG_SHOW_CTF 0x00000020
|
||||
#define CG_SHOW_OBELISK 0x00000040
|
||||
#define CG_SHOW_HEALTHCRITICAL 0x00000080
|
||||
#define CG_SHOW_SINGLEPLAYER 0x00000100
|
||||
#define CG_SHOW_TOURNAMENT 0x00000200
|
||||
#define CG_SHOW_DURINGINCOMINGVOICE 0x00000400
|
||||
#define CG_SHOW_IF_PLAYER_HAS_FLAG 0x00000800
|
||||
#define CG_SHOW_LANPLAYONLY 0x00001000
|
||||
#define CG_SHOW_MINED 0x00002000
|
||||
#define CG_SHOW_HEALTHOK 0x00004000
|
||||
#define CG_SHOW_TEAMINFO 0x00008000
|
||||
#define CG_SHOW_NOTEAMINFO 0x00010000
|
||||
#define CG_SHOW_OTHERTEAMHASFLAG 0x00020000
|
||||
#define CG_SHOW_YOURTEAMHASENEMYFLAG 0x00040000
|
||||
#define CG_SHOW_ANYNONTEAMGAME 0x00080000
|
||||
#define CG_SHOW_TEXTASINT 0x00200000
|
||||
#define CG_SHOW_HIGHLIGHTED 0x00100000
|
||||
|
||||
#define CG_SHOW_NOT_V_CLEAR 0x02000000
|
||||
|
||||
#define CG_SHOW_2DONLY 0x10000000
|
||||
|
||||
|
||||
#define UI_SHOW_LEADER 0x00000001
|
||||
#define UI_SHOW_NOTLEADER 0x00000002
|
||||
#define UI_SHOW_FAVORITESERVERS 0x00000004
|
||||
#define UI_SHOW_ANYNONTEAMGAME 0x00000008
|
||||
#define UI_SHOW_ANYTEAMGAME 0x00000010
|
||||
#define UI_SHOW_NEWHIGHSCORE 0x00000020
|
||||
#define UI_SHOW_DEMOAVAILABLE 0x00000040
|
||||
#define UI_SHOW_NEWBESTTIME 0x00000080
|
||||
#define UI_SHOW_FFA 0x00000100
|
||||
#define UI_SHOW_NOTFFA 0x00000200
|
||||
#define UI_SHOW_NETANYNONTEAMGAME 0x00000400
|
||||
#define UI_SHOW_NETANYTEAMGAME 0x00000800
|
||||
#define UI_SHOW_NOTFAVORITESERVERS 0x00001000
|
||||
|
||||
// font types
|
||||
#define UI_FONT_DEFAULT 0 // auto-chose betwen big/reg/small
|
||||
#define UI_FONT_NORMAL 1
|
||||
#define UI_FONT_BIG 2
|
||||
#define UI_FONT_SMALL 3
|
||||
#define UI_FONT_BOLD 4
|
||||
#define UI_FONT_CONSOLE 5
|
||||
#define UI_FONT_OBJECTIVE 6
|
||||
|
||||
// owner draw types
|
||||
// ideally these should be done outside of this file but
|
||||
// this makes it much easier for the macro expansion to
|
||||
// convert them for the designers ( from the .menu files )
|
||||
#define CG_OWNERDRAW_BASE 1
|
||||
#define CG_PLAYER_AMMO_VALUE 5
|
||||
#define CG_PLAYER_AMMO_BACKDROP 6
|
||||
|
||||
#define CG_PLAYER_STANCE 20
|
||||
|
||||
#define CG_SPECTATORS 60
|
||||
|
||||
#define CG_HOLD_BREATH_HINT 71
|
||||
#define CG_CURSORHINT 72
|
||||
#define CG_PLAYER_POWERUP 73
|
||||
#define CG_PLAYER_HOLDABLE 74
|
||||
#define CG_PLAYER_INVENTORY 75
|
||||
#define CG_CURSORHINT_STATUS 78 // like 'health' bar when pointing at a func_explosive
|
||||
|
||||
#define CG_PLAYER_BAR_HEALTH 79
|
||||
#define CG_MANTLE_HINT 80
|
||||
|
||||
#define CG_PLAYER_WEAPON_NAME 81
|
||||
#define CG_PLAYER_WEAPON_NAME_BACK 82
|
||||
|
||||
#define CG_CENTER_MESSAGE 90 // for things like "You were killed by ..."
|
||||
|
||||
#define CG_TANK_BODY_DIR 95
|
||||
#define CG_TANK_BARREL_DIR 96
|
||||
|
||||
#define CG_DEADQUOTE 97
|
||||
|
||||
#define CG_PLAYER_BAR_HEALTH_BACK 98
|
||||
|
||||
#define CG_MISSION_OBJECTIVE_HEADER 99
|
||||
#define CG_MISSION_OBJECTIVE_LIST 100
|
||||
#define CG_MISSION_OBJECTIVE_BACKDROP 101
|
||||
#define CG_PAUSED_MENU_LINE 102
|
||||
|
||||
#define CG_OFFHAND_WEAPON_ICON_FRAG 103
|
||||
#define CG_OFFHAND_WEAPON_ICON_SMOKEFLASH 104
|
||||
#define CG_OFFHAND_WEAPON_AMMO_FRAG 105
|
||||
#define CG_OFFHAND_WEAPON_AMMO_SMOKEFLASH 106
|
||||
#define CG_OFFHAND_WEAPON_NAME_FRAG 107
|
||||
#define CG_OFFHAND_WEAPON_NAME_SMOKEFLASH 108
|
||||
#define CG_OFFHAND_WEAPON_SELECT_FRAG 109
|
||||
#define CG_OFFHAND_WEAPON_SELECT_SMOKEFLASH 110
|
||||
#define CG_SAVING 111
|
||||
#define CG_PLAYER_LOW_HEALTH_OVERLAY 112
|
||||
|
||||
#define CG_INVALID_CMD_HINT 113
|
||||
#define CG_PLAYER_SPRINT_METER 114
|
||||
#define CG_PLAYER_SPRINT_BACK 115
|
||||
|
||||
#define CG_PLAYER_WEAPON_BACKGROUND 116
|
||||
#define CG_PLAYER_WEAPON_AMMO_CLIP_GRAPHIC 117
|
||||
#define CG_PLAYER_WEAPON_PRIMARY_ICON 118
|
||||
#define CG_PLAYER_WEAPON_AMMO_STOCK 119
|
||||
#define CG_PLAYER_WEAPON_LOW_AMMO_WARNING 120
|
||||
|
||||
#define CG_PLAYER_COMPASS_TICKERTAPE 145
|
||||
#define CG_PLAYER_COMPASS_TICKERTAPE_NO_OBJ 146
|
||||
|
||||
#define CG_PLAYER_COMPASS_PLAYER 150
|
||||
#define CG_PLAYER_COMPASS_BACK 151
|
||||
#define CG_PLAYER_COMPASS_POINTERS 152
|
||||
#define CG_PLAYER_COMPASS_ACTORS 153
|
||||
#define CG_PLAYER_COMPASS_TANKS 154
|
||||
#define CG_PLAYER_COMPASS_HELICOPTERS 155
|
||||
#define CG_PLAYER_COMPASS_PLANES 156
|
||||
#define CG_PLAYER_COMPASS_AUTOMOBILES 157
|
||||
#define CG_PLAYER_COMPASS_FRIENDS 158
|
||||
#define CG_PLAYER_COMPASS_MAP 159
|
||||
#define CG_PLAYER_COMPASS_NORTHCOORD 160
|
||||
#define CG_PLAYER_COMPASS_EASTCOORD 161
|
||||
#define CG_PLAYER_COMPASS_NCOORD_SCROLL 162
|
||||
#define CG_PLAYER_COMPASS_ECOORD_SCROLL 163
|
||||
#define CG_PLAYER_COMPASS_GOALDISTANCE 164
|
||||
|
||||
#define CG_PLAYER_ACTIONSLOT_DPAD 165
|
||||
#define CG_PLAYER_ACTIONSLOT_1 166
|
||||
#define CG_PLAYER_ACTIONSLOT_2 167
|
||||
#define CG_PLAYER_ACTIONSLOT_3 168
|
||||
#define CG_PLAYER_ACTIONSLOT_4 169
|
||||
#define CG_PLAYER_COMPASS_ENEMIES 170
|
||||
|
||||
#define CG_PLAYER_FULLMAP_BACK 180
|
||||
#define CG_PLAYER_FULLMAP_MAP 181
|
||||
#define CG_PLAYER_FULLMAP_POINTERS 182
|
||||
#define CG_PLAYER_FULLMAP_PLAYER 183
|
||||
#define CG_PLAYER_FULLMAP_ACTORS 184
|
||||
#define CG_PLAYER_FULLMAP_FRIENDS 185
|
||||
#define CG_PLAYER_FULLMAP_LOCATION_SELECTOR 186
|
||||
#define CG_PLAYER_FULLMAP_BORDER 187
|
||||
#define CG_PLAYER_FULLMAP_ENEMIES 188
|
||||
|
||||
#define CG_VEHICLE_RETICLE 190
|
||||
#define CG_HUD_TARGETS_VEHICLE 191
|
||||
#define CG_HUD_TARGETS_JAVELIN 192
|
||||
|
||||
#define CG_TALKER1 193
|
||||
#define CG_TALKER2 194
|
||||
#define CG_TALKER3 195
|
||||
#define CG_TALKER4 196
|
||||
|
||||
#define UI_OWNERDRAW_BASE 200
|
||||
#define UI_HANDICAP 200
|
||||
#define UI_EFFECTS 201
|
||||
#define UI_PLAYERMODEL 202
|
||||
#define UI_GAMETYPE 205
|
||||
#define UI_SKILL 207
|
||||
#define UI_NETSOURCE 220
|
||||
#define UI_NETFILTER 222
|
||||
#define UI_VOTE_KICK 238
|
||||
#define UI_NETGAMETYPE 245
|
||||
#define UI_SERVERREFRESHDATE 247
|
||||
#define UI_SERVERMOTD 248
|
||||
#define UI_GLINFO 249
|
||||
#define UI_KEYBINDSTATUS 250
|
||||
#define UI_JOINGAMETYPE 253
|
||||
#define UI_MAPPREVIEW 254
|
||||
#define UI_MENUMODEL 257
|
||||
#define UI_SAVEGAME_SHOT 258
|
||||
#define UI_SAVEGAMENAME 262
|
||||
#define UI_SAVEGAMEINFO 263
|
||||
#define UI_LOADPROFILING 264
|
||||
#define UI_RECORDLEVEL 265
|
||||
#define UI_AMITALKING 266
|
||||
#define UI_TALKER1 267
|
||||
#define UI_TALKER2 268
|
||||
#define UI_TALKER3 269
|
||||
#define UI_TALKER4 270
|
||||
#define UI_PARTYSTATUS 271
|
||||
#define UI_LOGGEDINUSER 272
|
||||
#define UI_RESERVEDSLOTS 273
|
||||
#define UI_PLAYLISTNAME 274
|
||||
#define UI_PLAYLISTDESCRIPTION 275
|
||||
#define UI_USERNAME 276
|
||||
#define UI_CINEMATIC 277
|
||||
|
||||
// Edge relative placement values for rect->h_align and rect->v_align
|
||||
#define HORIZONTAL_ALIGN_SUBLEFT 0 // left edge of a 4:3 screen (safe area not included)
|
||||
#define HORIZONTAL_ALIGN_LEFT 1 // left viewable (safe area) edge
|
||||
#define HORIZONTAL_ALIGN_CENTER 2 // center of the screen (reticle)
|
||||
#define HORIZONTAL_ALIGN_RIGHT 3 // right viewable (safe area) edge
|
||||
#define HORIZONTAL_ALIGN_FULLSCREEN 4 // disregards safe area
|
||||
#define HORIZONTAL_ALIGN_NOSCALE 5 // uses exact parameters - neither adjusts for safe area nor scales for screen size
|
||||
#define HORIZONTAL_ALIGN_TO640 6 // scales a real-screen resolution x down into the 0 - 640 range
|
||||
#define HORIZONTAL_ALIGN_CENTER_SAFEAREA 7 // center of the safearea
|
||||
#define HORIZONTAL_ALIGN_MAX HORIZONTAL_ALIGN_CENTER_SAFEAREA
|
||||
#define HORIZONTAL_ALIGN_DEFAULT HORIZONTAL_ALIGN_SUBLEFT
|
||||
|
||||
#define VERTICAL_ALIGN_SUBTOP 0 // top edge of the 4:3 screen (safe area not included)
|
||||
#define VERTICAL_ALIGN_TOP 1 // top viewable (safe area) edge
|
||||
#define VERTICAL_ALIGN_CENTER 2 // center of the screen (reticle)
|
||||
#define VERTICAL_ALIGN_BOTTOM 3 // bottom viewable (safe area) edge
|
||||
#define VERTICAL_ALIGN_FULLSCREEN 4 // disregards safe area
|
||||
#define VERTICAL_ALIGN_NOSCALE 5 // uses exact parameters - neither adjusts for safe area nor scales for screen size
|
||||
#define VERTICAL_ALIGN_TO480 6 // scales a real-screen resolution y down into the 0 - 480 range
|
||||
#define VERTICAL_ALIGN_CENTER_SAFEAREA 7 // center of the save area
|
||||
#define VERTICAL_ALIGN_MAX VERTICAL_ALIGN_CENTER_SAFEAREA
|
||||
#define VERTICAL_ALIGN_DEFAULT VERTICAL_ALIGN_SUBTOP
|
||||
Reference in new issue
Block a user