GUI Stacked Widget not working
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
GUI Stacked Widget not working
Hi, I'm attemping to make a GUI for my scenario in WML.
Its a GUI for 4 players to place bets. In the center I'm attempting to place a poker board with a circle image and overlay it with a label in the center that displays the pot amount using a [stacked_widget]
The rest of the GUI currently displays except the stacked_widget. I think I did something wrong with the stacked_widget but I don't know what. I'll post the relevant code with the stacked_widget and the full gui below it.

STACKED WIDGET
FULL GUI
Its a GUI for 4 players to place bets. In the center I'm attempting to place a poker board with a circle image and overlay it with a label in the center that displays the pot amount using a [stacked_widget]
The rest of the GUI currently displays except the stacked_widget. I think I did something wrong with the stacked_widget but I don't know what. I'll post the relevant code with the stacked_widget and the full gui below it.

STACKED WIDGET
Code: Select all
# CENTER TABLE
[column]
[grid]
[row]
[column]
[stacked_widget]
definition="default"
selected_index = 0
[layer]
[image]
label = "scenery/circle-magic.png~SCALE(300,300)"
tooltip = _ "Poker Table"
[/image]
[/layer]
[layer]
[label]
id = "pot_label"
label = "30"
definition = "title"
[/label]
[/layer]
[/stacked_widget]
[/column]
[/row]
[/grid]
[/column]
Code: Select all
[resolution]
definition = "poker_table"
vertical_placement = "center"
horizontal_placement = "center"
maximum_width = 800
maximum_height = 700
[helptip]
id = "tooltip_large"
[/helptip]
[tooltip]
id = "tooltip_large"
[/tooltip]
[grid]
# Row 1: North
[row]
[column]
[spacer][/spacer]
[/column]
[column]
[grid]
[row]
[column]
[grid]
[row]
[column]
[image]
label = "units/human-loyalists/fencer.png~CROP(16,16,64,64)~SCALE(80,80)"
[/image]
[/column]
[column]
[label]
id = "player_north"
definition = "player_name_small_italic"
[/label]
[/column]
[/row]
[/grid]
[/column]
[/row]
[row]
[column]
[spacer]
height = 10
[/spacer]
[/column]
[/row]
[row]
[column]
horizontal_alignment = "center"
[label]
id = "bet_north"
label = "50"
definition = "title"
[/label]
[/column]
[/row]
[/grid]
[/column]
[column]
[spacer][/spacer]
[/column]
[/row]
# Row 2: West - Center - East
[row]
# WEST
[column]
[grid]
[row]
[column]
[image]
label = "units/orcs/grunt.png~CROP(16,16,64,64)~SCALE(80,80)"
[/image]
[/column]
[column]
[label]
id = "player_west"
definition = "player_name_small_italic"
[/label]
[/column]
[column]
[spacer]
width = 20
[/spacer]
[/column]
[column]
[label]
id = "bet_west"
label = "100"
definition = "title"
[/label]
[/column]
[/row]
[/grid]
[/column]
# CENTER TABLE
[column]
[grid]
[row]
[column]
[stacked_widget]
definition="default"
selected_index = 0
[layer]
[image]
label = "scenery/circle-magic.png~SCALE(300,300)"
tooltip = _ "Poker Table"
[/image]
[/layer]
[layer]
[label]
id = "pot_label"
label = "30"
definition = "title"
[/label]
[/layer]
[/stacked_widget]
[/column]
[/row]
[/grid]
[/column]
# EAST
[column]
[grid]
[row]
[column]
[label]
id = "bet_east"
label = "30"
definition = "title"
[/label]
[/column]
[column]
[spacer]
width = 20
[/spacer]
[/column]
[column]
[label]
id = "player_east"
definition = "player_name_small_italic"
[/label]
[/column]
[column]
[image]
label = "units/elves-wood/archer.png~CROP(16,16,64,64)~SCALE(80,80)"
[/image]
[/column]
[/row]
[/grid]
[/column]
[/row]
# Row 3: South
[row]
[column]
[spacer][/spacer]
[/column]
[column]
[grid]
[row]
[column]
horizontal_alignment = "center"
[label]
id = "bet_south"
label = "40"
definition = "title"
[/label]
[/column]
[/row]
[row]
[column]
[spacer]
height = 10
[/spacer]
[/column]
[/row]
[row]
[column]
[grid]
[row]
[column]
[image]
label = "units/human-magi/mage.png~CROP(16,16,64,64)~SCALE(80,80)"
[/image]
[/column]
[column]
[label]
id = "player_south"
definition = "player_name_small_italic"
[/label]
[/column]
[/row]
[/grid]
[/column]
[/row]
[/grid]
[/column]
[column]
[spacer][/spacer]
[/column]
[/row]
[/grid]
[/resolution]
- Celtic_Minstrel
- Developer
- Posts: 2376
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: GUI Stacked Widget not working
I don't think this is likely to be the issue, but… I suspect you don't need
Aside from that, I don't see anything that looks wrong in your
selected_index = 0
.Aside from that, I don't see anything that looks wrong in your
[stacked_widget]
tag.