[wesnoth-commits] [wesnoth/wesnoth] a76aa9: Add wesnoth.interface.add_floating_label as a repl...

Celtic Minstrel noreply at github.com
Sun Apr 10 17:00:40 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a76aa9bddc47bbeebb3c558b23fdb37596a0cc36
      https://github.com/wesnoth/wesnoth/commit/a76aa9bddc47bbeebb3c558b23fdb37596a0cc36
  Author: Celtic Minstrel <CelticMinstrel at users.noreply.github.com>
  Date:   2022-04-10 (Sun, 10 Apr 2022)

  Changed paths:
    M data/campaigns/Under_the_Burning_Suns/scenarios/09_Blood_is_Thicker_Than_Water.cfg
    M data/campaigns/tutorial/utils/utils.cfg
    M data/lua/core/interface.lua
    M data/lua/wml-tags.lua
    M data/schema/core/actionwml.cfg
    A data/test/scenarios/overlay_text_demo.cfg
    M src/floating_label.cpp
    M src/floating_label.hpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp
    M utils/emmylua/wesnoth/interface.lua

  Log Message:
  -----------
  Add wesnoth.interface.add_floating_label as a replacement for wesnoth.print (#5837)

This returns a label handle which allows you to remove, reposition, or replace the label later.

In addition to all the features of wesnoth.print, you can now specify where the label appears onscreen, as well as a fadeout time separate from the duration.

You can also anchor the text to an edge or corner instead of centering in on the screen,
specify the maximum width it can occupy as an absolute width or a percentage,
and specify a background colour and transparency.

It includes a demo scenario that demonstrates many of the capabilities of the API.
To play the demo scenario, run with -toverlay_text_demo or select it from the in-game test list.





More information about the Commits mailing list