|
From: Tapio V. <aa...@us...> - 2010-01-18 22:30:21
|
Module: performous
Branch: master
Commit: e448ab311ae4e8656d073c231fdef298e91f0138
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 19 00:26:11 2010 +0200
Better position for flash messages and separate theme font file.
---
game/screenmanager.cc | 4 +-
themes/default/message_text.svg | 76 +++++++++++++++++++++++++++++++++++++++
2 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/game/screenmanager.cc b/game/screenmanager.cc
index 0fa7d75..b45f1e9 100644
--- a/game/screenmanager.cc
+++ b/game/screenmanager.cc
@@ -5,12 +5,12 @@
template<> ScreenManager* Singleton<ScreenManager>::ms_Singleton = NULL;
-ScreenManager::ScreenManager(): m_finished(false), currentScreen(), m_messagePopup(0.0, 1.0), m_textMessage(getThemePath("sing_timetxt.svg")) {
+ScreenManager::ScreenManager(): m_finished(false), currentScreen(), m_messagePopup(0.0, 1.0), m_textMessage(getThemePath("message_text.svg")) {
m_timeToFade = 1.0f;
m_timeToShow = 3.0f;
m_messagePopup.setTarget(100.0);
- m_textMessage.dimensions.fixedWidth(0.5).right(0.5).screenTop(0.01);
+ m_textMessage.dimensions.middle().screenTop(0.05);
}
void ScreenManager::activateScreen(std::string const& name) {
diff --git a/themes/default/message_text.svg b/themes/default/message_text.svg
new file mode 100755
index 0000000..f7b6716
--- /dev/null
+++ b/themes/default/message_text.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
+
+<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ x="0"
+ y="0"
+ width="110"
+ height="20"
+ id="svg559"
+ sodipodi:version="0.32"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="message_text.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs2522">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 300 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="800 : 300 : 1"
+ inkscape:persp3d-origin="400 : 200 : 1"
+ id="perspective8" />
+ </defs>
+ <metadata
+ id="metadata35">
+ <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>
+ <sodipodi:namedview
+ inkscape:window-height="854"
+ inkscape:window-width="1440"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:zoom="3.5638182"
+ inkscape:cx="60.101374"
+ inkscape:cy="22.158164"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:current-layer="svg559"
+ showgrid="false"
+ inkscape:window-maximized="1" />
+ <text
+ x="0.21655023"
+ y="13.585703"
+ style="font-size:22px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.9659524;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline;font-family:Arial Black"
+ id="text10203"
+ xml:space="preserve"
+ sodipodi:linespacing="125%"
+ transform="scale(1.0082228,0.99184427)"><tspan
+ x="0.21655023"
+ y="13.585703"
+ id="tspan10205"
+ style="font-size:22px;text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke-width:0.9659524">message</tspan></text>
+</svg>
|