summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_opt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-03 14:50:35 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-03 14:50:35 +0300
commit18738a3452bc980a943734aad8fa1c23366342ce (patch)
tree5d24a652b9a152d5dc039d3554f1d4203662b39e /protocols/Weather/src/weather_opt.cpp
parent4d051e1f4afd92b8dbc0e9129c903af377ad7f76 (diff)
files #4837 (Weather: не работает кнопка "Ещё переменные")
Diffstat (limited to 'protocols/Weather/src/weather_opt.cpp')
-rw-r--r--protocols/Weather/src/weather_opt.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/Weather/src/weather_opt.cpp b/protocols/Weather/src/weather_opt.cpp
index c5323919be..7c0829b006 100644
--- a/protocols/Weather/src/weather_opt.cpp
+++ b/protocols/Weather/src/weather_opt.cpp
@@ -341,11 +341,12 @@ static variables[] =
class COptionsTextDlg : public CWeatherDlgBase
{
- CCtrlMButton btnReset, tm1, tm2, tm3, tm4, tm5, tm6, tm7, tm8;
+ CCtrlMButton btnMore, btnReset, tm1, tm2, tm3, tm4, tm5, tm6, tm7, tm8;
public:
COptionsTextDlg(CWeatherProto *ppro) :
CWeatherDlgBase(ppro, IDD_TEXTOPT),
+ btnMore(this, IDC_MORE),
btnReset(this, IDC_RESET),
tm1(this, IDC_TM1),
tm2(this, IDC_TM2),
@@ -356,6 +357,7 @@ public:
tm7(this, IDC_TM7),
tm8(this, IDC_TM8)
{
+ btnMore.OnClick = Callback(this, &COptionsTextDlg::onClick_More);
btnReset.OnClick = Callback(this, &COptionsTextDlg::onClick_Reset);
tm1.OnClick = tm2.OnClick = tm3.OnClick = tm4.OnClick = tm5.OnClick = tm6.OnClick = tm7.OnClick = tm8.OnClick =
@@ -389,6 +391,7 @@ public:
tm6.MakeFlat();
tm7.MakeFlat();
tm8.MakeFlat();
+ btnMore.MakeFlat();
btnReset.MakeFlat();
return true;
}
@@ -410,6 +413,17 @@ public:
return true;
}
+ void onClick_More(CCtrlButton *)
+ {
+ // heading
+ CMStringW str(TranslateT("Here is a list of custom variables that are currently available"));
+ str += L"\n\n";
+ GetVarsDescr(str);
+
+ // display the list in a message box
+ MessageBox(nullptr, str, TranslateT("More Variables"), MB_OK | MB_ICONINFORMATION | MB_TOPMOST);
+ }
+
void onClick_TM(CCtrlButton *pButton)
{
// display the menu