|
From: Tapio V. <aa...@us...> - 2009-12-11 12:44:48
|
Module: performous
Branch: dance
Commit: 3430f76f3c78f33334d775724be7e10c3b283650
Author: Miguel Sánchez de León Peque <peq...@ho...>
Date: Thu Dec 3 19:31:01 2009 +0100
Little changes on new theme and code related to the menu.
---
game/screen_intro.cc | 6 +-
game/theme.cc | 5 +-
game/theme.hh | 10 ++-
themes/default/intro_bg.svg | 14 ----
themes/default/menu_comment_bg.svg | 124 +++++++++++++++++++++++++++++++
themes/default/menu_option_selected.svg | 6 +-
6 files changed, 141 insertions(+), 24 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index aa272ef..aa3edfe 100755
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -51,8 +51,8 @@ void ScreenIntro::draw_menu_options() {
if (i == selected) {
theme->back_h.dimensions.left(-0.4).center(-0.1 + i*0.08);
theme->back_h.draw();
- theme->option.dimensions.left(-0.35).center(-0.1 + i*0.08);
- theme->option.draw(m_menuOptions[i].name);
+ theme->option_selected.dimensions.left(-0.35).center(-0.1 + i*0.08);
+ theme->option_selected.draw(m_menuOptions[i].name);
} else {
theme->option.dimensions.left(-0.35).center(-0.1 + i*0.08);
theme->option.draw(m_menuOptions[i].name);
@@ -63,6 +63,8 @@ void ScreenIntro::draw_menu_options() {
void ScreenIntro::draw() {
theme->bg.draw();
m_menuOptions[selected].image.draw();
+ theme->comment_bg.dimensions.center().center(0.336);
+ theme->comment_bg.draw();
theme->comment.dimensions.left(-0.45).center(0.336);
theme->comment.draw(m_menuOptions[selected].comment);
draw_menu_options();
diff --git a/game/theme.cc b/game/theme.cc
index 1df16ea..4feb1b1 100755
--- a/game/theme.cc
+++ b/game/theme.cc
@@ -44,8 +44,9 @@ ThemeIntro::ThemeIntro():
Theme(getThemePath("intro_bg.svg")),
back_h(getThemePath("menu_back_highlight.svg")),
option(getThemePath("menu_option.svg"), config["graphic/text_lod"].f()),
- comment(getThemePath("menu_comment.svg"), config["graphic/text_lod"].f())
+ option_selected(getThemePath("menu_option_selected.svg")),
+ comment(getThemePath("menu_comment.svg"), config["graphic/text_lod"].f()),
+ comment_bg(getThemePath("menu_comment_bg.svg"))
{
- option.setHighlight(getThemePath("menu_option_selected.svg"));
back_h.dimensions.fixedHeight(0.08f);
}
diff --git a/game/theme.hh b/game/theme.hh
index bef2aeb..7ee2ad8 100755
--- a/game/theme.hh
+++ b/game/theme.hh
@@ -62,10 +62,14 @@ struct ThemeConfiguration: Theme {
/// theme for intro screen
struct ThemeIntro: Theme {
ThemeIntro();
- /// back highlight
+ /// back highlight for selected option
Surface back_h;
- /// menu option
+ /// menu option text
SvgTxtTheme option;
- /// menu comment
+ /// menu selected option text
+ SvgTxtTheme option_selected;
+ /// menu comment text
SvgTxtTheme comment;
+ /// menu comment background
+ Surface comment_bg;
};
diff --git a/themes/default/intro_bg.svg b/themes/default/intro_bg.svg
index 7709edb..c808fe5 100644
--- a/themes/default/intro_bg.svg
+++ b/themes/default/intro_bg.svg
@@ -592,20 +592,6 @@
<g
id="g3952"
transform="translate(-2.6135359,3.2274215)" />
- <rect
- style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.00187743;stroke-opacity:1"
- id="rect3982-4"
- width="1003.7961"
- height="49.998123"
- x="-2.2971582"
- y="716.00092" />
- <rect
- style="fill:url(#linearGradient5460);fill-opacity:1;stroke:none"
- id="rect3982"
- width="1000"
- height="50"
- x="0"
- y="716" />
<g
transform="translate(38.862478,-17.929078)"
id="g3873">
diff --git a/themes/default/menu_comment_bg.svg b/themes/default/menu_comment_bg.svg
new file mode 100644
index 0000000..15f6303
--- /dev/null
+++ b/themes/default/menu_comment_bg.svg
@@ -0,0 +1,124 @@
+<?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="51"
+ id="svg2919"
+ version="1.1"
+ inkscape:version="0.47pre4 r22446"
+ sodipodi:docname="menu_comment_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,0,0,0.98,-3.1907349e-7,298.72223)"
+ 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" />
+ </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="472.87473"
+ inkscape:cy="116.23028"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="726"
+ 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,-1001.3622)">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.00187743;stroke-opacity:1"
+ id="rect3982-4"
+ width="1003.7961"
+ height="49.998123"
+ x="-1.8940613"
+ y="1001.8631" />
+ <rect
+ style="fill:url(#linearGradient2917);fill-opacity:1;stroke:none"
+ id="rect3982"
+ width="1000"
+ height="49"
+ x="0"
+ y="1002.3622" />
+ </g>
+</svg>
diff --git a/themes/default/menu_option_selected.svg b/themes/default/menu_option_selected.svg
index f3dc52a..2cbccc6 100755
--- a/themes/default/menu_option_selected.svg
+++ b/themes/default/menu_option_selected.svg
@@ -17,7 +17,7 @@
id="svg559"
sodipodi:version="0.32"
inkscape:version="0.47pre4 r22446"
- sodipodi:docname="menu_comment.svg"
+ sodipodi:docname="menu_option_selected.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs2522">
@@ -37,7 +37,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -54,7 +54,7 @@
pagecolor="#ffffff"
id="base"
inkscape:zoom="3.5638182"
- inkscape:cx="63.312761"
+ inkscape:cx="53.491625"
inkscape:cy="28.662714"
inkscape:window-x="0"
inkscape:window-y="25"
|