NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

settings.py (843B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\util\settings.py
      2 SETTING_SHIP_TOP_ALIGNED = 'shipuialigntop'
      3 
      4 def IsShipHudTopAligned():
      5     return settings.user.ui.Get(SETTING_SHIP_TOP_ALIGNED, False)
      6 
      7 
      8 def SetShipHudTopAligned(isHudTopAligned):
      9     settings.user.ui.Set(SETTING_SHIP_TOP_ALIGNED, isHudTopAligned)
     10 
     11 
     12 def EncodeSetting(value):
     13     if value is None:
     14         return 'None'
     15     if not value:
     16         return ''
     17     if isinstance(value, dict):
     18         return '{' + ''.join([ '{k}: {v},'.format(k=EncodeSetting(k), v=EncodeSetting(v)) for k, v in value.iteritems() ]) + '}'
     19     if isinstance(value, list):
     20         return '[' + ','.join([ EncodeSetting(each) for each in value ]) + ']'
     21     if hasattr(value, 'encode'):
     22         return value.encode('utf-8', 'ignore')
     23     return str(value)