@@ -81,7 +81,8 @@ class ManualContext(SuperContext):
81
81
'category_in_logic' : [2 / 255 , 82 / 255 , 2 / 255 , 1 ],
82
82
'deathlink_received' : [1 , 0 , 0 , 1 ],
83
83
'deathlink_primed' : [1 , 1 , 1 , 1 ],
84
- 'deathlink_sent' : [0 , 1 , 0 , 1 ]
84
+ 'deathlink_sent' : [0 , 1 , 0 , 1 ],
85
+ 'game_select_button' : [150 / 255 , 200 / 255 , 200 / 255 , 1 ],
85
86
}
86
87
87
88
def __init__ (self , server_address , password , game , player_name ) -> None :
@@ -217,16 +218,15 @@ def make_gui(self) -> typing.Type["kvui.GameManager"]:
217
218
218
219
from kivy .metrics import dp
219
220
from kivy .uix .button import Button
220
- from kivy .uix .label import Label
221
- from kivy .uix .layout import Layout
222
221
from kivy .uix .boxlayout import BoxLayout
222
+ from kivy .uix .dropdown import DropDown
223
223
from kivy .uix .gridlayout import GridLayout
224
+ from kivy .uix .label import Label
225
+ from kivy .uix .layout import Layout
224
226
from kivy .uix .scrollview import ScrollView
227
+ from kivy .uix .spinner import Spinner , SpinnerOption
225
228
from kivy .uix .textinput import TextInput
226
- from kivy .uix .spinner import Spinner
227
- from kivy .uix .tabbedpanel import TabbedPanelItem
228
229
from kivy .uix .treeview import TreeView , TreeViewNode , TreeViewLabel
229
- from kivy .clock import Clock
230
230
from kivy .core .window import Window
231
231
232
232
class TrackerAndLocationsLayout (GridLayout ):
@@ -245,6 +245,13 @@ class TreeViewButton(Button, TreeViewNode):
245
245
class TreeViewScrollView (ScrollView , TreeViewNode ):
246
246
pass
247
247
248
+ class GameSelectOption (SpinnerOption ):
249
+ background_color = self .colors ['game_select_button' ]
250
+
251
+ class GameSelectDropDown (DropDown ):
252
+ # If someone can figure out how to give this a solid background, I'd be very happy.
253
+ pass
254
+
248
255
class ManualManager (ui ):
249
256
logging_pairs = [
250
257
("Client" , "Archipelago" ),
@@ -270,10 +277,11 @@ def build(self) -> Layout:
270
277
self .manual_game_layout = BoxLayout (orientation = "horizontal" , size_hint_y = None , height = dp (30 ))
271
278
272
279
game_bar_label = Label (text = "Manual Game ID" , size = (dp (150 ), dp (30 )), size_hint_y = None , size_hint_x = None )
273
- manuals = tuple ([w for w in AutoWorldRegister .world_types .keys () if "Manual_" in w ])
280
+ manuals = [w for w in AutoWorldRegister .world_types .keys () if "Manual_" in w ]
281
+ manuals .sort () # Sort by alphabetical order, not load order
274
282
self .manual_game_layout .add_widget (game_bar_label )
275
283
self .game_bar_text = Spinner (text = self .ctx .suggested_game ,
276
- size_hint_y = None , height = dp (30 ), values = manuals )
284
+ size_hint_y = None , height = dp (30 ), values = manuals , option_cls = GameSelectOption , dropdown_cls = GameSelectDropDown )
277
285
self .manual_game_layout .add_widget (self .game_bar_text )
278
286
279
287
self .grid .add_widget (self .manual_game_layout , 3 )
0 commit comments