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

paymentPlatformSelectionPanel.py (1203B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\view\aurumstore\purchasepanels\paymentPlatformSelectionPanel.py
      2 from carbonui import uiconst
      3 from eve.client.script.ui.shared.vgs.kiringPaymentProvider import get_element_for_payment_provider
      4 from eve.client.script.ui.view.aurumstore.purchasepanels.basePurchasePanel import BasePurchasePanel
      5 from eve.client.script.ui.view.aurumstore.shared.paymentselector import PaymentSelector
      6 from kiring.client.apigateway import KIRING_PAYMENT_OPTIONS
      7 
      8 class PaymentPlatformSelectionPanel(BasePurchasePanel):
      9 
     10     def ApplyAttributes(self, attributes):
     11         super(PaymentPlatformSelectionPanel, self).ApplyAttributes(attributes)
     12         defaultValue = attributes.defaultValue
     13         selectorOptionsDict = {paymentOptionId:get_element_for_payment_provider(paymentOptionId)(parent=self, align=uiconst.CENTER) for name, paymentOptionId in KIRING_PAYMENT_OPTIONS}
     14         self.selector = PaymentSelector(parent=self, optionsDict=selectorOptionsDict, align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN, defaultValue=defaultValue)
     15 
     16     def GetSelectedPaymentMethod(self):
     17         return self.selector.GetSelectedValue()