[wesnoth-commits] [wesnoth/wesnoth] 251e6c: Apply the deprecation standard to the new GUI2 API

Celtic Minstrel noreply at github.com
Sun Sep 27 20:44:41 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 251e6c3f7a66eabbe68d2c1b99e772f4fd73ea55
      https://github.com/wesnoth/wesnoth/commit/251e6c3f7a66eabbe68d2c1b99e772f4fd73ea55
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2020-09-27 (Sun, 27 Sep 2020)

  Changed paths:
    M data/core/_main.cfg
    R data/lua/backwards-compatibility.lua
    M data/lua/core.lua
    M src/scripting/lua_gui2.cpp
    M src/scripting/lua_kernel_base.cpp

  Log Message:
  -----------
  Apply the deprecation standard to the new GUI2 API

This also removes backwards-compatibility.lua altogether.
It's no longer correct in the general case to add backwards compatibility code to this file, so removing it entirely avoids situations where compatibility code is incorrectly added there.

In the C++, this removes the commented-out old GUI2 API entries, and
adds show_dialog to the gui module directly instead of moving it in core.lua


  Commit: f57217f6c4ccdfe3be2852ad47191e4641221d00
      https://github.com/wesnoth/wesnoth/commit/f57217f6c4ccdfe3be2852ad47191e4641221d00
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2020-09-27 (Sun, 27 Sep 2020)

  Changed paths:
    M data/campaigns/Secrets_of_the_Ancients/utils/zombie_recruit_dialog.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/invest/invest_show_dialog.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/invest/invest_tellunit.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/pickup_confirmation_dialog.lua
    M data/campaigns/World_Conquest/lua/game_mechanics/wocopedia/help.lua
    M data/campaigns/World_Conquest/lua/map/settings/settings_dialog.lua
    M data/campaigns/tutorial/lua/character_selection.lua
    M data/scenario-test.cfg

  Log Message:
  -----------
  Convert uses of deprecated GUI2 API

This covers everything:
- SotA zombie dialog (was mostly converted already, just needed module name update)
- The remaining minor World Conquest dialogs that had yet to be converted
- Tutorial character select
- Test scenario sample dialog

This also replaces any uses of "callback" in favour of "on_xxx".


  Commit: b3033ee0bd8d527732e479be24b04bc5780f2512
      https://github.com/wesnoth/wesnoth/commit/b3033ee0bd8d527732e479be24b04bc5780f2512
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2020-09-27 (Sun, 27 Sep 2020)

  Changed paths:
    M data/scenario-test.cfg

  Log Message:
  -----------
  Fix missing image in the test scenario sample dialog


  Commit: bb5929dc69ceaae74ff4b1687ebcfe00d52ccb88
      https://github.com/wesnoth/wesnoth/commit/bb5929dc69ceaae74ff4b1687ebcfe00d52ccb88
  Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
  Date:   2020-09-27 (Sun, 27 Sep 2020)

  Changed paths:
    M data/scenario-test.cfg

  Log Message:
  -----------
  Define the sample dialog in the test scenario in WML instead of in Lua

I thought it would be nice to have at least one piece of example code that does this.

It also serves as a test to ensure that this technique actually works.


Compare: https://github.com/wesnoth/wesnoth/compare/e0103c2cb562...bb5929dc69ce



More information about the Commits mailing list