Lua API reorganization: GUI module deprecations
This commit is contained in:
parent
3ec9ce4b60
commit
3e79b3bde8
2 changed files with 12 additions and 11 deletions
|
@ -556,6 +556,17 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
|||
wesnoth.remove_tile_overlay = wesnoth.deprecate_api('wesnoth.remove_tile_overlay', 'wesnoth.interface.remove_hex_overlay', 1, nil, wesnoth.interface.remove_hex_overlay)
|
||||
wesnoth.theme_items = wesnoth.deprecate_api('wesnoth.theme_items', 'wesnoth.interface.game_display', 1, nil, wesnoth.interface.game_display)
|
||||
wesnoth.get_displayed_unit = wesnoth.deprecate_api('wesnoth.get_displayed_unit', 'wesnoth.interface.get_displayed_unit', 1, nil, wesnoth.interface.get_displayed_unit)
|
||||
wesnoth.gamestate_inspector = wesnoth.deprecate_api('wesnoth.gamestate_inspector', 'gui.show_inspector', 1, nil, gui.show_inspector)
|
||||
end
|
||||
wesnoth.tovconfig = wesnoth.deprecate_api('wesnoth.tovconfig', 'wml.tovconfig', 1, nil, wesnoth.tovconfig)
|
||||
wesnoth.debug = wesnoth.deprecate_api('wesnoth.debug', 'wml.tostring', 1, nil, wesnoth.debug)
|
||||
-- GUI module
|
||||
wesnoth.show_menu = wesnoth.deprecate_api('wesnoth.show_menu', 'gui.show_menu', 1, nil, gui.show_menu)
|
||||
wesnoth.show_message_dialog = wesnoth.deprecate_api('wesnoth.show_message_dialog', 'gui.show_narration', 1, nil, gui.show_narration)
|
||||
wesnoth.show_popup_dialog = wesnoth.deprecate_api('wesnoth.show_popup_dialog', 'gui.show_popup', 1, nil, gui.show_popup)
|
||||
wesnoth.show_story = wesnoth.deprecate_api('wesnoth.show_story', 'gui.show_story', 1, nil, gui.show_story)
|
||||
wesnoth.show_prompt = wesnoth.deprecate_api('wesnoth.show_message_box', 'gui.show_prompt', 1, nil, gui.show_prompt)
|
||||
wesnoth.alert = wesnoth.deprecate_api('wesnoth.alert', 'gui.alert', 1, nil, gui.alert)
|
||||
wesnoth.confirm = wesnoth.deprecate_api('wesnoth.confirm', 'gui.confirm', 1, nil, gui.confirm)
|
||||
wesnoth.show_lua_console = wesnoth.deprecate_api('wesnoth.show_lua_console', 'gui.show_lua_console', 1, nil, gui.show_lua_console)
|
||||
wesnoth.add_widget_definition = wesnoth.deprecate_api('wesnoth.add_widget_definition', 'gui.add_widget_definition', 1, nil, gui.add_widget_definition)
|
||||
|
|
|
@ -88,17 +88,6 @@ function helper.set_wml_tag_metatable(t)
|
|||
return setmetatable(t, proxy_tag_mt)
|
||||
end
|
||||
|
||||
--! Displays a WML message box with attributes from table @attr and options
|
||||
--! from table @options.
|
||||
--! @return the index of the selected option.
|
||||
--! @code
|
||||
--! local result = helper.get_user_choice({ speaker = "narrator" },
|
||||
--! { "Choice 1", "Choice 2" })
|
||||
--! @endcode
|
||||
function helper.get_user_choice(attr, options)
|
||||
return gui.get_user_choice(attr, options)
|
||||
end
|
||||
|
||||
--! Returns an iterator over adjacent locations that can be used in a for-in loop.
|
||||
-- Not deprecated because, unlike wesnoth.map.get_adjacent_tiles,
|
||||
-- this verifies that the locations are on the map.
|
||||
|
@ -268,5 +257,6 @@ helper.shallow_parsed = wesnoth.deprecate_api('helper.shallow_parsed', 'wml.shal
|
|||
helper.set_wml_var_metatable = wesnoth.deprecate_api('helper.set_wml_var_metatable', 'wml.variable.proxy', 2, nil, helper.set_wml_var_metatable)
|
||||
helper.set_wml_tag_metatable = wesnoth.deprecate_api('helper.set_wml_tag_metatable', 'wml.tag', 2, nil, helper.set_wml_tag_metatable)
|
||||
helper.move_unit_fake = wesnoth.deprecate_api('helper.move_unit_fake', 'wesnoth.interface.move_unit_fake', 1, nil, wesnoth.interface.move_unit_fake)
|
||||
helper.get_user_choice = wesnoth.deprecate_api('helper.get_user_choice', 'gui.get_user_choice', 1, nil, gui.get_user_choice)
|
||||
|
||||
return helper
|
||||
|
|
Loading…
Add table
Reference in a new issue