Merge lp:~widelands-dev/widelands/bug-1818013-new-logo into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 9113
Proposed branch: lp:~widelands-dev/widelands/bug-1818013-new-logo
Merge into: lp:widelands
Diff against target: 98 lines (+18/-6)
4 files modified
src/ui_basic/icon.cc (+6/-0)
src/ui_basic/icon.h (+4/-0)
src/ui_fsmenu/main.cc (+6/-6)
src/ui_fsmenu/main.h (+2/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1818013-new-logo
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+366502@code.launchpad.net

Commit message

New Widelands logo by Nytren. Add it as an icon rather than an overlay for more fine-grained positioning.

To post a comment you must log in.
Revision history for this message
Benedikt Straub (nordfriese) wrote :

Do the splash screen and the editor loading screen also get the new font and style?

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4799. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/524373614.
Appveyor build 4580. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1818013_new_logo-4580.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Impossible for them at the moment without replacing the images as well, because the "Widelands" text is baked into the images, and we have no layered versions.

Revision history for this message
Toni Förster (stonerl) wrote :

Shouldn't we consider replacing the pictures entirely? They are only available in 800x600.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I'd certainly be in favor of that.

8998. By GunChleoc

Merged trunk.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 5008. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/533694061.
Appveyor build 4789. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1818013_new_logo-4789.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Any objections to merging this?

Revision history for this message
kaputtnik (franku) wrote :

From my side: no.

Not tested though.

Revision history for this message
GunChleoc (gunchleoc) wrote :

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/images/ui_fsmenu/main_title.png'
2Binary files data/images/ui_fsmenu/main_title.png 2019-03-30 06:46:25 +0000 and data/images/ui_fsmenu/main_title.png 2019-05-17 07:59:12 +0000 differ
3=== modified file 'src/ui_basic/icon.cc'
4--- src/ui_basic/icon.cc 2019-02-23 11:00:49 +0000
5+++ src/ui_basic/icon.cc 2019-05-17 07:59:12 +0000
6@@ -35,6 +35,12 @@
7 set_thinks(false);
8 }
9
10+
11+Icon::Icon(Panel* const parent,
12+ const Image* picture_id)
13+ : Icon(parent, 0, 0, picture_id->width(), picture_id->height(), picture_id) {
14+}
15+
16 void Icon::set_icon(const Image* picture_id) {
17 pic_ = picture_id;
18 }
19
20=== modified file 'src/ui_basic/icon.h'
21--- src/ui_basic/icon.h 2019-02-23 11:00:49 +0000
22+++ src/ui_basic/icon.h 2019-05-17 07:59:12 +0000
23@@ -30,7 +30,11 @@
24 * bigger than the icon, the image will be scaled to fit.
25 */
26 struct Icon : public Panel {
27+ /// Create a new icon with the given dimensions and position offset
28 Icon(Panel* parent, int32_t x, int32_t y, int32_t w, int32_t h, const Image* picture_id);
29+ /// Create a new icon with no offset. Dimentions are taken from 'picture_id'.
30+ Icon(Panel* parent, const Image* picture_id);
31+
32
33 void set_icon(const Image* picture_id);
34 const Image* icon() const {
35
36=== modified file 'src/ui_fsmenu/main.cc'
37--- src/ui_fsmenu/main.cc 2019-04-11 05:45:55 +0000
38+++ src/ui_fsmenu/main.cc 2019-05-17 07:59:12 +0000
39@@ -27,6 +27,8 @@
40 FullscreenMenuMain::FullscreenMenuMain()
41 : FullscreenMenuMainMenu(),
42
43+ logo_icon_(this, g_gr->images().get("images/ui_fsmenu/main_title.png")),
44+
45 // Buttons
46 playtutorial(&vbox_,
47 "play_tutorial",
48@@ -107,9 +109,6 @@
49 vbox_.add_inf_space();
50 vbox_.add(&exit, UI::Box::Resizing::kFullSize);
51
52- add_overlay_image("images/ui_fsmenu/main_title.png",
53- FullscreenWindow::Alignment(UI::Align::kCenter, UI::Align::kTop));
54-
55 layout();
56 }
57
58@@ -119,6 +118,9 @@
59
60 void FullscreenMenuMain::layout() {
61 FullscreenMenuMainMenu::layout();
62+
63+ logo_icon_.set_pos(Vector2i((get_w() - logo_icon_.get_w()) / 2, title_y_ + logo_icon_.get_h() / 4));
64+
65 const int text_height = 0.5 * version.get_h() + padding_;
66 version.set_pos(Vector2i(get_w() - version.get_w(), get_h() - text_height));
67 copyright.set_pos(Vector2i(0, get_h() - 2 * text_height));
68@@ -133,9 +135,7 @@
69 about.set_desired_size(butw_, buth_);
70 exit.set_desired_size(butw_, buth_);
71
72- // This box needs to be positioned a bit higher than in the other menus, because we have a lot of
73- // buttons
74- vbox_.set_pos(Vector2i(box_x_, box_y_ - buth_));
75+ vbox_.set_pos(Vector2i(box_x_, box_y_));
76 vbox_.set_inner_spacing(padding_);
77 vbox_.set_size(butw_, get_h() - vbox_.get_y() - 5 * padding_);
78 }
79
80=== modified file 'src/ui_fsmenu/main.h'
81--- src/ui_fsmenu/main.h 2019-02-23 11:00:49 +0000
82+++ src/ui_fsmenu/main.h 2019-05-17 07:59:12 +0000
83@@ -21,6 +21,7 @@
84 #define WL_UI_FSMENU_MAIN_H
85
86 #include "ui_basic/button.h"
87+#include "ui_basic/icon.h"
88 #include "ui_basic/textarea.h"
89 #include "ui_fsmenu/main_menu.h"
90
91@@ -38,6 +39,7 @@
92 private:
93 void layout() override;
94
95+ UI::Icon logo_icon_;
96 UI::Button playtutorial;
97 UI::Button singleplayer;
98 UI::Button multiplayer;

Subscribers

People subscribed via source and target branches

to status/vote changes: