|
From: Peque <ms...@us...> - 2009-12-24 23:04:32
|
Module: performous
Branch: master
Commit: 8b96759edcd4581753c79fa848ae0e3320f6d319
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Fri Dec 25 00:03:10 2009 +0100
Change in configure screen: tip differenced from the menu option comment
---
game/screen_configuration.cc | 14 ++--
game/screen_intro.cc | 2 +-
game/theme.cc | 3 +-
game/theme.hh | 2 +
themes/default/menu_scomment_bg.svg | 145 +++++++++++++++++++++++++++++++++++
5 files changed, 157 insertions(+), 9 deletions(-)
diff --git a/game/screen_configuration.cc b/game/screen_configuration.cc
index 715fed7..5f9908e 100644
--- a/game/screen_configuration.cc
+++ b/game/screen_configuration.cc
@@ -47,17 +47,17 @@ void ScreenConfiguration::draw() {
ConfigItem const& ci = config[configuration[selected]];
theme->item.draw(ci.getShortDesc());
theme->value.draw(ci.getValue());
- // Long description
- theme->comment_bg.dimensions.middle().screenBottom(-0.05);
- theme->comment_bg.draw();
- theme->comment.dimensions.left(-0.48).screenBottom(-0.068);
- theme->comment.draw(ci.getLongDesc());
// Key help
+ theme->short_comment_bg.dimensions.fixedHeight(0.025);
+ theme->short_comment_bg.dimensions.right(-0.04).screenBottom(-0.054);
+ theme->short_comment_bg.draw();
+ theme->comment.dimensions.left(-0.48).screenBottom(-0.067);
+ theme->comment.draw("Ctrl + S to save, Ctrl + R to reset defaults");
+ // Long description
theme->comment_bg.dimensions.middle().screenBottom(-0.01);
theme->comment_bg.draw();
theme->comment.dimensions.left(-0.48).screenBottom(-0.028);
- theme->comment.draw("Ctrl + S to save, Ctrl + R to reset defaults");
-
+ theme->comment.draw(ci.getLongDesc());
}
}
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index c3625ae..3ef4f54 100755
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -68,7 +68,7 @@ void ScreenIntro::draw() {
m_menuOptions[selected].image.draw();
theme->comment_bg.dimensions.center().screenBottom(-0.01);
theme->comment_bg.draw();
- theme->comment.dimensions.left(-0.45).screenBottom(-0.028);
+ theme->comment.dimensions.left(-0.48).screenBottom(-0.028);
theme->comment.draw(m_menuOptions[selected].comment);
draw_menu_options();
if (m_dialog) m_dialog->draw();
diff --git a/game/theme.cc b/game/theme.cc
index 88d48ec..e58d373 100755
--- a/game/theme.cc
+++ b/game/theme.cc
@@ -39,7 +39,8 @@ ThemeConfiguration::ThemeConfiguration():
item(getThemePath("configuration_item.svg"), config["graphic/text_lod"].f()),
value(getThemePath("configuration_value.svg"), config["graphic/text_lod"].f()),
comment(getThemePath("menu_comment.svg"), config["graphic/text_lod"].f()),
- comment_bg(getThemePath("menu_comment_bg.svg"))
+ comment_bg(getThemePath("menu_comment_bg.svg")),
+ short_comment_bg(getThemePath("menu_scomment_bg.svg"))
{}
ThemeIntro::ThemeIntro():
diff --git a/game/theme.hh b/game/theme.hh
index 73967de..d62a902 100755
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -61,6 +61,8 @@ struct ThemeConfiguration: Theme {
SvgTxtTheme comment;
/// configuration comment background
Surface comment_bg;
+ /// configuration comment background (short tip)
+ Surface short_comment_bg;
};
/// theme for intro screen
diff --git a/themes/default/menu_scomment_bg.svg b/themes/default/menu_scomment_bg.svg
new file mode 100644
index 0000000..e150054
--- /dev/null
+++ b/themes/default/menu_scomment_bg.svg
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1000"
+ height="35"
+ id="svg2919"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="menu_scomment_bg.svg">
+ <defs
+ id="defs2921">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective2927" />
+ <inkscape:perspective
+ id="perspective2908"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5448"
+ id="linearGradient5460"
+ gradientUnits="userSpaceOnUse"
+ x1="0"
+ y1="768"
+ x2="0"
+ y2="713.1153"
+ gradientTransform="translate(0,-2)" />
+ <linearGradient
+ id="linearGradient5448">
+ <stop
+ style="stop-color:#beb7c8;stop-opacity:1;"
+ offset="0"
+ id="stop5450" />
+ <stop
+ style="stop-color:#beb7c8;stop-opacity:0;"
+ offset="1"
+ id="stop5452" />
+ </linearGradient>
+ <linearGradient
+ y2="713.1153"
+ x2="0"
+ y1="768"
+ x1="0"
+ gradientTransform="matrix(1.0001729,0,0,0.66978968,-0.08644188,537.20848)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2917"
+ xlink:href="#linearGradient5448"
+ inkscape:collect="always" />
+ <inkscape:perspective
+ id="perspective2956"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2821"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5448"
+ id="linearGradient2822"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.99852984,0,0,0.66980918,0.81308358,537.19399)"
+ x1="0"
+ y1="768"
+ x2="0"
+ y2="713.1153" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.70710678"
+ inkscape:cx="479.0479"
+ inkscape:cy="122.05966"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="725"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2924">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Capa 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1017.3622)">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.8263821;stroke-opacity:1"
+ id="rect3982-4"
+ width="999.17365"
+ height="34.173618"
+ x="0.41319105"
+ y="1017.7752"
+ rx="10"
+ ry="10" />
+ <rect
+ style="fill:url(#linearGradient2822);fill-opacity:1;stroke:none"
+ id="rect3982"
+ width="998.52972"
+ height="33.490456"
+ x="0.81308591"
+ y="1018.1172"
+ rx="10"
+ ry="10" />
+ </g>
+</svg>
|