From 3e8c1c6d0572bae243366e1f6f0ebe238c1422c4 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 26 Apr 2019 18:05:26 +0200 Subject: [PATCH] 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 --- qcsrc/menu/xonotic/dialog_multiplayer_profile.qc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 + */ // ================ -- 2.39.2