mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Icon lookup for SIGs in preparation for #47. Improved ZLOTA spotter lookup.
This commit is contained in:
8
core/utility_functions.py
Normal file
8
core/utility_functions.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from core.constants import SIGS
|
||||
|
||||
# Utility function to get the icon for a named SIG. If no match is found, the "circle-question" icon will be returned.
|
||||
def get_icon_for_sig(sig):
|
||||
for s in SIGS:
|
||||
if s.name == sig:
|
||||
return s.icon
|
||||
return "circle-question"
|
||||
Reference in New Issue
Block a user