mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 11:20:56 +00:00
GUI: Add feature description into Wi-Fi Sharing tab
This commit is contained in:
parent
a9d47a163e
commit
e4da63823a
@ -1514,6 +1514,8 @@ GlobalOptionsDialog::GlobalOptionsDialog(LauncherDialog *launcher)
|
|||||||
_serverPortDesc = 0;
|
_serverPortDesc = 0;
|
||||||
_serverPort = 0;
|
_serverPort = 0;
|
||||||
_serverPortClearButton = 0;
|
_serverPortClearButton = 0;
|
||||||
|
_featureDescriptionLine1 = 0;
|
||||||
|
_featureDescriptionLine2 = 0;
|
||||||
_serverWasRunning = false;
|
_serverWasRunning = false;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -1916,6 +1918,9 @@ void GlobalOptionsDialog::addWiFiSharingControls(GuiObject *boss, const Common::
|
|||||||
_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), 0);
|
_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), 0);
|
||||||
_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
|
_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();
|
reflowWiFiSharingTabLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2626,6 +2631,17 @@ void GlobalOptionsDialog::reflowWiFiSharingTabLayout() {
|
|||||||
if (_serverPortClearButton)
|
if (_serverPortClearButton)
|
||||||
_serverPortClearButton->setVisible(false);
|
_serverPortClearButton->setVisible(false);
|
||||||
#endif // NETWORKING_LOCALWEBSERVER_ENABLE_PORT_OVERRIDE
|
#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
|
#endif // USE_SDL_NET
|
||||||
|
|
||||||
|
@ -343,6 +343,8 @@ protected:
|
|||||||
StaticTextWidget *_serverPortDesc;
|
StaticTextWidget *_serverPortDesc;
|
||||||
EditTextWidget *_serverPort;
|
EditTextWidget *_serverPort;
|
||||||
ButtonWidget *_serverPortClearButton;
|
ButtonWidget *_serverPortClearButton;
|
||||||
|
StaticTextWidget *_featureDescriptionLine1;
|
||||||
|
StaticTextWidget *_featureDescriptionLine2;
|
||||||
bool _serverWasRunning;
|
bool _serverWasRunning;
|
||||||
|
|
||||||
void addWiFiSharingControls(GuiObject *boss, const Common::String &prefix, const char *context = nullptr);
|
void addWiFiSharingControls(GuiObject *boss, const Common::String &prefix, const char *context = nullptr);
|
||||||
|
Binary file not shown.
@ -767,6 +767,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
@ -774,6 +774,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
Binary file not shown.
@ -781,6 +781,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
@ -772,6 +772,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
Binary file not shown.
@ -781,6 +781,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
@ -772,6 +772,14 @@
|
|||||||
width = 'Globals.Line.Height'
|
width = 'Globals.Line.Height'
|
||||||
/>
|
/>
|
||||||
</layout>
|
</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>
|
</layout>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user