aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/commandLine.cpp2
-rw-r--r--gui/ThemeEngine.h2
-rw-r--r--gui/browser.cpp18
-rw-r--r--gui/browser.h4
-rw-r--r--gui/themes/default.inc14
-rw-r--r--gui/themes/scummclassic.zipbin103734 -> 104007 bytes
-rw-r--r--gui/themes/scummclassic/THEMERC2
-rw-r--r--gui/themes/scummclassic/classic_layout.stx25
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx26
-rw-r--r--gui/themes/scummmodern.zipbin1462039 -> 1462312 bytes
-rw-r--r--gui/themes/scummmodern/THEMERC2
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx25
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx26
13 files changed, 97 insertions, 49 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index c5c9fe3c90..f6d1f1f702 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -240,6 +240,8 @@ void registerDefaults() {
ConfMan.registerDefault("gui_saveload_chooser", "grid");
ConfMan.registerDefault("gui_saveload_last_pos", "0");
+ ConfMan.registerDefault("gui_browser_show_hidden", false);
+
#ifdef USE_FLUIDSYNTH
// The settings are deliberately stored the same way as in Qsynth. The
// FluidSynth music driver is responsible for transforming them into
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index dda9f2c2b5..6e5fd291b7 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -35,7 +35,7 @@
#include "graphics/pixelformat.h"
-#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.19"
+#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.20"
class OSystem;
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 2b4f254156..84f2d0f747 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -32,7 +32,8 @@ namespace GUI {
enum {
kChooseCmd = 'Chos',
- kGoUpCmd = 'GoUp'
+ kGoUpCmd = 'GoUp',
+ kHiddenCmd = 'Hidd'
};
/* We want to use this as a general directory selector at some point... possible uses
@@ -47,6 +48,7 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
_isDirBrowser = dirBrowser;
_fileList = NULL;
_currentPath = NULL;
+ _showHidden = ConfMan.getBool("gui_browser_show_hidden", Common::ConfigManager::kApplicationDomain);
// Headline - TODO: should be customizable during creation time
new StaticTextWidget(this, "Browser.Headline", title);
@@ -61,6 +63,9 @@ BrowserDialog::BrowserDialog(const char *title, bool dirBrowser)
_backgroundType = GUI::ThemeEngine::kDialogBackgroundPlain;
+ // Checkbox for the "show hidden files" state.
+ _showHiddenWidget = new CheckboxWidget(this, "Browser.Hidden", _("Show hidden files"), _("Show files marked with the hidden attribute"), kHiddenCmd);
+
// Buttons
if (g_system->getOverlayWidth() > 320)
new ButtonWidget(this, "Browser.Up", _("Go up"), _("Go to previous directory level"), kGoUpCmd);
@@ -132,6 +137,15 @@ void BrowserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
if (data != (uint32)-1 && _isDirBrowser && !_nodeContent[data].isDirectory())
_fileList->setSelected(-1);
break;
+ case kHiddenCmd:
+ // Update whether the user wants hidden files to be shown
+ _showHidden = _showHiddenWidget->getState();
+ // We save the state in the application domain to avoid cluttering and
+ // to prevent odd behavior.
+ ConfMan.setBool("gui_browser_show_hidden", _showHidden, Common::ConfigManager::kApplicationDomain);
+ // Update the file listing
+ updateListing();
+ break;
default:
Dialog::handleCommand(sender, cmd, data);
}
@@ -145,7 +159,7 @@ void BrowserDialog::updateListing() {
ConfMan.set("browser_lastpath", _node.getPath());
// Read in the data from the file system
- if (!_node.getChildren(_nodeContent, Common::FSNode::kListAll))
+ if (!_node.getChildren(_nodeContent, Common::FSNode::kListAll, _showHidden))
_nodeContent.clear();
else
Common::sort(_nodeContent.begin(), _nodeContent.end());
diff --git a/gui/browser.h b/gui/browser.h
index 5cf091fbf4..7c098617bb 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -29,6 +29,7 @@ namespace GUI {
class ListWidget;
class StaticTextWidget;
+class CheckboxWidget;
class CommandSender;
class BrowserDialog : public Dialog {
@@ -40,6 +41,7 @@ public:
virtual int runModal();
#else
virtual void open();
+
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
#endif
@@ -54,6 +56,8 @@ protected:
StaticTextWidget *_currentPath;
Common::FSNode _node;
Common::FSList _nodeContent;
+ bool _showHidden;
+ CheckboxWidget *_showHiddenWidget;
#endif
Common::FSNode _choice;
bool _isDirBrowser;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 78c04f14c6..b0db4735e7 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -740,7 +740,11 @@
"height='Globals.Line.Height' "
"/> "
"<widget name='List'/> "
-"<layout type='horizontal' padding='0,0,8,0'> "
+"<layout type='vertical' padding='0,0,8,0'> "
+"<widget name='Hidden' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0'> "
"<widget name='Up' "
"type='Button' "
"/> "
@@ -753,6 +757,7 @@
"/> "
"</layout> "
"</layout> "
+"</layout> "
"</dialog> "
"<dialog name='GlobalOptions' overlays='screen' inset='16' shading='dim'> "
"<layout type='vertical' padding='0,0,0,0'> "
@@ -1868,7 +1873,11 @@
"height='Globals.Line.Height' "
"/> "
"<widget name='List'/> "
-"<layout type='horizontal' padding='0,0,16,0'> "
+"<layout type='vertical' padding='0,0,16,0'> "
+"<widget name='Hidden' "
+"type='Checkbox' "
+"/> "
+"<layout type='horizontal' padding='0,0,0,0'> "
"<widget name='Up' "
"type='Button' "
"/> "
@@ -1881,6 +1890,7 @@
"/> "
"</layout> "
"</layout> "
+"</layout> "
"</dialog> "
"<dialog name='GlobalOptions' overlays='Dialog.Launcher.GameList' shading='dim'> "
"<layout type='vertical' padding='0,0,0,0'> "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 3183417db9..3529288f23 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC
index 36eaacd168..8f40cb2a7e 100644
--- a/gui/themes/scummclassic/THEMERC
+++ b/gui/themes/scummclassic/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.19:ScummVM Classic Theme:No Author]
+[SCUMMVM_STX0.8.20:ScummVM Classic Theme:No Author]
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index 312a90e78f..656d7801cb 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -166,17 +166,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 16, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 16, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index d42efb5aa4..097f4d6e44 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -163,18 +163,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 8, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
-
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 8, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 412ed6a96f..8daabf87dc 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC
index 9e8776263b..f4304622cb 100644
--- a/gui/themes/scummmodern/THEMERC
+++ b/gui/themes/scummmodern/THEMERC
@@ -1 +1 @@
-[SCUMMVM_STX0.8.19:ScummVM Modern Theme:No Author]
+[SCUMMVM_STX0.8.20:ScummVM Modern Theme:No Author]
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index fa57e62c54..49c13cf1b0 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -180,17 +180,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 16, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 16, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 5c3cc8357e..5e6ba32a5d 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -161,18 +161,22 @@
height = 'Globals.Line.Height'
/>
<widget name = 'List'/>
- <layout type = 'horizontal' padding = '0, 0, 8, 0'>
- <widget name = 'Up'
- type = 'Button'
- />
- <space/>
- <widget name = 'Cancel'
- type = 'Button'
- />
-
- <widget name = 'Choose'
- type = 'Button'
+ <layout type = 'vertical' padding = '0, 0, 8, 0'>
+ <widget name = 'Hidden'
+ type = 'Checkbox'
/>
+ <layout type = 'horizontal' padding = '0, 0, 0, 0'>
+ <widget name = 'Up'
+ type = 'Button'
+ />
+ <space/>
+ <widget name = 'Cancel'
+ type = 'Button'
+ />
+ <widget name = 'Choose'
+ type = 'Button'
+ />
+ </layout>
</layout>
</layout>
</dialog>