… | |
… | |
37 | min_w => 600, |
37 | min_w => 600, |
38 | min_h => 400, |
38 | min_h => 400, |
39 | x => "center", |
39 | x => "center", |
40 | y => "center", |
40 | y => "center", |
41 | title => "Character Creation", |
41 | title => "Character Creation", |
|
|
42 | has_close_button => 1, |
|
|
43 | on_delete => sub { |
|
|
44 | $ws->destroy; |
|
|
45 | }, |
42 | ); |
46 | ); |
43 | |
47 | |
44 | $w->add (my $ntb = $ws->new (Notebook => expand => 1)); |
48 | $w->add (my $ntb = $ws->new (Notebook => expand => 1)); |
45 | |
49 | |
46 | $ntb->add (Statistics => (my $stats = $ws->new (Table => expand => 1)), "Basic statistics of your new character"); |
50 | $ntb->add (Statistics => (my $stats = $ws->new (Table => expand => 1)), "Basic statistics of your new character"); |
47 | |
51 | |
48 | $stats->add (0, 0, (my $statstable = $ws->new ("Table"))); |
52 | $stats->add (0, 0, (my $statstable = $ws->new ("Table"))); |
49 | |
53 | |
50 | for ( |
54 | for ( |
51 | [0, "Str", "Strength"], |
55 | [0, "Str"], |
52 | [1, "Dex", "Dexterity"], |
56 | [1, "Dex"], |
53 | [2, "Con", "Constitution"], |
57 | [2, "Con"], |
54 | [3, "Int", "Intelligence"], |
58 | [3, "Int"], |
55 | [4, "Wis", "Wisdom"], |
59 | [4, "Wis"], |
56 | [5, "Pow", "Power"], |
60 | [5, "Pow"], |
57 | [6, "Cha", "Charisma"], |
61 | [6, "Cha"], |
58 | ) { |
62 | ) { |
59 | my ($x, $label, $description) = @$_; |
63 | my ($x, $label) = @$_; |
60 | |
64 | |
61 | $statstable->add ($x, 0, $ws->new (Label => |
65 | $statstable->add ($x, 0, $ws->new (Label => |
62 | can_hover => 1, can_events => 1, |
66 | can_hover => 1, can_events => 1, |
63 | align => +1, text => $label, tooltip => "#stat_$label", |
67 | align => +1, text => $label, tooltip => "#stat_$label", |
64 | )); |
68 | )); |