… | |
… | |
108 | use DC::UI; |
108 | use DC::UI; |
109 | use DC::UI::Canvas; |
109 | use DC::UI::Canvas; |
110 | use DC::UI::Inventory; |
110 | use DC::UI::Inventory; |
111 | use DC::UI::SpellList; |
111 | use DC::UI::SpellList; |
112 | use DC::UI::Dockable; |
112 | use DC::UI::Dockable; |
|
|
113 | use DC::UI::Dockbar; |
113 | use DC::UI::MessageWindow; |
114 | use DC::UI::MessageWindow; |
114 | use DC::UI::ChatView; |
115 | use DC::UI::ChatView; |
|
|
116 | use DC::MessageDistributor; |
115 | use DC::Pod; |
117 | use DC::Pod; |
116 | use DC::MapWidget; |
118 | use DC::MapWidget; |
117 | use DC::Macro; |
119 | use DC::Macro; |
118 | |
120 | |
119 | $SIG{QUIT} = sub { Carp::cluck "QUIT" }; |
121 | $SIG{QUIT} = sub { Carp::cluck "QUIT" }; |
… | |
… | |
178 | our $SPELL_PAGE; |
180 | our $SPELL_PAGE; |
179 | our $SPELL_LIST; |
181 | our $SPELL_LIST; |
180 | |
182 | |
181 | our $HELP_WINDOW; |
183 | our $HELP_WINDOW; |
182 | our $MESSAGE_WINDOW; |
184 | our $MESSAGE_WINDOW; |
|
|
185 | our $MESSAGE_DIST; |
183 | our $FLOORBOX; |
186 | our $FLOORBOX; |
184 | our $GAUGES; |
187 | our $GAUGES; |
185 | our $STATWIDS; |
188 | our $STATWIDS; |
186 | |
189 | |
187 | our $SDL_ACTIVE; |
190 | our $SDL_ACTIVE; |
… | |
… | |
204 | sub debug { |
207 | sub debug { |
205 | $DEBUG_STATUS->set_text ($_[0]); |
208 | $DEBUG_STATUS->set_text ($_[0]); |
206 | } |
209 | } |
207 | |
210 | |
208 | sub message { |
211 | sub message { |
209 | $MESSAGE_WINDOW->message (@_); |
212 | $MESSAGE_DIST->message (@_); |
210 | } |
213 | } |
211 | |
214 | |
212 | ############################################################################# |
215 | ############################################################################# |
213 | #TODO: maybe move into own audio module... |
216 | #TODO: maybe move into own audio module... |
214 | |
217 | |
… | |
… | |
805 | ); |
808 | ); |
806 | |
809 | |
807 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Force OpenGL 1.1"); |
810 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Force OpenGL 1.1"); |
808 | $table->add_at (1, $row++, new DC::UI::CheckBox |
811 | $table->add_at (1, $row++, new DC::UI::CheckBox |
809 | state => $CFG->{force_opengl11}, |
812 | state => $CFG->{force_opengl11}, |
810 | tooltip => "Limit CFPlus to use OpenGL 1.1 features only. This will normally result in " |
813 | tooltip => "Limit Deliantra to use OpenGL 1.1 features only. This will normally result in " |
811 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
814 | . "higher memory usage and slower performance. It will, however, help tremendously on " |
812 | . "cards that claim to support a feature but fall back to software rendering. " |
815 | . "cards that claim to support a feature but fall back to software rendering. " |
813 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
816 | . "Nvidia Geforce FX cards are known to claim features the hardware doesn't support, " |
814 | . "but cards and drivers from other vendors (ATI) are often just as bad. <b>If you " |
817 | . "but cards and drivers from other vendors (ATI) are often just as bad. <b>If you " |
815 | . "experience extremely low framerates and your card should do better, try this option.</b>", |
818 | . "experience extremely low framerates and your card should do better, try this option.</b>", |
… | |
… | |
883 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Message Fontsize"); |
886 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Message Fontsize"); |
884 | $table->add_at (1, $row++, new DC::UI::Slider |
887 | $table->add_at (1, $row++, new DC::UI::Slider |
885 | range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1], |
888 | range => [$CFG->{log_fontsize}, 0.5, 2, 0, 0.1], |
886 | tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant, " |
889 | tooltip => "The font size used by the <b>message/server log</b> window only. Changes are instant, " |
887 | . "but you still need to press apply to correctly re-layout the widget.", |
890 | . "but you still need to press apply to correctly re-layout the widget.", |
888 | on_changed => sub { $MESSAGE_WINDOW->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 }, |
891 | on_changed => sub { $MESSAGE_DIST->set_fontsize ($CFG->{log_fontsize} = $_[1]); 0 }, |
889 | ); |
892 | ); |
890 | |
893 | |
891 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge fontsize"); |
894 | $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Gauge fontsize"); |
892 | $table->add_at (1, $row++, new DC::UI::Slider |
895 | $table->add_at (1, $row++, new DC::UI::Slider |
893 | range => [$CFG->{gauge_fontsize}, 0.5, 2, 0, 0.1], |
896 | range => [$CFG->{gauge_fontsize}, 0.5, 2, 0, 0.1], |
… | |
… | |
1598 | tooltip => "This is maximum number of messages remembered in the <b>Messages</b> window. If the server " |
1601 | tooltip => "This is maximum number of messages remembered in the <b>Messages</b> window. If the server " |
1599 | . "sends more messages than this number, older messages get removed to save memory and " |
1602 | . "sends more messages than this number, older messages get removed to save memory and " |
1600 | . "computing time. A value of <b>0</b> disables this feature, but that is not recommended.", |
1603 | . "computing time. A value of <b>0</b> disables this feature, but that is not recommended.", |
1601 | on_changed => sub { |
1604 | on_changed => sub { |
1602 | my ($self, $value) = @_; |
1605 | my ($self, $value) = @_; |
1603 | $MESSAGE_WINDOW->set_max_para ($CFG->{logview_max_par} = $value*1); |
1606 | $MESSAGE_DIST->set_max_para ($CFG->{logview_max_par} = $value*1); |
1604 | 0 |
1607 | 0 |
1605 | }, |
1608 | }, |
1606 | ); |
1609 | ); |
1607 | |
1610 | |
1608 | $table |
1611 | $table |
… | |
… | |
2168 | |
2171 | |
2169 | $MAPWIDGET = new DC::MapWidget; |
2172 | $MAPWIDGET = new DC::MapWidget; |
2170 | $MAPWIDGET->connect (activate_console => sub { |
2173 | $MAPWIDGET->connect (activate_console => sub { |
2171 | my ($mapwidget, $preset) = @_; |
2174 | my ($mapwidget, $preset) = @_; |
2172 | |
2175 | |
2173 | $MESSAGE_WINDOW->activate_console ($preset) |
2176 | $MESSAGE_DIST->activate_console ($preset) |
2174 | if $MESSAGE_WINDOW; |
2177 | if $MESSAGE_DIST; |
2175 | }); |
2178 | }); |
2176 | $MAPWIDGET->show; |
2179 | $MAPWIDGET->show; |
2177 | $MAPWIDGET->grab_focus; |
2180 | $MAPWIDGET->grab_focus; |
2178 | |
2181 | |
2179 | $COMPLETER = new DC::MapWidget::Command:: |
2182 | $COMPLETER = new DC::MapWidget::Command:: |
… | |
… | |
2191 | force_h => $::HEIGHT * 0.6, |
2194 | force_h => $::HEIGHT * 0.6, |
2192 | has_close_button => 1, |
2195 | has_close_button => 1, |
2193 | ; |
2196 | ; |
2194 | |
2197 | |
2195 | $METASERVER = metaserver_dialog; |
2198 | $METASERVER = metaserver_dialog; |
2196 | $MESSAGE_WINDOW = new DC::UI::MessageWindow; |
2199 | $MESSAGE_WINDOW = new DC::UI::Dockbar; |
|
|
2200 | $MESSAGE_DIST = new DC::MessageDistributor dockbar => $MESSAGE_WINDOW; |
2197 | |
2201 | |
2198 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, debug => 1, |
2202 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, debug => 1, |
2199 | filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
2203 | filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
2200 | |
2204 | |
2201 | $SETUP_NOTEBOOK->add_tab (Login => $SETUP_LOGIN = login_setup, |
2205 | $SETUP_NOTEBOOK->add_tab (Login => $SETUP_LOGIN = login_setup, |