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

util.py (1445B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\neocom\wallet\panels\personal\plex\util.py
      2 import random
      3 from carbonui.util.color import Color
      4 from itertoolsext.Enum import Enum
      5 
      6 @Enum
      7 
      8 class CategoryMessageID(object):
      9     PURCHASE = 1021274
     10     NES = 1021275
     11     SKINR = 1021276
     12     REWARD = 1021277
     13     INVENTORY = 1021278
     14     TRADING = 1021780
     15     OMEGA = 1021281
     16     CCP = 1021282
     17     UNCATEGORIZED = 1022601
     18 
     19 
     20 @Enum
     21 
     22 class ChartMode(object):
     23     INCOME = 0
     24     EXPENSES = 1
     25 
     26 
     27 @Enum
     28 
     29 class AmountSign(object):
     30     POSITIVE = '+'
     31     NEGATIVE = '-'
     32 
     33 
     34 @Enum
     35 
     36 class SortMode(object):
     37     ASCENDING = 0
     38     DESCENDING = 1
     39 
     40 
     41 COLOR_BY_MESSAGE_ID = {CategoryMessageID.PURCHASE: Color.HextoRGBA('#0B3C5D'),
     42  CategoryMessageID.NES: Color.HextoRGBA('#328CC1'),
     43  CategoryMessageID.SKINR: Color.HextoRGBA('#66B9BF'),
     44  CategoryMessageID.REWARD: Color.HextoRGBA('#A8E0E0'),
     45  CategoryMessageID.INVENTORY: Color.HextoRGBA('#98FF98'),
     46  CategoryMessageID.TRADING: Color.HextoRGBA('#2E8B57'),
     47  CategoryMessageID.OMEGA: Color.HextoRGBA('#7D1FE0'),
     48  CategoryMessageID.CCP: Color.HextoRGBA('#B57EDC'),
     49  CategoryMessageID.UNCATEGORIZED: Color.HextoRGBA('#708090')}
     50 NO_TRANSACTIONS_ID = 0
     51 NO_TRANSACTIONS_COLOR = (1, 1, 1, 0.1)
     52 MAX_TRANSACTIONS_SHOWN = 2000
     53 
     54 def get_random_color(alpha = 1.0):
     55     r = random.random()
     56     g = random.random()
     57     b = random.random()
     58     return (r,
     59      g,
     60      b,
     61      alpha)