Minor fixups to [story]

This commit is contained in:
Celtic Minstrel 2017-06-03 10:47:00 -04:00
parent 5dce3a3a53
commit e6fce88d21
2 changed files with 3 additions and 2 deletions

View file

@ -928,7 +928,8 @@ function wesnoth.wml_actions.zoom(cfg)
end
function wesnoth.wml_actions.story(cfg)
wesnoth.show_story(cfg, cfg.title)
local title = cfg.title or helper.wml_error "Missing title key in [story] ActionWML"
wesnoth.show_story(cfg, title)
end
function wesnoth.wml_conditionals.proceed_to_next_scenario(cfg)

View file

@ -397,7 +397,7 @@ int show_popup_dialog(lua_State *L, CVideo & video) {
*/
int show_story(lua_State* L, CVideo& video) {
config story = luaW_checkconfig(L, 1);
std::string title = luaL_checkstring(L, 2);
t_string title = luaW_checktstring(L, 2);
gui2::dialogs::story_viewer::display(title, story, video);
return 0;
}