13 me.configureXonoticSkinList(me);
19 me.configureXonoticListBox(me);
30 for(i = 0; i < n; ++i)
34 me.setSelected(me, i);
52 float glob, buf, i, n, fh;
56 glob =
search_begin(
"gfx/menu/*/skinvalues.txt",
true,
true);
65 for(i = 0; i < n; ++i)
79 LOG_INFO(
"Warning: can't open skinvalues.txt file");
82 while((s =
fgets(fh)))
106 buf_del(me.skinlist);
111 me.itemAbsSize =
'0 0 0';
114 me.itemAbsSize.y = absSize.y * me.itemHeight;
115 me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
116 me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
117 me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
118 me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
119 me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
121 me.columnPreviewOrigin = 0;
122 me.columnPreviewSize = me.itemAbsSize.y / me.itemAbsSize.x * 4 / 3;
123 me.columnNameOrigin = me.columnPreviewOrigin + me.columnPreviewSize + me.realFontSize.x;
124 me.columnNameSize = 1 - me.columnPreviewSize - 2 * me.realFontSize.x;
132 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
135 me.focusedItemAlpha =
getFadedAlpha(me.focusedItemAlpha, SKINALPHA_LISTBOX_FOCUSED, SKINFADEALPHA_LISTBOX_FOCUSED);
136 draw_Fill(
'0 0 0',
'1 1 0', SKINCOLOR_LISTBOX_FOCUSED, me.focusedItemAlpha);
140 draw_Picture(me.columnPreviewOrigin *
eX, s, me.columnPreviewSize *
eX +
eY,
'1 1 1', 1);
144 draw_Text(me.realUpperMargin1 *
eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize -
draw_TextWidth(s, 0, me.realFontSize))) *
eX, s, me.realFontSize, SKINCOLOR_SKINLIST_TITLE, SKINALPHA_TEXT, 0);
148 draw_Text(me.realUpperMargin2 *
eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize -
draw_TextWidth(s, 0, me.realFontSize))) *
eX, s, me.realFontSize, SKINCOLOR_SKINLIST_AUTHOR, SKINALPHA_TEXT, 0);
154 localcmd(
"\nmenu_restart\nmenu_cmd skinselect\n");
float XonoticSkinList_keyDown(entity me, float scan, float ascii, float shift)
void XonoticSkinList_destroy(entity me)
void XonoticSkinList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected, bool isFocused)
void SetSkin_Click(entity btn, entity me)
const float SKINPARM_TITLE
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
const float SKINPARM_COUNT
void XonoticSkinList_setSkin(entity me)
void XonoticSkinList_getSkins(entity me)
void XonoticSkinList_configureXonoticSkinList(entity me)
void XonoticSkinList_doubleClickListBoxItem(entity me, float i, vector where)
void XonoticSkinList_loadCvars(entity me)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
string XonoticSkinList_skinParameter(entity me, float i, float key)
entity makeXonoticSkinList()
void XonoticSkinList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
const float SKINPARM_PREVIEW
void XonoticSkinList_saveCvars(entity me)
const float SKINPARM_NAME
const float SKINPARM_AUTHOR