aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeParser.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2019-11-13 21:09:21 +0100
committerBastien Bouclet2019-11-24 14:06:25 +0100
commit2c812a6b7a0b24b9012379118867fb4f64f32c14 (patch)
tree6f4225127305dbdae8f3a0dc7dfe61e51af51b1a /gui/ThemeParser.cpp
parent3db6aed4e474d5b16639ee4958d1cd13504d12fb (diff)
downloadscummvm-rg350-2c812a6b7a0b24b9012379118867fb4f64f32c14.tar.gz
scummvm-rg350-2c812a6b7a0b24b9012379118867fb4f64f32c14.tar.bz2
scummvm-rg350-2c812a6b7a0b24b9012379118867fb4f64f32c14.zip
GUI: Add DropdownButtonWidget and use it in the launcher for mass add
DropdownButtonWidget is a button split in two parts vertically. Clicking the left part triggers a default action. Clicking the right part shows a list of other actions the user can choose from. Using this widget on the launcher lets 'Mass add' be a secondary action of the 'Add' button, removing the necessity of pressing the shift key to access the feature.
Diffstat (limited to 'gui/ThemeParser.cpp')
-rw-r--r--gui/ThemeParser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index a52e3592af..f92676a383 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -629,6 +629,17 @@ bool ThemeParser::parseDrawStep(ParserNode *stepNode, Graphics::DrawStep *drawst
}
}
+ if (stepNode->values.contains("clip")) {
+ val = stepNode->values["clip"];
+ int cl, ct, cr, cb;
+ if (parseIntegerKey(val, 4, &cl, &ct, &cr, &cb)) {
+ drawstep->clip.left = cl;
+ drawstep->clip.top = ct;
+ drawstep->clip.right = cr;
+ drawstep->clip.bottom = cb;
+ }
+ }
+
#undef PARSER_ASSIGN_INT
#undef PARSER_ASSIGN_RGB