mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-28 15:02:32 +00:00
410 lines
7.8 KiB
Text
410 lines
7.8 KiB
Text
#include "ui/menudef.h"
|
|
|
|
#define ICON_ALPHA 0.5
|
|
#define LINE_ALPHA 0.2
|
|
#define FADEIN_TIME 125
|
|
|
|
#define ANGLES 6 -84
|
|
|
|
#define RQ3_Player_Option_Color 0 0 .1 1
|
|
#define RQ3_Player_Tab_Color1 0 0 0 1
|
|
#define RQ3_Player_Tab_Color2 .4 .4 .4 1
|
|
{
|
|
|
|
menuDef {
|
|
renderpoint
|
|
name "player_menu"
|
|
visible MENU_FALSE // Visible on open
|
|
//fullScreen MENU_FALSE
|
|
focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items
|
|
rect 104 96 288 348
|
|
anglevectors ANGLES
|
|
style WINDOW_STYLE_EMPTY
|
|
popup
|
|
|
|
onOOBClick { close _self ; open _prev }
|
|
onOpen { uiScript update "ui_GetName" ; play "sound/ui/whoosh3.wav" ;
|
|
setitemcolor hints forecolor .9 .9 .9 1 ; hide hints ;
|
|
hide focus }
|
|
onClose { uiScript update "ui_SetName" }
|
|
onEsc { close _self ; open _prev }
|
|
|
|
onOpenSpecial {
|
|
//normal items
|
|
setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ;
|
|
timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ;
|
|
//icon - special alpha
|
|
setItemColor "icon" forecolor 5 5 5 0 ;
|
|
timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ;
|
|
//line - special alpha; using backcolor
|
|
setItemColor "line" backcolor 5 5 5 0 ;
|
|
timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ;
|
|
}
|
|
|
|
|
|
|
|
itemDef {
|
|
name "paper"
|
|
menuAnchor
|
|
subgroup "fade_fore_alpha"
|
|
style WINDOW_STYLE_SHADER
|
|
background UI_ASSETS"/paper_1"
|
|
forecolor MENUCOLOR_PLAYER 1
|
|
rect -8 -16 320 420
|
|
anglevectors ANGLES
|
|
anglevectors 6 -84
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
//Title
|
|
|
|
itemdef {
|
|
renderpoint
|
|
name "title"
|
|
subgroup "fade_fore_alpha"
|
|
text "Player"
|
|
forecolor .6 .0 .0 1
|
|
style WINDOW_STYLE_EMPTY
|
|
textalign ITEM_ALIGN_LEFT
|
|
textalignx 4
|
|
textaligny 24
|
|
textscale RQ3_MAIN_TEXTSIZE
|
|
alignRect paper ITEM_ALIGN_CENTER -12 40 240 20
|
|
visible 1
|
|
autowrapped
|
|
decoration
|
|
}
|
|
|
|
//Description
|
|
|
|
itemdef {
|
|
text "Please fill out the form below"
|
|
autowrapped
|
|
subgroup "fade_fore_alpha"
|
|
forecolor .25 .25 .25 1
|
|
textalign ITEM_ALIGN_LEFT
|
|
textalignx 4
|
|
textaligny 12
|
|
textscale .2
|
|
alignrect "title" ITEM_ALIGN_LEFT 0 28 240 16
|
|
style WINDOW_STYLE_EMPTY
|
|
type ITEM_TYPE_BUTTON
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
//Line
|
|
|
|
itemDef {
|
|
name "line"
|
|
subgroup "fade_fore_alpha"
|
|
style WINDOW_STYLE_FILLED
|
|
backcolor .25 .25 .25 LINE_ALPHA
|
|
alignrect "title" ITEM_ALIGN_LEFT 0 48 240 2
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
//Icon
|
|
|
|
itemdef {
|
|
name icon
|
|
background UI_ASSETS"/icons/rq3-setup-player"
|
|
forecolor 1 1 1 ICON_ALPHA
|
|
alignrect "line" ITEM_ALIGN_RIGHT 0 -36 32 32
|
|
style WINDOW_STYLE_SHADER
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
|
|
//Player model display
|
|
|
|
itemdef {
|
|
name "model_preview"
|
|
ownerdraw UI_PLAYERMODEL
|
|
style 1
|
|
alignrect "line" ITEM_ALIGN_LEFT 0 0 150 200
|
|
visible 0
|
|
decoration
|
|
}
|
|
|
|
|
|
//Name edit field
|
|
|
|
itemdef {
|
|
name "name_caption"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "Name:"
|
|
alignrect "line" ITEM_ALIGN_LEFT 16 20 208 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "name_dotted_line"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text ".............................................."
|
|
alignrect "name_caption" ITEM_ALIGN_RIGHT 0 0 168 20
|
|
textscale .225
|
|
textalign ITEM_ALIGN_RIGHT
|
|
textalignx 168
|
|
textaligny 20
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "namefield"
|
|
subgroup "fade_fore_alpha"
|
|
alignrect "name_caption" ITEM_ALIGN_RIGHT 0 0 168 20
|
|
type ITEM_TYPE_EDITFIELD
|
|
style 0
|
|
text ""
|
|
cvar "ui_Name"
|
|
backcolor 0 0 0 .1
|
|
forecolor 0 0 0 1
|
|
outlinecolor 0 0 1 .5
|
|
border 0
|
|
textstyle 0
|
|
maxchars 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
visible 1
|
|
}
|
|
|
|
|
|
//Radio voice
|
|
|
|
itemdef {
|
|
name "voice_caption"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "Radio Voice:"
|
|
alignrect "name_caption" ITEM_ALIGN_LEFT 0 24 208 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "voice_dotted_line"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "......................................"
|
|
alignrect "voice_caption" ITEM_ALIGN_RIGHT 0 0 148 20
|
|
textscale .225
|
|
textalign ITEM_ALIGN_RIGHT
|
|
textalignx 148
|
|
textaligny 20
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "voicefield"
|
|
subgroup "fade_fore_alpha"
|
|
alignrect "voice_caption" ITEM_ALIGN_RIGHT 0 0 148 20
|
|
type ITEM_TYPE_MULTI
|
|
style 0
|
|
text ""
|
|
cvar "cg_RQ3_radiovoice_male"
|
|
cvarFloatList { "New" 1 , "Pikey" 2 , "Pirate" 3 , "Keanu" 4 , "Original" 5}
|
|
backcolor 0 0 0 .1
|
|
forecolor 0 0 0 1
|
|
textstyle 0
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 8
|
|
textaligny 16
|
|
visible 1
|
|
}
|
|
|
|
//Head list
|
|
|
|
itemdef {
|
|
name "headlist"
|
|
subgroup "fade_fore_alpha"
|
|
alignrect "voice_caption" ITEM_ALIGN_LEFT 0 24 208 60
|
|
style WINDOW_STYLE_EMPTY
|
|
backcolor 0 0 0 .1
|
|
type ITEM_TYPE_LISTBOX
|
|
forecolor 1 1 1 1
|
|
outlinecolor 0 0 1 .15
|
|
border 0
|
|
bordersize 2
|
|
bordercolor 1 0 0 1
|
|
elementwidth 41
|
|
elementheight 41
|
|
elementtype LISTBOX_IMAGE
|
|
feeder FEEDER_Q3HEADS
|
|
horizontalscroll
|
|
visible 1
|
|
//onfocus { setitemcolor headlist bordercolor 1 0 0 1 ; }
|
|
//leavefocus { setitemcolor headlist bordercolor 1 0 0 0 ; }
|
|
onFocus { setitemcolor headlist_window backcolor 0 0 0 .25 ; show headlist_hint ;
|
|
timeFade headlist_hint forecolor .9 .9 .9 1 0 250 }
|
|
leaveFocus { setitemcolor headlist_window backcolor 0 0 0 .1 ;
|
|
timeFade headlist_hint forecolor .9 .9 .9 0 0 250 }
|
|
}
|
|
|
|
//Model name
|
|
|
|
itemdef {
|
|
name "model_caption"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "Model:"
|
|
alignrect "headlist" ITEM_ALIGN_LEFT 0 64 208 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "model_dotted_line"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text ".............................................."
|
|
alignrect "model_caption" ITEM_ALIGN_RIGHT 0 0 168 20
|
|
textscale .225
|
|
textalign ITEM_ALIGN_RIGHT
|
|
textalignx 168
|
|
textaligny 20
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
name "modelfield"
|
|
subgroup "fade_fore_alpha"
|
|
alignrect "model_caption" ITEM_ALIGN_RIGHT 0 0 168 20
|
|
type ITEM_TYPE_EDITFIELD
|
|
style 0
|
|
text ""
|
|
cvar "model"
|
|
backcolor 0 0 0 .1
|
|
forecolor 0 0 0 1
|
|
outlinecolor 0 0 1 .5
|
|
border 0
|
|
textstyle 0
|
|
maxchars 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
|
|
//Gender
|
|
|
|
itemdef {
|
|
name "gender_caption"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "Gender:"
|
|
alignrect "model_caption" ITEM_ALIGN_LEFT 0 24 208 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
# define CHECKBOX_WIDTH 64
|
|
# define CHECKBOX_PROPS \
|
|
type ITEM_TYPE_YESNO \
|
|
style WINDOW_STYLE_EMPTY \
|
|
subgroup "fade_fore_alpha" \
|
|
forecolor 0 0 0 1 \
|
|
textalign ITEM_ALIGN_RIGHT \
|
|
textalignx $evalint(CHECKBOX_WIDTH - 20) \
|
|
textaligny 16 \
|
|
textscale .225 \
|
|
visible 1
|
|
|
|
itemdef {
|
|
text "Male"
|
|
CHECKBOX_PROPS
|
|
activeCvarValue 0
|
|
alignrect "gender_caption" ITEM_ALIGN_LEFT 64 0 CHECKBOX_WIDTH 20
|
|
kind YESNO_ICON_RIGHT
|
|
cvar "ui_RQ3_gender"
|
|
groupIndex 1
|
|
}
|
|
|
|
itemdef {
|
|
text "Female"
|
|
CHECKBOX_PROPS
|
|
alignrect "gender_caption" ITEM_ALIGN_RIGHT 0 0 CHECKBOX_WIDTH 20
|
|
kind YESNO_ICON_RIGHT
|
|
cvar "ui_RQ3_gender"
|
|
groupIndex 1
|
|
activeCvarValue 1
|
|
}
|
|
|
|
//Handedness
|
|
|
|
itemdef {
|
|
name "handedness_caption"
|
|
subgroup "fade_fore_alpha"
|
|
style 0
|
|
text "Handedness:"
|
|
alignrect "gender_caption" ITEM_ALIGN_LEFT 0 24 208 20
|
|
textscale .225
|
|
textalign 0
|
|
textalignx 4
|
|
textaligny 16
|
|
forecolor RQ3_Player_Option_Color
|
|
visible 1
|
|
decoration
|
|
}
|
|
|
|
itemdef {
|
|
text "Left"
|
|
CHECKBOX_PROPS
|
|
alignrect "handedness_caption" ITEM_ALIGN_LEFT 64 0 CHECKBOX_WIDTH 20
|
|
kind YESNO_ICON_RIGHT
|
|
cvar "cg_RQ3_leftHanded"
|
|
groupIndex 2
|
|
activeCvarValue 1
|
|
}
|
|
|
|
itemdef {
|
|
text "Right"
|
|
CHECKBOX_PROPS
|
|
alignrect "handedness_caption" ITEM_ALIGN_RIGHT 0 0 CHECKBOX_WIDTH 20
|
|
kind YESNO_ICON_RIGHT
|
|
cvar "cg_RQ3_leftHanded"
|
|
groupIndex 2
|
|
activeCvarValue 0
|
|
}
|
|
|
|
|
|
}
|
|
}
|