aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2019-07-19 20:06:01 +0700
committerMatan Bareket2019-07-30 14:51:41 -0400
commite4da63823ad363cfd24b15bc671aa6cb8f5b43f1 (patch)
tree0588946d3fb4c9bd78fe39f6641e7453f050fa25
parenta9d47a163ea625782517125f8aa31735039985a0 (diff)
downloadscummvm-rg350-e4da63823ad363cfd24b15bc671aa6cb8f5b43f1.tar.gz
scummvm-rg350-e4da63823ad363cfd24b15bc671aa6cb8f5b43f1.tar.bz2
scummvm-rg350-e4da63823ad363cfd24b15bc671aa6cb8f5b43f1.zip
GUI: Add feature description into Wi-Fi Sharing tab
-rw-r--r--gui/options.cpp16
-rw-r--r--gui/options.h2
-rw-r--r--gui/themes/scummclassic.zipbin136187 -> 136751 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx8
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx8
-rw-r--r--gui/themes/scummmodern.zipbin264954 -> 265518 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx8
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx8
-rw-r--r--gui/themes/scummremastered.zipbin264892 -> 265456 bytes
-rw-r--r--gui/themes/scummremastered/remastered_layout.stx8
-rw-r--r--gui/themes/scummremastered/remastered_layout_lowres.stx8
11 files changed, 66 insertions, 0 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index f7c9f60023..245b985c43 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1514,6 +1514,8 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
_serverPortDesc = 0;
_serverPort = 0;
_serverPortClearButton = 0;
+ _featureDescriptionLine1 = 0;
+ _featureDescriptionLine2 = 0;
_serverWasRunning = false;
#endif
#endif
@@ -1915,6 +1917,9 @@ void GlobalOptionsDialog::addWiFiSharingControls(GuiObject *boss, const Common::
_serverPortDesc = new StaticTextWidget(boss, prefix + "ServerPortDesc", _("Server's port:"), _("Port for server to use"));
_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), 0);
_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
+
+ _featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same Wi-Fi network).", context), "", ThemeEngine::kFontStyleNormal);
+ _featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _c("Closing options dialog will stop the server.", context), "", ThemeEngine::kFontStyleNormal);
reflowWiFiSharingTabLayout();
@@ -2626,6 +2631,17 @@ void GlobalOptionsDialog::reflowWiFiSharingTabLayout() {
if (_serverPortClearButton)
_serverPortClearButton->setVisible(false);
#endif // NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE
+
+ // if port override isn't supported, there will be a gap between these lines and options -- it's OK
+
+ if (_featureDescriptionLine1) {
+ _featureDescriptionLine1->setVisible(true);
+ _featureDescriptionLine1->setEnabled(false);
+ }
+ if (_featureDescriptionLine2) {
+ _featureDescriptionLine2->setVisible(true);
+ _featureDescriptionLine2->setEnabled(false);
+ }
}
#endif // USE_SDL_NET
diff --git a/gui/options.h b/gui/options.h
index fe9c93c411..10e192d092 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -343,6 +343,8 @@ protected:
StaticTextWidget *_serverPortDesc;
EditTextWidget *_serverPort;
ButtonWidget *_serverPortClearButton;
+ StaticTextWidget *_featureDescriptionLine1;
+ StaticTextWidget *_featureDescriptionLine2;
bool _serverWasRunning;
void addWiFiSharingControls(GuiObject *boss, const Common::String &prefix, const char *context = nullptr);
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 1e8f3ad802..c06cdae6ba 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index f5fb08e833..dd0ff14655 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -767,6 +767,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '4' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index bbeead9032..8d014d9060 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -774,6 +774,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '2' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index d6ce4c3b32..794b0d7a95 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 967e5e5da1..d7c60b66b6 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -781,6 +781,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '4' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 8ff830af29..558d5dc2d2 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -772,6 +772,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '2' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 763fc46dfa..5bd3719d8c 100644
--- a/gui/themes/scummremastered.zip
+++ b/gui/themes/scummremastered.zip
Binary files differ
diff --git a/gui/themes/scummremastered/remastered_layout.stx b/gui/themes/scummremastered/remastered_layout.stx
index 967e5e5da1..d7c60b66b6 100644
--- a/gui/themes/scummremastered/remastered_layout.stx
+++ b/gui/themes/scummremastered/remastered_layout.stx
@@ -781,6 +781,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '4' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>
diff --git a/gui/themes/scummremastered/remastered_layout_lowres.stx b/gui/themes/scummremastered/remastered_layout_lowres.stx
index f16b905b6a..53a1acc717 100644
--- a/gui/themes/scummremastered/remastered_layout_lowres.stx
+++ b/gui/themes/scummremastered/remastered_layout_lowres.stx
@@ -772,6 +772,14 @@
width = 'Globals.Line.Height'
/>
</layout>
+ <layout type = 'vertical' padding = '0, 0, 0, 0' spacing = '2' center = 'true'>
+ <widget name = 'FeatureDescriptionLine1'
+ height = 'Globals.Line.Height'
+ />
+ <widget name = 'FeatureDescriptionLine2'
+ height = 'Globals.Line.Height'
+ />
+ </layout>
</layout>
</dialog>