← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/zoom_ui into lp:widelands

 

2 minor nits.

We should also update the documentation in data/tribes/scripting/help/controls at once.

Do we also want to explain this feature in the tutorial? If so, we should do this right now, so we won't have things stacking up / forgotten.


Diff comments:

> === modified file 'src/editor/editorinteractive.cc'
> --- src/editor/editorinteractive.cc	2016-10-22 18:19:22 +0000
> +++ src/editor/editorinteractive.cc	2016-10-24 21:25:40 +0000
> @@ -118,6 +118,9 @@
>       toggle_buildhelp_(INIT_BUTTON("images/wui/menus/menu_toggle_buildhelp.png",
>                                     "buildhelp",
>                                     _("Show Building Spaces (on/off)"))),
> +     reset_zoom_(INIT_BUTTON("images/wui/menus/menu_reset_zoom.png",
> +                                   "reset_zoom",
> +                                   _("Reset zoom to 1"))),

_("Reset zoom")

Players will be wondering what 1 means ;)

>       toggle_player_menu_(
>          INIT_BUTTON("images/wui/editor/editor_menu_player_menu.png", "players", _("Players"))),
>       undo_(INIT_BUTTON("images/wui/editor/editor_undo.png", "undo", _("Undo"))),
> 
> === modified file 'src/wui/interactive_gamebase.cc'
> --- src/wui/interactive_gamebase.cc	2016-10-24 14:04:00 +0000
> +++ src/wui/interactive_gamebase.cc	2016-10-24 21:25:40 +0000
> @@ -62,8 +62,11 @@
>  	TOOLBAR_BUTTON_COMMON_PARAMETERS(name), g_gr->images().get("images/" picture ".png"), tooltip
>  
>       toggle_buildhelp_(INIT_BTN(
> -        "wui/menus/menu_toggle_buildhelp", "buildhelp", _("Show Building Spaces (on/off)"))) {
> +        "wui/menus/menu_toggle_buildhelp", "buildhelp", _("Show Building Spaces (on/off)"))),
> +     reset_zoom_(INIT_BTN("wui/menus/menu_reset_zoom", "reset_zoom", _("Reset zoom to 1"))) {

_("Reset zoom")

>  	toggle_buildhelp_.sigclicked.connect(boost::bind(&InteractiveGameBase::toggle_buildhelp, this));
> +	reset_zoom_.sigclicked.connect(
> +	   [this] { zoom_around(1.f, Vector2f(get_w() / 2.f, get_h() / 2.f)); });
>  }
>  
>  /// \return a pointer to the running \ref Game instance.


-- 
https://code.launchpad.net/~widelands-dev/widelands/zoom_ui/+merge/309177
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/zoom_ui into lp:widelands.


References