--- deliantra/Deliantra-Client/DC/Protocol.pm 2007/12/27 18:35:56 1.184 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2007/12/27 19:12:19 1.185 @@ -196,46 +196,9 @@ # widgetset create template sub ext_ws_ct { - my ($self, $ws, $template, $cfg) = @_; + my ($self, $ws, $type, $template, $done_cb, $cfg) = @_; - $template = eval < { - s_id => "toplevel", - title => "Character Creation", - x => "center", - y => "center", - z => 5, - s_cl => [VBox => {s_cl => [ - Label => { - text => "Character Creation", - fontsize => 1, - align => 0, - }, - Label => { - markup => "View or Edit your character attributes below, then press Finish to create your character", - fontsize => 0.8, - align => 0, - }, - Notebook => { - s_cl => [ - Label => { - text => "hulla-hoop" - }, - Entry => { - s_id => "entry", - }, - ], - }, - Button => { - s_id => "finish", - title => "Finish", - }, - ]}], - }, -] -EOF - die if $@; + $done_cb ||= sub { }; my $parse_list; $parse_list = sub { my ($list) = @_; @@ -262,8 +225,16 @@ @w }; - $parse_list->($template); - + # either array reference, or face # + if ($type eq "inline") { + $parse_list->($template); + $done_cb->(); + } elsif ($type eq "face") { + #... + $done_cb->(0); + } else { + $done_cb->(0); + } } # widgetset associate