[wesnoth-commits] [wesnoth/wesnoth] ac53f9: gui2/campaign_selection: Major dialog overhaul

Iris Morelle noreply at github.com
Sat Dec 19 06:48:08 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: ac53f93004748bfc0ae693b31946462f13708866
      https://github.com/wesnoth/wesnoth/commit/ac53f93004748bfc0ae693b31946462f13708866
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    A data/gui/widget/panel_campaign_menu.cfg
    A data/gui/widget/panel_listbox_bg.cfg
    M data/gui/widget/toggle_button_listbox_header.cfg
    A data/gui/widget/toggle_button_listbox_header_bg.cfg
    M data/gui/window/campaign_dialog.cfg
    M src/game_initialization/singleplayer.cpp
    M src/gui/dialogs/campaign_selection.cpp
    M src/gui/dialogs/campaign_selection.hpp

  Log Message:
  -----------
  gui2/campaign_selection: Major dialog overhaul

CC: issue #4543

(N.B. This is a monolithic mega-commit because of a bunch of
experimental phase changes that necessitated constant changes to both
engine code and UI WML.)

This redesigns the campaign selection dialog implementing a
campaign-defined background image that changes depending on the selected
campaign, specified by the [campaign] background= attribute; adding a
menu button for selecting the RNG mechanism in use (default RNG vs.
predictable RNG a.k.a. "save random seed"); and finally, adding a menu
button for selecting the campaign difficulty without having to go
through the campaign difficulty selection dialog.

A huge amount of changes to the UI WML were required for this to say the
least.

This also adds the following new widget definitions:

 * toggle_button: listbox_header_centered, listbox_header_bg,
   listbox_header_centered_bg
 * panel: panel_listbox_bg, campaign_menu_bg

As a side effect, two private methods in
gui2::dialogs::campaign_selection() are no longer const-qualified. No
idea why they were const-qualified in the first place, but it
interferred with some of the new code in a major way.


  Commit: 4b5eabdfb016ce3b35488eaebd5db053692ce525
      https://github.com/wesnoth/wesnoth/commit/4b5eabdfb016ce3b35488eaebd5db053692ce525
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M data/advanced_preferences.cfg
    M data/gui/window/campaign_dialog.cfg
    M src/actions/attack.cpp
    M src/game_initialization/singleplayer.cpp
    M src/gui/dialogs/campaign_selection.cpp
    M src/gui/dialogs/campaign_selection.hpp
    M src/synced_context.cpp

  Log Message:
  -----------
  engine: Control experimental PRNG option via game classification

This removes the use_prng Advanced Preferences option and replaces it
with a new possible value for randomness in the game classification
class, "biased". It also changes the enumeration label for it in the
GUI2 campaign dialog.

It also makes it so the synced RNG is automatically used with this
option as well as the existing deterministic randomness option ("save
random seed").


  Commit: c8d824be9520d750b6fb572bf19d872abb50e9fa
      https://github.com/wesnoth/wesnoth/commit/c8d824be9520d750b6fb572bf19d872abb50e9fa
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M src/actions/attack.cpp

  Log Message:
  -----------
  engine: Don't log to stderr directly


  Commit: 3bfb9e34c5b81891bbef12ffdb117351fd441aca
      https://github.com/wesnoth/wesnoth/commit/3bfb9e34c5b81891bbef12ffdb117351fd441aca
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M src/actions/attack.cpp

  Log Message:
  -----------
  engine: Add missing member initializers


  Commit: 8a4515e9d236b03bfd54efe570652cf1c0f99694
      https://github.com/wesnoth/wesnoth/commit/8a4515e9d236b03bfd54efe570652cf1c0f99694
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M src/gui/dialogs/campaign_selection.cpp

  Log Message:
  -----------
  gui2/campaign_selection: Add difficulty-specific laurels

This brings back laurels for the difficulty menu. Because I really don't
want to break into menu_button's implementations details just yet, this
is a bit of a hack using the BLIT IPF instead of stacked_widget.

To make up for it, this version uses the three different difficulty
laurels depending on the difficulty being displayed, instead of always
using the standard laurel.


  Commit: 19004a6950cf3a491daf38018394ce52f8496ab3
      https://github.com/wesnoth/wesnoth/commit/19004a6950cf3a491daf38018394ce52f8496ab3
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M data/gui/widget/panel_campaign_menu.cfg

  Log Message:
  -----------
  gui2/panel: Avoid using images and just draw rectangles

The opacity used here for the fill colour is identical to the one used
in the image file.


  Commit: 10d578bb7b14a087b56eef76e9292a0119a144ef
      https://github.com/wesnoth/wesnoth/commit/10d578bb7b14a087b56eef76e9292a0119a144ef
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M data/gui/window/campaign_dialog.cfg

  Log Message:
  -----------
  gui2/campaign_selection: Use "Timeline" for the timeline sorting header

It's more elegant in context than "dates".


  Commit: 61e832e9afad7a4e5292e9f37c8fb8fd14065819
      https://github.com/wesnoth/wesnoth/commit/61e832e9afad7a4e5292e9f37c8fb8fd14065819
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-19 (Sat, 19 Dec 2020)

  Changed paths:
    M data/gui/window/campaign_dialog.cfg

  Log Message:
  -----------
  gui2/campaign_selection: Layout tweaks for the settings row

This makes the row actually take up its full horizontal space and spaces
out the columns very slightly while still allowing them to be usable at
800x600.

It also replaces the overlong detailed descriptions for the options in
the Combat menu with tooltips holding the same contents.


Compare: https://github.com/wesnoth/wesnoth/compare/7e353095c1e9...61e832e9afad



More information about the Commits mailing list