… | |
… | |
187 | border_bg => [1, 1, 1, 0.5], |
187 | border_bg => [1, 1, 1, 0.5], |
188 | bg => [0.3, 0.3, 0.3, 0.8], |
188 | bg => [0.3, 0.3, 0.3, 0.8], |
189 | child => (my $vbox = new CFClient::UI::VBox); |
189 | child => (my $vbox = new CFClient::UI::VBox); |
190 | |
190 | |
191 | $vbox->add ($LOGVIEW = new CFClient::UI::TextView expand => 1); |
191 | $vbox->add ($LOGVIEW = new CFClient::UI::TextView expand => 1); |
192 | $vbox->add (my $input = new CFClient::UI::Entry); |
192 | $vbox->add (my $input = new CFClient::UI::LineEntry); |
|
|
193 | $input->connect (activate => sub { |
|
|
194 | my ($input, $text) = @_; |
|
|
195 | $input->set_text (''); |
|
|
196 | |
|
|
197 | if ($text =~ /^\/(.*)/) { |
|
|
198 | $::CONN->user_send ("command $1"); |
|
|
199 | } else { |
|
|
200 | $::CONN->user_send ("command say $text"); |
|
|
201 | } |
|
|
202 | 1 |
|
|
203 | }); |
193 | |
204 | |
194 | $window |
205 | $window |
195 | } |
206 | } |
196 | |
207 | |
197 | sub sdl_init { |
208 | sub sdl_init { |