Now color_adjust takes three arguments instead of a config
Consider it part of the public API now.
This commit is contained in:
parent
ea5367de17
commit
c88e60b98e
3 changed files with 4 additions and 6 deletions
|
@ -52,8 +52,8 @@ if wesnoth.kernel_type() == "Game Lua Kernel" then
|
|||
wesnoth.get_displayed_unit = wesnoth.deprecate_api('wesnoth.get_displayed_unit', 'wesnoth.interface.get_displayed_unit', 1, nil, wesnoth.interface.get_displayed_unit)
|
||||
wesnoth.zoom = wesnoth.deprecate_api('wesnoth.zoom', 'wesnoth.interface.zoom', 1, nil, wesnoth.interface.zoom)
|
||||
wesnoth.gamestate_inspector = wesnoth.deprecate_api('wesnoth.gamestate_inspector', 'gui.show_inspector', 1, nil, gui.show_inspector)
|
||||
wesnoth.color_adjust = wesnoth.deprecate_api('wesnoth.color_adjust', 'wesnoth.interface.color_adjust', 1, nil, wesnoth.interface.color_adjust)
|
||||
-- No deprecation for these since since they're not actually public API yet
|
||||
wesnoth.color_adjust = wesnoth.interface.color_adjust
|
||||
wesnoth.set_menu_item = wesnoth.interface.set_menu_item
|
||||
wesnoth.clear_menu_item = wesnoth.interface.clear_menu_item
|
||||
end
|
||||
end
|
|
@ -716,7 +716,7 @@ function wml_actions.scroll(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.color_adjust(cfg)
|
||||
wesnoth.interface.color_adjust(cfg)
|
||||
wesnoth.interface.color_adjust(cfg.red, cfg.green, cfg.blue)
|
||||
end
|
||||
|
||||
function wml_actions.end_turn(cfg)
|
||||
|
|
|
@ -3225,9 +3225,7 @@ int game_lua_kernel::intf_remove_event(lua_State *L)
|
|||
int game_lua_kernel::intf_color_adjust(lua_State *L)
|
||||
{
|
||||
if (game_display_) {
|
||||
vconfig cfg(luaW_checkvconfig(L, 1));
|
||||
|
||||
game_display_->adjust_color_overlay(cfg["red"], cfg["green"], cfg["blue"]);
|
||||
game_display_->adjust_color_overlay(luaL_checkinteger(L, 1), luaL_checkinteger(L, 2), luaL_checkinteger(L, 3));
|
||||
game_display_->invalidate_all();
|
||||
game_display_->draw(true,true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue