From: terencehill Date: Fri, 26 Apr 2019 16:05:26 +0000 (+0200) Subject: Replace fake country list (actually language list) with a button that opens window... X-Git-Tag: xonotic-v0.8.5~1499^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F647%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Replace fake country list (actually language list) with a button that opens window with the language list (Settings/User); it fixes redirection to the Profile page once you change language from Settings/User window --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 681542218..8705e5ff7 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -27,6 +27,10 @@ void XonoticProfileTab_draw(entity me) me.playerNameLabel.alpha = me.playerNameLabelAlpha; SUPER(XonoticProfileTab).draw(me); } +void language_selector_click(entity me, entity btn) +{ + localcmd("\nmenu_cmd languageselect\n"); +} void XonoticProfileTab_fill(entity me) { entity e, pms, label, box; @@ -145,8 +149,14 @@ void XonoticProfileTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Country"))); me.TR(me); + me.TDempty(me, 0.75); + me.TD(me, 1, 1.5, e = makeXonoticButton(_("Select language..."), '0 0 0')); + e.onClick = language_selector_click; + e.onClickEntity = me; + /* me.TDempty(me, 0.5); me.TD(me, 4.5, 2, e = makeXonoticLanguageList()); // todo: cl_country: create proper country list + */ // ================