From: Samual Date: Thu, 19 Jan 2012 18:17:39 +0000 (-0500) Subject: Some cleanups for gametype list and create tab X-Git-Tag: xonotic-v0.6.0~119 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e0fe426be784466ca03c909e1fce0a44c5c878c;p=xonotic%2Fxonotic-data.pk3dir.git Some cleanups for gametype list and create tab --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.c b/qcsrc/menu/xonotic/dialog_multiplayer_create.c index f86a18678..a53401693 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.c @@ -42,9 +42,9 @@ void XonoticServerCreateTab_fill(entity me) me.TR(me); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:"))); + //me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:"))); // pointless, overcrowds the dialog imo me.TR(me); - me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 0.5, "timelimit_override"); + me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 1, "timelimit_override"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, _("Time limit:"))); me.TD(me, 1, 2, me.sliderTimelimit); me.TR(me); diff --git a/qcsrc/menu/xonotic/gametypelist.c b/qcsrc/menu/xonotic/gametypelist.c index 14d8bbb5c..dbb9c3eff 100644 --- a/qcsrc/menu/xonotic/gametypelist.c +++ b/qcsrc/menu/xonotic/gametypelist.c @@ -71,14 +71,15 @@ void XonoticGametypeList_saveCvars(entity me) void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected) { string s; + if(isSelected) draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED); draw_Picture(me.columnIconOrigin * eX, GameType_GetIcon(i), me.columnIconSize * eX + eY, '1 1 1', SKINALPHA_LISTBOX_SELECTED); s = GameType_GetName(i); - draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); - s = GameType_GetTeams(i); - draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); + draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.5 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); + //s = GameType_GetTeams(i); + //draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0); } void XonoticGametypeList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) { diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 5c0a958d0..486bcce8d 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -605,7 +605,7 @@ string GameType_GetIcon(float cnt) return ""; } -string GameType_GetTeams(float cnt) +/*string GameType_GetTeams(float cnt) // poor implementation, later something else could be done that's better? { float i = GameType_GetID(cnt); string s = _MapInfo_GetDefaultEx(i); @@ -619,7 +619,7 @@ string GameType_GetTeams(float cnt) } return _("tuba for all"); -} +}*/ void dialog_hudpanel_common_notoggle(entity me, string panelname) { diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 4055f915f..f682fd30f 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -39,7 +39,7 @@ void URI_Get_Callback(float id, float status, string data); float GameType_GetID(float cnt); string GameType_GetName(float cnt); string GameType_GetIcon(float cnt); -string GameType_GetTeams(float cnt); +//string GameType_GetTeams(float cnt); float GameType_GetCount(); void dialog_hudpanel_common_notoggle(entity me, string panelname);