Commit graph

24 commits

Author SHA1 Message Date
Celtic Minstrel
a76aa9bddc
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.
2022-04-10 13:00:29 -04:00
Steve Cotton
264f90eed4 Default [print]duration= to 5 seconds, tutorial uses "unlimited"
In 1.14, the default was 50 frames, or around 1.7 seconds. In 1.15.4, commit
a9d9e48c72 changed the interpretation of that
number to milliseconds, but missed that this affected the [print] tag; this
left the default time that the text is shown as an unreadable 50ms.

All places in mainline that use [print] specify a duration, so the default
isn't used. Here I've plucked the new value from UtBS S09, where it was chosen
in f405b916a1.

The special value "unlimited" is now recognised as meaning to display the text
until it's removed by another [print] tag. The tutorial uses this special case
to display the text until the player does the requested move - originally it
displayed the text for 10000 frames (around 40 minutes), which still seemed
reasonable when it changed to 10000ms.
2021-06-19 07:08:17 +02:00
Charles Dang
73b72d2c56 Tutorial: added another newline before the "Press to continue" prompt 2021-01-06 05:31:15 +11:00
Earth-Cake
1eca8258b1 Tutorial - minor improvements (#4682)
* Change victory objectives - S1

* S2 - Minor improvements

* Add a macro and add [cancel_action] tag

* Fix dialogue

* Revert objectives
2020-01-11 16:18:37 +01:00
Earth-Cake
04973896ca
Remove unneeded [else] tag 2019-12-14 11:03:11 +01:00
Earth-Cake
df2e717b24
Make UNDO_REMINDER fire only once 2019-12-14 00:06:44 +01:00
Severin Glöckner
aa0f5d298e Tutorial S1: followup previous commits
- Removed need for quick trait by spawning quantain next to Delfador
- Disabled movement point tracking due to #3344
- Use only one [label] tag to place both labels
- Removed id's of later quintains, as they are not used
- added some whitespaces

[ci skip]

(cherry-picked from commit 74b39ef3d6)
2018-10-07 03:23:34 +00:00
Severin Glöckner
616f3b5d66 Take care about the player being unable to do anything if he
- attacks in round 2
 - attacks in round 3 before recruiting
 - attacks in round 4 with himself instead of the fighters and kills the quintain

[ci skip]
2017-05-04 15:57:27 +11:00
Celtic Minstrel
dcdac2fe7f Tutorial S2: Highlight talked-about locations
This also tweaks some locations, in particular fixing a case of scrolling to the wrong village
2016-03-20 02:55:16 -04:00
Charles Dang
a63bd2fed2 T: expand the final few cases of NARRATOR for style consistency and remove it 2015-01-19 07:04:51 +11:00
Charles Dang
dcaa00cc36 T: small tweak to the S2 undo reminder 2015-01-18 21:11:27 +11:00
Charles Dang
f57c4cfd61 T: removed now-unused LABEL and UNLABEL 2015-01-15 21:36:24 +11:00
Charles Dang
e83e1df6c3 T: move a comment out of a macro 2015-01-15 21:35:53 +11:00
Charles Dang
fe29dee1a9 T S2: refactor/rewrite part 5 2015-01-15 21:34:50 +11:00
Charles Dang
1a7bcfabe2 T: drop CHECK_INCOME, it has been event-ized 2015-01-15 14:36:25 +11:00
Charles Dang
f84843ab4e T: drop trait explaining macros
If any trait explaining will happen it will be done differently in S1
2015-01-15 14:31:36 +11:00
gfgtdf
b67c5fdeec don't calculate max_experience manually 2015-01-15 00:50:08 +01:00
Charles Dang
886a7f005c T S2: revamp/rewrite part 3 2015-01-15 08:30:06 +11:00
Charles Dang
e10dfeb92c T: eliminate the 'gender' variable by using the SUF gender= key 2015-01-03 21:34:36 +11:00
Charles Dang
977e7eb6f5 T S1: better explanation for the village heal in turn 3. Also dropped a newline from utils 2014-12-30 21:42:54 +11:00
Charles Dang
421dad3eba T: moved CONTINUE_MSG to utils 2014-12-30 21:23:28 +11:00
Charles Dang
1fab61360d T: moved a wmllint spelling exception to the correct file 2014-12-30 03:49:08 +11:00
Charles Dang
beaf189a6a T: replaced ALL cases of MOVE with MOVE_UNIT and deleted the former 2014-12-30 00:24:55 +11:00
Charles Dang
02a79264bd Include utils only once, from main 2014-12-30 00:07:47 +11:00