How to display two dialogs on each other
Moderator: Forum Moderators
- ZombieKnight
- Posts: 249
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
How to display two dialogs on each other
Hi,
I'd like to have my custom dialog in the background
And over whole screen focused text input dialog.
Any ideas how to do so?
I'd like to have my custom dialog in the background
And over whole screen focused text input dialog.
Any ideas how to do so?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
-
- Posts: 1280
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: How to display two dialogs on each other
I don't know if this will help, but I recently built an example of placing a label over another widget. I didn't have much luck with the fonts, and I don't know if this could be used to stack dialogs, but...
https://wiki.wesnoth.org/Sandbox/GUI/Ge ... d#Canvases
https://wiki.wesnoth.org/Sandbox/GUI/Ge ... d#Canvases
Speak softly, and carry Doombringer.
- Celtic_Minstrel
- Developer
- Posts: 2273
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to display two dialogs on each other
This is very easy. The first dialog (ie, the one in the background) must call the second dialog in either the pre_show or a callback function (depending on how your logic works).
That example you posted is about placing things on top of things within a single dialog, so it's not relevant to the question.
That example you posted is about placing things on top of things within a single dialog, so it's not relevant to the question.
-
- Posts: 1280
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: How to display two dialogs on each other
So your foreground/background canvas can't be another dialog? It may seem like a silly idea, but I had it and now the concept interests me.
[EDIT: No, probably not. The wiki lists the things you can put "on" a canvas, and dialogs and arbitrary widgets and any other silly thing I can think of are on the list]
P.S. Don't mean to hijack the thread, but if you have any ideas on why I had problems with text size on a label on a canvas, or even why the progress_bar doesn't(?) include a text (X%) overlay option I'd be very interested.
[EDIT: No, probably not. The wiki lists the things you can put "on" a canvas, and dialogs and arbitrary widgets and any other silly thing I can think of are on the list]
P.S. Don't mean to hijack the thread, but if you have any ideas on why I had problems with text size on a label on a canvas, or even why the progress_bar doesn't(?) include a text (X%) overlay option I'd be very interested.
Last edited by white_haired_uncle on April 21st, 2024, 3:34 pm, edited 1 time in total.
Speak softly, and carry Doombringer.
- ZombieKnight
- Posts: 249
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to display two dialogs on each other
Thank you both, I'll try it (tho it'll take some time).
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 249
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: How to display two dialogs on each other
Oh, I wasn't clear with my question.Celtic_Minstrel wrote: ↑April 20th, 2024, 2:03 pm This is very easy. The first dialog (ie, the one in the background) must call the second dialog in either the pre_show or a callback function (depending on how your logic works).
That example you posted is about placing things on top of things within a single dialog, so it's not relevant to the question.
I'd like to have invisible text input all over the screen, under it visible custom dialog (message).
How to do so?
Use one or two dialogs?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills