[show_dialog] tag idea (wip)

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

Moderator: Forum Moderators

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

[show_dialog] tag idea (wip)

Post by Smok »

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 Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: [show_dialog] tag idea (wip)

Post by WhiteWolf »

This looks really useful, when I find the time, I'll experiment with this :)
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
Pentarctagon
Project Manager
Posts: 5496
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: [show_dialog] tag idea (wip)

Post by Pentarctagon »

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: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: [show_dialog] tag idea (wip)

Post by Celtic_Minstrel »

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.
Former maintainer of Steelhive.
User avatar
doofus-01
Art Director
Posts: 4121
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: [show_dialog] tag idea (wip)

Post by doofus-01 »

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