Author: caslav_ilic
Date: Sun Nov 22 21:50:57 2009
New Revision: 39888
URL: http://svn.gna.org/viewcvs/wesnoth?rev=39888&view=rev
Log:
Logo coordinates on title screen are now relative to center of the logo. This
way localized logos of different widths can be accomodated.
Modified:
trunk/data/game_config.cfg
trunk/src/titlescreen.cpp
Modified: trunk/data/game_config.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/game_config.cfg?rev=39888&r1=39887&r2=39888&view=diff
==============================================================================
--- trunk/data/game_config.cfg (original)
+++ trunk/data/game_config.cfg Sun Nov 22 21:50:57 2009
@@ -37,8 +37,8 @@
buttons_x=760
buttons_y=330
buttons_padding=4
- logo_x=160
- logo_y=40
+ logo_x=270
+ logo_y=90
tip_x=100
tip_width=495
tip_padding=4
@@ -47,8 +47,8 @@
buttons_x=760
buttons_y=210
buttons_padding=20
- logo_x=85
- logo_y=20
+ logo_x=205
+ logo_y=120
tip_x=30
tip_width=620
tip_padding=20
@@ -56,8 +56,8 @@
buttons_x=760
buttons_y=330
buttons_padding=20
- logo_x=292
- logo_y=120
+ logo_x=512
+ logo_y=220
tip_x=100
tip_width=495
tip_padding=20
Modified: trunk/src/titlescreen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=39888&r1=39887&r2=39888&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Sun Nov 22 21:50:57 2009
@@ -67,20 +67,23 @@
* Used only once, after the game is started.
*
* @param screen surface to operate on
- * @param xpos x-position of logo
- * @param ypos y-position of logo
+ * @param xcpos x-position of center of the logo
+ * @param ycpos y-position of center of the logo
*
* @return Result of running the routine
* @retval true operation finished (successful or not)
* @retval false operation failed (because modeChanged), need to retry
*/
-static bool fade_logo(game_display& screen, int xpos, int ypos)
+static bool fade_logo(game_display& screen, int xcpos, int ycpos)
{
const surface logo(image::get_image(game_config::game_logo));
if(logo == NULL) {
ERR_DP << "Could not find game logo\n";
return true;
}
+
+ int xpos = xcpos - logo->w / 2;
+ int ypos = ycpos - logo->h / 2;
surface const fb = screen.video().getSurface();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits