|
6 | 6 | -- Put it on a repository, load it like other libs |
7 | 7 | -- Fix fontsize changing on select |
8 | 8 | -- Pop up on new warning (option) |
9 | | --- Button to upload log (using the connector) |
10 | | --- Scrollbar should have a constant height (it can be too small if there's a lot of text) |
11 | | - |
12 | | -function widget:GetInfo() |
| 9 | +-- Button to upload log (using the connector) |
| 10 | +-- Scrollbar should have a constant height (it can be too small if there's a lot of text) |
| 11 | + |
| 12 | +if Spring.GetGameRulesParam("sb_ui") ~= "chili" then |
| 13 | + return false |
| 14 | +end |
| 15 | + |
| 16 | +function widget:GetInfo() |
13 | 17 | return { |
14 | 18 | name = 'Developer Console', |
15 | 19 | desc = 'Displays useful information for developers', |
@@ -445,11 +449,10 @@ function widget:TextCommand(command) |
445 | 449 | end |
446 | 450 |
|
447 | 451 | function widget:Initialize() |
448 | | - Spring.SendCommands('console 0') |
449 | | - if Spring.GetGameRulesParam("gameMode") == "play" |
450 | | - or Spring.GetGameRulesParam("sb_ui") ~= "chili" then |
451 | | - widgetHandler:RemoveWidget(self) |
452 | | - return |
| 452 | + Spring.SendCommands('console 0') |
| 453 | + if Spring.GetGameRulesParam("gameMode") == "play" then |
| 454 | + widgetHandler:RemoveWidget(self) |
| 455 | + return |
453 | 456 | end |
454 | 457 | Chili = WG.SBChili or WG.Chili |
455 | 458 | screen = Chili.Screen0 |
@@ -481,8 +484,8 @@ function widget:GetConfigData() |
481 | 484 | return cfg |
482 | 485 | end |
483 | 486 |
|
484 | | -function widget:SetConfigData(data) |
485 | | - for k, v in pairs(data) do |
| 487 | +function widget:SetConfigData(data) |
| 488 | + for k, v in pairs(data) do |
486 | 489 | cfg[k] = v |
487 | 490 | end |
488 | 491 |
|
|
0 commit comments