23416 Commits

Author SHA1 Message Date
Charles Dang
f0dffab55a Tree View Node: rename tree_view_node_icon to tree_view_node_toggle
This better reflect its function
2017-04-12 17:00:03 +11:00
Jyrki Vesterinen
aa762995e2 Add tooltips to add-on manager buttons 2017-04-11 21:32:53 +03:00
Celtic Minstrel
898f9ea0c7 GUI2 Canvas: Add tile_center resize mode 2017-04-11 01:05:51 -04:00
Celtic Minstrel
3d0bd73803 Fix behaviour of [heal_unit]amount= for negative/zero values (#979) 2017-04-10 21:58:46 -04:00
Celtic Minstrel
3f61eda282 Fix [animate_unit]amount=0 healing 1 hp 2017-04-10 21:31:15 -04:00
Charles Dang
e369e10eee Story Viewer: disabled title background for now
It's causing placement issues with some titles...
2017-04-11 03:37:18 +11:00
Charles Dang
15daebd149 Outro: fixed text being shown for approx 2.5 seconds longer than specified
I was performing a value check on fade_step in the timer, and then multiplying it fivefold in the alpha
calculation, meaning full alpha was reached long before the fade in sequence stopped and the duration timer
was initialized.
2017-04-11 03:19:17 +11:00
Charles Dang
61aa601a6f GUI2/Canvas: converted other shapes to use formulas for their color handling
For rectangles, color_t::null_color() needs to be specified as the default since typed_formula
utilizes the default type ctor if no default value is provided. In this case, color_t's default
ctor returns opaque white, which doesn't mesh well with GUI2's drawing.

Other shapes don't get this default value, since color is essentially mandatory for them, whereas
in rectangles either fill_color or border_color may be omitted.
2017-04-10 00:02:49 +11:00
Charles Dang
8ed11e7506 GUI2/Canvas: removed [line] alpha= key in favor of evaluating color as a formula 2017-04-09 22:04:11 +11:00
Charles Dang
53adf0ba1a Story Viewer: enforce at least 200 height for the story box
[ci skip]
2017-04-09 21:57:34 +11:00
Charles Dang
dec0fd6dfd Convert outro screen to GUI2
It's the screen that shows 'The End' at the end of an SP campaign.
2017-04-09 21:37:16 +11:00
Charles Dang
10f867bd7e GUI2/Canvas: evaluate text color as formula 2017-04-09 21:37:15 +11:00
Celtic Minstrel
7835e05d93 Fix [animate_unit][facing] not working.
This also tweaks the animator:add() API, replacing the facing key
with a target key and requiring it to be an adjacent location.
2017-04-09 01:29:10 -04:00
Jeffrey 'Sigurd' Westcoat
ec2d734acd WML: Add base_income key to [store_side] (#976) 2017-04-08 19:05:49 -04:00
Celtic Minstrel
753df47137 Story viewer: Use a slightly fuzzy rounded rectangle as the title background 2017-04-08 19:00:36 -04:00
Celtic Minstrel
2dbdc7ec66 GUI2 Canvas: Enable drawing filled circles 2017-04-08 18:04:07 -04:00
Celtic Minstrel
76dcfcb32f GUI2 Canvas: Implement rounded rectangle shape
Currently it's outline only.
2017-04-08 08:30:00 -04:00
Celtic Minstrel
9b2eac1920 Simplify storyscreen title definition 2017-04-08 07:22:37 -04:00
Celtic Minstrel
e46b10af0e Story viewer: Shrink translucent background behind title to a box 2017-04-08 03:37:41 -04:00
Celtic Minstrel
88420357b0 Story Viewer: add translucent background behind title 2017-04-08 17:56:51 +11:00
Celtic Minstrel
348d2e1bb2 Some cleanup of GUI2 formulas
This is mainly about shifting WML macro inclusions into a where clause,
especially when they appear multiple times in a specific formula.
2017-04-08 00:58:39 -04:00
Charles Dang
3a3e6fe725 Fixup 03c7b3d
* Cleaner variable set method
* Fix variable name
2017-04-08 15:19:05 +11:00
Charles Dang
03c7b3debd Story Viewer: hide title if there's no title to show, and display text panel borders appropriately
NOTE: not sure what the FIXME seems not to be an issue now. Perhaps due to the grid relayout happening as a result of
`set_vertical_alignment`.
2017-04-08 15:06:10 +11:00
Charles Dang
5fbd4a727b Story Viewer: deployed new alignment set API
The set_origin method worked, but not in every circumstance. For example, if the story box were not aligned to the bottom of the
screen in the initial part, it would not be correctly place. If you resized the screen while the box was not at the bottom, it
would return there. This was due to set_origin being purely temporary - ie, the layout engine did not record the new position,
and when invalidate_layout was called, the default (per the dialog WML) position of 'bottom' was restored.

This new method fixes the above issues. It also fixes an issue the old GUI2 screen had where a top-aligned box would also obscure
any available title.
2017-04-08 14:39:50 +11:00
gfgtdf
8c4e09e940 allow to to use a custom rng in helper.rand 2017-04-07 15:05:56 +02:00
Charles Dang
3b24361f1a Story Viewer: added proper nav button definitions 2017-04-07 12:19:40 +11:00
Charles Dang
0a2ba65046 GUI2: simplify GUI_WINDOW_FIXED_SIZE_CENTERED x,y calc 2017-04-07 12:13:21 +11:00
Charles Dang
a0ff2a5e96 GUI2: made GUI_CENTERED_IMAGE more robust and deployed it for buttons instead of a custom macro 2017-04-07 12:11:09 +11:00
Charles Dang
a5b795c57a Story Viewer: implemented correct display of panel borders based on story text position 2017-04-07 11:29:47 +11:00
Charles Dang
c8ac77da42 GUI2/Canvas: implement WFL action context
Right now this is only for the image shape, but it can be expanded later.
2017-04-06 09:04:21 +11:00
Jeffrey 'Sigurd' Westcoat
14239c6911 AOI: Remove unnecessary trait (#969)
Leaders don't need loyal.
2017-04-01 00:39:49 -04:00
sigurdfdragon
dde1854ba0 MP: Use title case for all use_map_settings options 2017-04-01 15:37:43 +11:00
ln-zookeeper
cc6239061f UtBS: Fixed infinite loop in the support ability code (bug #25626)
This happened due to the combination of the loop using [continue] and thus assuming FOREACH is implemented with [for], and FOREACH being reverted back to not using [for] in 8bbe4189.
2017-03-29 18:07:45 +03:00
Charles Dang
396b33c8a9 Story Viewer: much progress
Most functionality is implemented now, except (most notably) floating images.
2017-03-28 01:07:52 +11:00
Charles Dang
6bb7bd1017 Use standard color macros for button code
Since we can now specify alpha in the standard ones, there's no need for the duplicates.
2017-03-28 01:07:51 +11:00
Charles Dang
18e29731e6 Add optional WIDTH and HEIGHT arguments to GUI_FILLER 2017-03-28 01:07:50 +11:00
Charles Dang
15b3317b36 Add optional ALPHA macro args to all color macros 2017-03-28 01:07:48 +11:00
Celtic Minstrel
0c4b05ee2a Some fixes to [heal_unit]animate=yes
- Play the healed animation
- Pass the heal amount to both animations
2017-03-27 01:07:33 -04:00
ln-zookeeper
f5a1e44fb2 Fixed a few broken TC pixels in Cavalryman line sprites 2017-03-26 21:24:53 +03:00
Charles Dang
b0a51e5676 Story Viewer: more progress
* Story box can grow to accommodate more text
* Story panel can be hidden if no text is available
* Background images now respect scaling settings
2017-03-26 22:28:18 +11:00
Celtic Minstrel
701649a75e Fix [heal_unit] attempting to animate even if filter didn't match a unit 2017-03-26 00:15:38 -04:00
Severin Glöckner
9ff0137ca1 HttT S19c:
The condition for this event wasn't working as intended before.
And since the injuried sergant is only used once and not as regular unit, he's now hidden in the help.

[ci skip]
2017-03-25 22:56:39 +02:00
Severin Glöckner
d1b9dde798 changed morningstar to morning star
[ci skip]
2017-03-25 22:03:00 +02:00
Celtic Minstrel
5397c1eabc fix wmlparser2 and wmlparser2
fixup for 3d63f66dbb9e7cffec5376e044fc14b635d661c2

After this commit, all the wmlparser tests pass (including the new one) and the issue stated in #907 has also been verified to be fixed.
2017-03-24 13:58:20 -04:00
Allefant
9f3ed8df4c [wmlunits] apply zookeeper's suggested eras.cfg fix 2017-03-24 13:13:59 -04:00
Charles Dang
3648db32cf Updated GUI2 schema for 1a231c7 2017-03-24 20:28:33 +11:00
Charles Dang
aba06146be Story Viewer: progress on key nav and background image rendering 2017-03-24 17:48:40 +11:00
Charles Dang
1cf90d02d6 Initial implementation of GUI2 story viewer 2017-03-24 11:42:13 +11:00
Celtic Minstrel
f45d795134 fixup 0f01f97b (GNA25615) 2017-03-23 17:00:51 -04:00
gfgtdf
cbd3c2644c add lua end_music setter/getter
this also refactors some play_controller members and moves them
to game_data

this also adds a scenario_id getter in lua.
2017-03-23 18:08:16 +01:00