[show_dialog] tag idea (wip)

Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

Post Reply
Smok
Posts: 52
Joined: June 14th, 2016, 11:52 am

[show_dialog] tag idea (wip)

Post by Smok » January 15th, 2018, 11:51 am

This topic is about new WML tag I work on. [show_dialog] tag shows dialogs that use GUI 2, similar to https://wiki.wesnoth.org/LuaWML/Display ... how_dialog. My implementation introduces two new features. First of all choices are synchronized so tag should work fine in multiplayer games. Additionally script takes care of grid generation, so user only need to specify what widgets he want and where. This is showcase of what I achieved so far. I'm open to all comments, feedback, ides. For now I'm struggling with flow subtags like [if], [for].

Tag code:
Spoiler:
Some examples below:
Spoiler:
Spoiler:
Spoiler:
Spoiler:
Spoiler:
What's missing:
-some gui tags/functions
-if statement
-some kind of loop
-operations using both WML variables and widgets values

User avatar
WhiteWolf
Forum Regular
Posts: 370
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: [show_dialog] tag idea (wip)

Post by WhiteWolf » January 16th, 2018, 11:06 pm

This looks really useful, when I find the time, I'll experiment with this :)
Author of the Underness Series, consisting of V parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Standalone works: The Ravagers - now published!

User avatar
Pentarctagon
Forum Administrator
Posts: 3486
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: [show_dialog] tag idea (wip)

Post by Pentarctagon » January 17th, 2018, 1:19 am

This is way beyond anything I've ever tried to do with this, but it looks pretty neat. Good luck :)
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
Celtic_Minstrel
Developer
Posts: 1186
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: [show_dialog] tag idea (wip)

Post by Celtic_Minstrel » January 21st, 2018, 11:28 pm

Looks interesting! Perhaps something similar to this could be accepted into core at some point. I see this also doesn't fully expose the user to the intricacies of GUI2 WML, which is kinda nice since that can get rather complicated (and deeply indented).
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
doofus-01
Art Contributor
Posts: 3671
Joined: January 6th, 2008, 9:27 pm
Location: USA, the civilized part.

Re: [show_dialog] tag idea (wip)

Post by doofus-01 » January 22nd, 2018, 2:39 am

This looks really nice. :)
Please do spend some time on the documentation, for the WML reference wiki. I recall lack of documentation being a problem with GUI2. (Maybe you don't need the reminder, but it couldn't hurt to bring it up.)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects

Post Reply