mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Fix: keyword_class in draggable list
This commit is contained in:
parent
b2fcbbc818
commit
4481da676c
@ -42,11 +42,9 @@ class DraggableList:
|
||||
self.name = name
|
||||
self.keyword_class = keyword_class
|
||||
self.ocr_class = ocr_class
|
||||
if not isinstance(keyword_class, list):
|
||||
keyword_class = [keyword_class]
|
||||
self.known_rows = [
|
||||
kw for kc in keyword_class for kw in kc.instances.values()
|
||||
]
|
||||
if isinstance(keyword_class, list):
|
||||
keyword_class = keyword_class[0]
|
||||
self.known_rows = list(keyword_class.instances.values())
|
||||
self.search_button = search_button
|
||||
self.check_row_order = check_row_order
|
||||
self.active_color = active_color
|
||||
|
@ -121,6 +121,10 @@ ASSIGNMENT_ENTRY_LIST = DraggableList(
|
||||
check_row_order=False,
|
||||
active_color=(40, 40, 40)
|
||||
)
|
||||
ASSIGNMENT_ENTRY_LIST.known_rows = [
|
||||
kw for kc in ASSIGNMENT_ENTRY_LIST.keyword_class
|
||||
for kw in kc.instances.values()
|
||||
]
|
||||
|
||||
|
||||
class AssignmentUI(UI):
|
||||
|
Loading…
Reference in New Issue
Block a user