[Scummvm-git-logs] scummvm branch-2-6 -> 5f0521982991e9494c3ca07d25a42d4645975097
lotharsm
noreply at scummvm.org
Sat Oct 1 07:42:07 UTC 2022
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7294f8be1c GUI: Remove useless widget
2e53d9cc5d GUI: Move buttons bar below launcher lower
f08089263f GUI: Move the icons per row slider value to the right
7d7de5930b GUI: Make GridWidget accept focus
1c9dbb111a GUI: TTS: strip GUI formatting before reading list item
cf88e250ef GUI: Fix mass add crash with older ScummVM configs
2b7dee23b6 GUI: Add overlay to show demo status on thumbnails
5f05219829 GUI: Avoid dupicate icon loading
Commit: 7294f8be1c250011d1511064ed17e3640b0fe77a
https://github.com/scummvm/scummvm/commit/7294f8be1c250011d1511064ed17e3640b0fe77a
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-30T23:43:43+02:00
Commit Message:
GUI: Remove useless widget
Changed paths:
gui/themes/common/highres_layout.stx
gui/themes/residualvm.zip
gui/themes/scummclassic.zip
gui/themes/scummmodern.zip
gui/themes/scummremastered.zip
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 08f99ff62c9..446bac45f14 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -297,7 +297,6 @@
/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
- <widget name = 'GameList'/>
<widget name = 'IconArea'/>
</layout>
<layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index ca395231576..16c71cd4f06 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 64715b963bc..d9aeb1e3d8e 100644
Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 322d77e415b..917584294e2 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index ca2df14d3d2..dd604a64f97 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
Commit: 2e53d9cc5d170f18b25f174133e9f62ed63cbb3d
https://github.com/scummvm/scummvm/commit/2e53d9cc5d170f18b25f174133e9f62ed63cbb3d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-30T23:44:28+02:00
Commit Message:
GUI: Move buttons bar below launcher lower
Else widgets are erased when the launcher widget is redrawn
Changed paths:
gui/themes/common/highres_layout.stx
gui/themes/residualvm.zip
gui/themes/scummmodern.zip
gui/themes/scummremastered.zip
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 446bac45f14..2268cb61e18 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -224,7 +224,7 @@
/>
</layout>
</layout>
- <layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '2'>
+ <layout type = 'horizontal' padding = '0, 0, 6, 0' spacing = '2'>
<widget name = 'ListSwitch'
height = 'Globals.Button.Height'
width = 'Globals.Button.Height'
@@ -299,7 +299,7 @@
<layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
<widget name = 'IconArea'/>
</layout>
- <layout type = 'horizontal' padding = '0, 0, 2, 0' spacing = '2'>
+ <layout type = 'horizontal' padding = '0, 0, 6, 0' spacing = '2'>
<widget name = 'ListSwitch'
height = 'Globals.Button.Height'
width = 'Globals.Button.Height'
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 16c71cd4f06..38f296bf010 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 917584294e2..7dccb2b1473 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index dd604a64f97..38a81f42817 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
Commit: f08089263f132785c102d646681d04bd7117a4b5
https://github.com/scummvm/scummvm/commit/f08089263f132785c102d646681d04bd7117a4b5
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-30T23:45:02+02:00
Commit Message:
GUI: Move the icons per row slider value to the right
Else it's stuck to the slider widget
Changed paths:
gui/themes/common/highres_layout.stx
gui/themes/residualvm.zip
gui/themes/scummmodern.zip
gui/themes/scummremastered.zip
diff --git a/gui/themes/common/highres_layout.stx b/gui/themes/common/highres_layout.stx
index 2268cb61e18..7771d1e1fd4 100644
--- a/gui/themes/common/highres_layout.stx
+++ b/gui/themes/common/highres_layout.stx
@@ -315,6 +315,8 @@
type = 'Slider'
rtl = 'no'
/>
+ <space size = '6'
+ />
<widget name = 'GridItemsPerRowLabel'
type = 'SmallLabel'
/>
diff --git a/gui/themes/residualvm.zip b/gui/themes/residualvm.zip
index 38f296bf010..0f00fb8ded5 100644
Binary files a/gui/themes/residualvm.zip and b/gui/themes/residualvm.zip differ
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 7dccb2b1473..7ce7a42daa4 100644
Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ
diff --git a/gui/themes/scummremastered.zip b/gui/themes/scummremastered.zip
index 38a81f42817..3297cacf327 100644
Binary files a/gui/themes/scummremastered.zip and b/gui/themes/scummremastered.zip differ
Commit: 7d7de5930bcf2974a091784cd87c032e5a477ad8
https://github.com/scummvm/scummvm/commit/7d7de5930bcf2974a091784cd87c032e5a477ad8
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-09-30T23:45:17+02:00
Commit Message:
GUI: Make GridWidget accept focus
This avoids the filter text to take the focus.
In Android this prevents the launcher to start with the virtual keyboard
displayed.
In the future, the widget could also take keyboards event into account
like the ListWidget one.
Changed paths:
gui/widgets/grid.h
diff --git a/gui/widgets/grid.h b/gui/widgets/grid.h
index f91ff3f52a2..e3ce8169ca9 100644
--- a/gui/widgets/grid.h
+++ b/gui/widgets/grid.h
@@ -206,6 +206,8 @@ public:
void reflowLayout() override;
+ bool wantsFocus() override { return true; }
+
void openTray(int x, int y, int entryID);
void openTrayAtSelected();
void scrollBarRecalc();
Commit: 1c9dbb111a3047c3bd2c12993ff9d4dbf3dc81aa
https://github.com/scummvm/scummvm/commit/1c9dbb111a3047c3bd2c12993ff9d4dbf3dc81aa
Author: Niv Baehr (bloop93 at gmail.com)
Date: 2022-10-01T00:01:49+02:00
Commit Message:
GUI: TTS: strip GUI formatting before reading list item
Changed paths:
gui/widgets/list.cpp
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 3e38c38fe64..ba2c0e295ee 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -285,7 +285,7 @@ void ListWidget::handleMouseMoved(int x, int y, int button) {
if (item != -1) {
if(_lastRead != item) {
- read(_list[item]);
+ read(stripGUIformatting(_list[item]));
_lastRead = item;
}
}
Commit: cf88e250ef06031e351466df3fd22a3f6f31c003
https://github.com/scummvm/scummvm/commit/cf88e250ef06031e351466df3fd22a3f6f31c003
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-01T00:02:52+02:00
Commit Message:
GUI: Fix mass add crash with older ScummVM configs
Changed paths:
gui/massadd.cpp
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 018c96bee7e..6349929e741 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -208,8 +208,8 @@ void MassAddDialog::handleTickle() {
// If the engineid, gameid, platform and language match -> skip it
Common::ConfigManager::Domain *dom = ConfMan.getDomain(*iter);
assert(dom);
-
- if ((*dom)["engineid"] == result.engineId &&
+
+ if ((!dom->contains("engineid") || (*dom)["engineid"] == result.engineId) &&
(*dom)["gameid"] == result.gameId &&
dom->getValOrDefault("platform") == resultPlatformCode &&
parseLanguage(dom->getValOrDefault("language")) == parseLanguage(resultLanguageCode)) {
Commit: 2b7dee23b6dd80ece096350a4cd87d2d97fb2e37
https://github.com/scummvm/scummvm/commit/2b7dee23b6dd80ece096350a4cd87d2d97fb2e37
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2022-10-01T00:14:56+02:00
Commit Message:
GUI: Add overlay to show demo status on thumbnails
Changed paths:
gui/launcher.cpp
gui/themes/gui-icons.dat
gui/widgets/grid.cpp
gui/widgets/grid.h
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index c163a8a47df..99be3a0a139 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -1547,11 +1547,13 @@ void LauncherGrid::updateListing() {
Common::String engineid = "UNK";
Common::String language = "XX";
Common::String platform;
+ Common::String extra;
iter->domain->tryGetVal("engineid", engineid);
iter->domain->tryGetVal("language", language);
iter->domain->tryGetVal("platform", platform);
+ iter->domain->tryGetVal("extra", extra);
attrs.push_back(iter->domain);
- gridList.push_back(GridItemInfo(k++, engineid, gameid, iter->title, iter->description, Common::parseLanguage(language), Common::parsePlatform(platform)));
+ gridList.push_back(GridItemInfo(k++, engineid, gameid, iter->title, iter->description, extra, Common::parseLanguage(language), Common::parsePlatform(platform)));
}
const int oldSel = _grid->getSelected();
diff --git a/gui/themes/gui-icons.dat b/gui/themes/gui-icons.dat
index 786cd53840b..a6cbacc4776 100644
Binary files a/gui/themes/gui-icons.dat and b/gui/themes/gui-icons.dat differ
diff --git a/gui/widgets/grid.cpp b/gui/widgets/grid.cpp
index ccae86ba5f2..05584156692 100644
--- a/gui/widgets/grid.cpp
+++ b/gui/widgets/grid.cpp
@@ -136,6 +136,13 @@ void GridItemWidget::drawWidget() {
g_gui.theme()->drawSurface(p, *flagGfx, true);
}
+ // Draw Demo Overlay
+ const Graphics::ManagedSurface *demoGfx = _grid->demoToSurface(_activeEntry->extra);
+ if (demoGfx) {
+ Common::Point p(_x + ((thumbWidth - demoGfx->w)/2) , _y + (thumbHeight - demoGfx->h - 10));
+ g_gui.theme()->drawSurface(p, *demoGfx, true);
+ }
+
// Draw Title
if (_grid->_isTitlesVisible) {
// TODO: Currently title is fixed to two lines at all times, we may want
@@ -345,6 +352,8 @@ GridWidget::GridWidget(GuiObject *boss, const Common::String &name)
_flagIconWidth = 0;
_platformIconHeight = 0;
_platformIconWidth = 0;
+ _extraIconHeight = 0;
+ _extraIconWidth = 0;
_minGridXSpacing = 0;
_minGridYSpacing = 0;
_isTitlesVisible = 0;
@@ -381,6 +390,7 @@ GridWidget::GridWidget(GuiObject *boss, const Common::String &name)
GridWidget::~GridWidget() {
unloadSurfaces(_platformIcons);
unloadSurfaces(_languageIcons);
+ unloadSurfaces(_extraIcons);
unloadSurfaces(_loadedSurfaces);
_gridItems.clear();
_dataEntryList.clear();
@@ -415,6 +425,12 @@ const Graphics::ManagedSurface *GridWidget::platformToSurface(Common::Platform p
return _platformIcons[platformCode];
}
+const Graphics::ManagedSurface *GridWidget::demoToSurface(const Common::String extraString) {
+ if (! extraString.contains("Demo") )
+ return nullptr;
+ return _extraIcons[0];
+}
+
void GridWidget::setEntryList(Common::Array<GridItemInfo> *list) {
_dataEntryList.clear();
_headerEntryList.clear();
@@ -671,6 +687,21 @@ void GridWidget::loadPlatformIcons() {
}
}
+void GridWidget::loadExtraIcons() { // for now only the demo icon is available
+ Graphics::ManagedSurface *gfx = loadSurfaceFromFile("icons/extra/demo.png");
+ if (gfx) {
+ const Graphics::ManagedSurface *scGfx = scaleGfx(gfx, _extraIconWidth, _extraIconHeight, true);
+ _extraIcons[0] = scGfx;
+ if (gfx != scGfx) {
+ gfx->free();
+ delete gfx;
+ }
+ } else {
+ _extraIcons[0] = nullptr;
+ }
+
+}
+
void GridWidget::destroyItems() {
for (Common::Array<GridItemWidget *>::iterator i = _gridItems.begin(), end = _gridItems.end(); i != end; ++i) {
removeWidget((*i));
@@ -891,12 +922,15 @@ void GridWidget::reflowLayout() {
_flagIconWidth = _thumbnailWidth / 4;
_flagIconHeight = _flagIconWidth / 2;
_platformIconHeight = _platformIconWidth = _thumbnailWidth / 6;
+ _extraIconWidth = _thumbnailWidth / 2;
+ _extraIconHeight = _extraIconWidth / 4;
if ((oldThumbnailHeight != _thumbnailHeight) || (oldThumbnailWidth != _thumbnailWidth)) {
unloadSurfaces(_loadedSurfaces);
reloadThumbnails();
loadFlagIcons();
loadPlatformIcons();
+ loadExtraIcons();
}
_trayHeight = kLineHeight * 3;
diff --git a/gui/widgets/grid.h b/gui/widgets/grid.h
index e3ce8169ca9..232760fb1bd 100644
--- a/gui/widgets/grid.h
+++ b/gui/widgets/grid.h
@@ -54,6 +54,7 @@ struct GridItemInfo {
Common::String gameid;
Common::String title;
Common::String description;
+ Common::String extra;
Common::String thumbPath;
// Generic attribute value, may be any piece of metadata
Common::String attribute;
@@ -63,8 +64,8 @@ struct GridItemInfo {
int32 x, y, w, h;
GridItemInfo(int id, const Common::String &eid, const Common::String &gid, const Common::String &t,
- const Common::String &d, Common::Language l, Common::Platform p)
- : entryID(id), gameid(gid), engineid(eid), title(t), description(d), language(l), platform(p), isHeader(false) {
+ const Common::String &d, const Common::String &e, Common::Language l, Common::Platform p)
+ : entryID(id), gameid(gid), engineid(eid), title(t), description(d), extra(e), language(l), platform(p), isHeader(false) {
thumbPath = Common::String::format("icons/%s-%s.png", engineid.c_str(), gameid.c_str());
}
@@ -99,6 +100,7 @@ class GridWidget : public ContainerWidget, public CommandSender {
protected:
Common::HashMap<int, const Graphics::ManagedSurface *> _platformIcons;
Common::HashMap<int, const Graphics::ManagedSurface *> _languageIcons;
+ Common::HashMap<int, const Graphics::ManagedSurface *> _extraIcons;
// Images are mapped by filename -> surface.
Common::HashMap<Common::String, const Graphics::ManagedSurface *> _loadedSurfaces;
@@ -134,6 +136,8 @@ protected:
int _flagIconWidth;
int _platformIconHeight;
int _platformIconWidth;
+ int _extraIconHeight;
+ int _extraIconWidth;
int _minGridXSpacing;
int _minGridYSpacing;
int _rows;
@@ -169,6 +173,7 @@ public:
const Graphics::ManagedSurface *filenameToSurface(const Common::String &name);
const Graphics::ManagedSurface *languageToSurface(Common::Language languageCode);
const Graphics::ManagedSurface *platformToSurface(Common::Platform platformCode);
+ const Graphics::ManagedSurface *demoToSurface(const Common::String extraString);
/// Update _visibleEntries from _allEntries and returns true if reload is required.
bool calcVisibleEntries();
@@ -187,6 +192,7 @@ public:
void reloadThumbnails();
void loadFlagIcons();
void loadPlatformIcons();
+ void loadExtraIcons();
void destroyItems();
void calcInnerHeight();
Commit: 5f0521982991e9494c3ca07d25a42d4645975097
https://github.com/scummvm/scummvm/commit/5f0521982991e9494c3ca07d25a42d4645975097
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-10-01T00:15:22+02:00
Commit Message:
GUI: Avoid dupicate icon loading
Changed paths:
gui/widgets/grid.cpp
diff --git a/gui/widgets/grid.cpp b/gui/widgets/grid.cpp
index 05584156692..33b51fb1c62 100644
--- a/gui/widgets/grid.cpp
+++ b/gui/widgets/grid.cpp
@@ -639,12 +639,22 @@ void GridWidget::reloadThumbnails() {
Graphics::ManagedSurface *surf = loadSurfaceFromFile(path);
if (!surf) {
path = Common::String::format("icons/%s.png", entry->engineid.c_str());
- surf = loadSurfaceFromFile(path);
+ if (!_loadedSurfaces.contains(path)) {
+ surf = loadSurfaceFromFile(path);
+ } else {
+ continue;
+ }
+
}
if (surf) {
const Graphics::ManagedSurface *scSurf(scaleGfx(surf, _thumbnailWidth, _thumbnailHeight, true));
_loadedSurfaces[entry->thumbPath] = scSurf;
+
+ if (path != entry->thumbPath) {
+ _loadedSurfaces[path] = new Graphics::ManagedSurface(*scSurf);
+ }
+
if (surf != scSurf) {
surf->free();
delete surf;
@@ -699,7 +709,6 @@ void GridWidget::loadExtraIcons() { // for now only the demo icon is available
} else {
_extraIcons[0] = nullptr;
}
-
}
void GridWidget::destroyItems() {
More information about the Scummvm-git-logs
mailing list