[wesnoth-commits] [wesnoth/wesnoth] 1525c7: Apply the deprecation standard to the new GUI2 API

Celtic Minstrel noreply at github.com
Sun Sep 27 19:45:04 UTC 2020


  Branch: refs/heads/lua_reorg
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1525c72dacc79a708a649f59d6cdabd85ff74a69
      https://github.com/wesnoth/wesnoth/commit/1525c72dacc79a708a649f59d6cdabd85ff74a69
  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: 4fa432365ce671c63395c5889dbb7bf237c65794
      https://github.com/wesnoth/wesnoth/commit/4fa432365ce671c63395c5889dbb7bf237c65794
  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: 81c41cd59fd7acb2c462b28160db5e3fe70f3ffb
      https://github.com/wesnoth/wesnoth/commit/81c41cd59fd7acb2c462b28160db5e3fe70f3ffb
  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: ebd099e7e9536e4a75a1f63078e5f70e0ba23cd7
      https://github.com/wesnoth/wesnoth/commit/ebd099e7e9536e4a75a1f63078e5f70e0ba23cd7
  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/54371ba142f5...ebd099e7e953



More information about the Commits mailing list