[Commits] [wesnoth/wesnoth] a5cb8f: GUI2/Settings: minor formatting cleanup
GitHub
noreply at github.com
Sun Aug 20 18:31:52 UTC 2017
Branch: refs/heads/some_gui2_refactoring
Home: https://github.com/wesnoth/wesnoth
Commit: a5cb8f1340b833c2727eec5bd19bacee6c9e8212
https://github.com/wesnoth/wesnoth/commit/a5cb8f1340b833c2727eec5bd19bacee6c9e8212
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/widgets/settings.cpp
Log Message:
-----------
GUI2/Settings: minor formatting cleanup
Commit: 4e81236ca05c9d7341d7e85e02a3e9586ba226e6
https://github.com/wesnoth/wesnoth/commit/4e81236ca05c9d7341d7e85e02a3e9586ba226e6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/window_builder.cpp
M src/gui/core/window_builder.hpp
Log Message:
-----------
GUI2/Window Builder: added function to generate a single widget instance with its builder
This will be used in some upcoming changes. The main benefit of this over directly initializing a new widget
object is any extra builder steps can also be executed.
I'm not entirely happy with the design, though, especially with having to specify both the type and type ID...
Commit: ea15d450fd9002f1c28924a037b8290b4f7dfc62
https://github.com/wesnoth/wesnoth/commit/ea15d450fd9002f1c28924a037b8290b4f7dfc62
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/dialogs/drop_down_menu.cpp
M src/gui/dialogs/preferences_dialog.cpp
M src/gui/widgets/addon_list.cpp
M src/gui/widgets/addon_list.hpp
M src/gui/widgets/button.cpp
M src/gui/widgets/button.hpp
M src/gui/widgets/chatbox.cpp
M src/gui/widgets/chatbox.hpp
M src/gui/widgets/container_base.cpp
M src/gui/widgets/container_base.hpp
M src/gui/widgets/drawing.cpp
M src/gui/widgets/drawing.hpp
M src/gui/widgets/horizontal_scrollbar.cpp
M src/gui/widgets/horizontal_scrollbar.hpp
M src/gui/widgets/image.cpp
M src/gui/widgets/image.hpp
M src/gui/widgets/label.cpp
M src/gui/widgets/label.hpp
M src/gui/widgets/listbox.cpp
M src/gui/widgets/listbox.hpp
M src/gui/widgets/menu_button.cpp
M src/gui/widgets/menu_button.hpp
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multi_page.cpp
M src/gui/widgets/multi_page.hpp
M src/gui/widgets/multimenu_button.cpp
M src/gui/widgets/multimenu_button.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/panel.hpp
M src/gui/widgets/password_box.cpp
M src/gui/widgets/password_box.hpp
M src/gui/widgets/progress_bar.cpp
M src/gui/widgets/progress_bar.hpp
M src/gui/widgets/repeating_button.cpp
M src/gui/widgets/repeating_button.hpp
M src/gui/widgets/scroll_label.cpp
M src/gui/widgets/scroll_label.hpp
M src/gui/widgets/scrollbar.cpp
M src/gui/widgets/scrollbar.hpp
M src/gui/widgets/scrollbar_container.cpp
M src/gui/widgets/scrollbar_container.hpp
M src/gui/widgets/scrollbar_panel.cpp
M src/gui/widgets/scrollbar_panel.hpp
M src/gui/widgets/size_lock.cpp
M src/gui/widgets/size_lock.hpp
M src/gui/widgets/slider.cpp
M src/gui/widgets/slider.hpp
M src/gui/widgets/spacer.cpp
M src/gui/widgets/spacer.hpp
M src/gui/widgets/stacked_widget.cpp
M src/gui/widgets/stacked_widget.hpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/styled_widget.hpp
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box.hpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/text_box_base.hpp
M src/gui/widgets/toggle_button.cpp
M src/gui/widgets/toggle_button.hpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/toggle_panel.hpp
M src/gui/widgets/tree_view.cpp
M src/gui/widgets/tree_view.hpp
M src/gui/widgets/unit_preview_pane.cpp
M src/gui/widgets/unit_preview_pane.hpp
M src/gui/widgets/vertical_scrollbar.cpp
M src/gui/widgets/vertical_scrollbar.hpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2: refactored widget initialization process
Essentially, this utilizes the second styled_widget overload that takes a builder reference to allow widgets
to initialize themselves without the extra init_control call. It also removes the need for extra functions such
as styled_widget::load_config_extra or styled_widget::init since the widget definition config and canvases are
loaded in the styled_widget ctor. Any code from the uses of the former function were moved either to widget
builders or their ctors.
Commit: 971de6fb5bf34383391e90c103c2ee49b17d1e0a
https://github.com/wesnoth/wesnoth/commit/971de6fb5bf34383391e90c103c2ee49b17d1e0a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/widgets/scrollbar.hpp
M src/gui/widgets/slider.cpp
Log Message:
-----------
GUI2: prevented Scrollbar (and by extension Slider) step size from being set to 0
This can potentially cause division-by-0 crashes.
Commit: eddea4bc985fe5ae69458f13a0ba45f5c1d9b7e3
https://github.com/wesnoth/wesnoth/commit/eddea4bc985fe5ae69458f13a0ba45f5c1d9b7e3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/window_builder.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2/Window: pass definition pointer to ctor instead of individual arguments
Commit: 39dff1b9d4c156a339b34e8233dfa6ff26fd3409
https://github.com/wesnoth/wesnoth/commit/39dff1b9d4c156a339b34e8233dfa6ff26fd3409
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/register_widget.hpp
M src/gui/core/window_builder.hpp
Log Message:
-----------
GUI2/Window Builder: removed build_widget function and used std::make_shared directly
This function's name was rather misleading. It didn't actually build a widget, just created a an
object (usually a builder, as it was utilized in REGISTER_WIDGET) with the config argument as its
ctor parameters.
Lamdas render the need of a separate function to pass as an std::function argument obsolete.
Commit: 820bcbf76a33e782d7d36aeaf146c4dd17194be6
https://github.com/wesnoth/wesnoth/commit/820bcbf76a33e782d7d36aeaf146c4dd17194be6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/window_builder.hpp
Log Message:
-----------
GUI2/Window Builder: added comment clarifying Window how resolution options are used
Commit: 26df1bebf8d918657e2c0bc0ff7507962f2085e1
https://github.com/wesnoth/wesnoth/commit/26df1bebf8d918657e2c0bc0ff7507962f2085e1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/register_widget.hpp
M src/gui/widgets/addon_list.hpp
M src/gui/widgets/button.cpp
M src/gui/widgets/button.hpp
M src/gui/widgets/chatbox.cpp
M src/gui/widgets/chatbox.hpp
M src/gui/widgets/drawing.cpp
M src/gui/widgets/drawing.hpp
M src/gui/widgets/horizontal_scrollbar.cpp
M src/gui/widgets/horizontal_scrollbar.hpp
M src/gui/widgets/image.cpp
M src/gui/widgets/image.hpp
M src/gui/widgets/label.cpp
M src/gui/widgets/label.hpp
M src/gui/widgets/list.cpp
M src/gui/widgets/list.hpp
M src/gui/widgets/listbox.cpp
M src/gui/widgets/listbox.hpp
M src/gui/widgets/matrix.cpp
M src/gui/widgets/matrix.hpp
M src/gui/widgets/menu_button.cpp
M src/gui/widgets/menu_button.hpp
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multi_page.cpp
M src/gui/widgets/multi_page.hpp
M src/gui/widgets/multimenu_button.cpp
M src/gui/widgets/multimenu_button.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/panel.hpp
M src/gui/widgets/progress_bar.cpp
M src/gui/widgets/progress_bar.hpp
M src/gui/widgets/repeating_button.cpp
M src/gui/widgets/repeating_button.hpp
M src/gui/widgets/scroll_label.cpp
M src/gui/widgets/scroll_label.hpp
M src/gui/widgets/scrollbar_panel.cpp
M src/gui/widgets/scrollbar_panel.hpp
M src/gui/widgets/size_lock.hpp
M src/gui/widgets/slider.cpp
M src/gui/widgets/slider.hpp
M src/gui/widgets/spacer.cpp
M src/gui/widgets/spacer.hpp
M src/gui/widgets/stacked_widget.cpp
M src/gui/widgets/stacked_widget.hpp
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box.hpp
M src/gui/widgets/toggle_button.cpp
M src/gui/widgets/toggle_button.hpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/toggle_panel.hpp
M src/gui/widgets/tree_view.cpp
M src/gui/widgets/tree_view.hpp
M src/gui/widgets/unit_preview_pane.cpp
M src/gui/widgets/unit_preview_pane.hpp
M src/gui/widgets/vertical_scrollbar.cpp
M src/gui/widgets/vertical_scrollbar.hpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2: allow REGISTER_WIDGET to implement get_control_type overrides
This is similar to what REGISER_WINDOW does with window_id().
Excludes the following class instances since they are not registered with REGISTER_WIDGET:
* tree_view_node
* scrollbar_container
* password_box (uses REGISTER_WIDGET3)
Commit: 9e49316639836b41fc5f037b4850d4301bda0ffe
https://github.com/wesnoth/wesnoth/commit/9e49316639836b41fc5f037b4850d4301bda0ffe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-21 (Mon, 21 Aug 2017)
Changed paths:
M src/gui/core/event/distributor.cpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2: don't use `0` to initialize nullptrs
Compare: https://github.com/wesnoth/wesnoth/compare/7d71842b20f0...9e4931663983
More information about the Commits
mailing list