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

moveMeWindow.py (1379B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\moveMeWindow.py
      2 from eve.client.script.ui.control.entries.button import ButtonEntry
      3 from eve.client.script.ui.control.entries.util import GetFromClass
      4 from carbonui.control.window import Window
      5 from eve.client.script.ui.control.eveScroll import Scroll
      6 from player_messaging.client.ui_message import prompt_player_fsd_dialog
      7 
      8 class MoveMeWnd(Window):
      9     default_windowID = 'moveMeWnd'
     10     default_caption = 'Move me'
     11     default_height = 200
     12 
     13     def ApplyAttributes(self, attributes):
     14         Window.ApplyAttributes(self, attributes)
     15         solarSystems = attributes.solarSystems
     16         self.scroll = Scroll(parent=self.sr.main)
     17         self.LoadScroll(solarSystems)
     18 
     19     def LoadScroll(self, systems):
     20         scrollList = []
     21         for eachSystem in systems:
     22             entry = GetFromClass(ButtonEntry, {'label': eachSystem,
     23              'caption': 'Move To',
     24              'OnClick': self.MoveToSystem,
     25              'args': (eachSystem,)})
     26             scrollList.append(entry)
     27 
     28         self.scroll.Load(contentList=scrollList)
     29 
     30     def MoveToSystem(self, destinationName, *args):
     31         sm.GetService('publicQaToolsClient').MoveMeTo(destinationName)
     32         prompt_player_fsd_dialog('CustomNotify', {'notify': 'Moving to %s' % destinationName})
     33         self.Close()