def __CreateFileListBox(self):
        fileListBox = ui.ListBoxEx()
        fileListBox.SetParent(self)
        fileListBox.SetPosition(15, 50)

        fileListBox.Show()
        return fileListBox
示例#2
0
	def ListBoxEx(self, parent, x, y, width, heigh):
		tmpListBoxEx = ui.ListBoxEx()
		
		if parent:
			tmpListBoxEx.SetParent(parent)
		
		tmpListBoxEx.SetPosition(x, y)
		tmpListBoxEx.SetSize(width, heigh)
		
		tmpListBoxEx.Show()
		return tmpListBoxEx
	def __CreateFileListBox(self):
		fileListBox=ui.ListBoxEx()
		fileListBox.SetParent(self)
		
		if localeInfo.IsARABIC():
			fileListBox.SetPosition( self.GetWidth() - fileListBox.GetWidth() - 10, 50)
		else:
			fileListBox.SetPosition(15, 50)

		fileListBox.Show()
		return fileListBox
示例#4
0
    def __init__(self, parent, tt="", down=1):
        ui.Window.__init__(self, "TOP_MOST")
        self.tt = tt
        self.down = down
        self.SetParentProxy(parent)
        self.bg = ui.Bar("TOP_MOST")
        self.bg.SetParent(self)
        self.bg.SetPosition(0, 0)
        self.bg.SetColor(0xc0000000)
        self.bg.OnMouseOverIn = self.bgMouseIn
        self.bg.OnMouseOverOut = self.bgMouseOut
        self.bg.OnMouseLeftButtonDown = self.ExpandMe
        self.bg.Show()
        self.act = ui.TextLine()
        self.act.SetParent(self.bg)
        self.act.SetPosition(4, 2)
        self.act.SetText(self.tt)
        self.act.Show()
        self.GetText = self.act.GetText

        self.Drop = ui.Bar("TOP_MOST")
        self.Drop.SetParent(self.GetParentProxy())
        self.Drop.SetPosition(0, 21)
        # self.Drop.SetSize(150,95)
        self.Drop.SetSize(150, 0)
        # self.Drop.SetColor(0xc00a0a0a)
        self.Drop.SetColor(0xff0a0a0a)

        self.ScrollBar = ui.ThinScrollBar()
        self.ScrollBar.SetParent(self.Drop)
        self.ScrollBar.SetPosition(132, 0)
        # self.ScrollBar.SetScrollBarSize(95)
        self.ScrollBar.SetScrollBarSize(0)
        # self.ScrollBar.Show()

        self.DropList = ui.ListBoxEx()
        self.DropList.SetParent(self.Drop)
        self.DropList.itemHeight = 12
        self.DropList.itemStep = 13
        self.DropList.SetPosition(0, 0)
        # self.DropList.SetSize(132,self.maxh)
        self.DropList.SetSize(132, 13)
        self.DropList.SetScrollBar(self.ScrollBar)
        self.DropList.SetSelectEvent(self.SetTitle)
        self.DropList.SetViewItemCount(0)
        self.DropList.Show()
        if self.tt != "":
            self.AppendItemAndSelect(self.tt)
        self.selected = self.DropList.GetSelectedItem()

        self.SetSize(120, 20)
示例#5
0
 def ReadingListBox(self, parent, x, y, width, heigh, count):
     bar = ui.Bar()
     if parent != None:
         bar.SetParent(parent)
     bar.SetPosition(x, y)
     bar.SetSize(width + 20, heigh)
     bar.Show()
     ListBox = ui.ListBoxEx()
     ListBox.SetParent(bar)
     ListBox.SetPosition(10, 13)
     ListBox.SetViewItemCount(count)
     ListBox.SetSize(width, heigh)
     ListBox.Show()
     return bar, ListBox
示例#6
0
 def FileListBox(self, parent, x, y, width, heigh, count):
     ListBox = ui.ListBoxEx()
     ListBox.SetParent(parent)
     ListBox.SetPosition(x, y)
     ListBox.SetViewItemCount(count)
     ListBox.SetSize(width, heigh)
     ListBox.Show()
     scroll = ui.ScrollBar()
     scroll.SetParent(ListBox)
     scroll.SetPosition(width - 20, 0)
     scroll.SetScrollBarSize(heigh)
     scroll.Show()
     ListBox.SetScrollBar(scroll)
     return ListBox, scroll
示例#7
0
 def ListBoxEx(self, parent, x, y, width, heigh):
     bar = ui.Bar()
     if parent != None:
         bar.SetParent(parent)
     bar.SetPosition(x, y)
     bar.SetSize(width, heigh)
     bar.SetColor(0x77000000)
     bar.Show()
     ListBox = ui.ListBoxEx()
     ListBox.SetParent(bar)
     ListBox.SetPosition(0, 0)
     ListBox.SetSize(width, heigh)
     ListBox.Show()
     scroll = ui.ScrollBar()
     scroll.SetParent(ListBox)
     scroll.SetPosition(width - 15, 0)
     scroll.SetScrollBarSize(heigh)
     scroll.Show()
     ListBox.SetScrollBar(scroll)
     return bar, ListBox
示例#8
0
 def ListBoxEx2(self, parent, x, y, width, heigh):
     bar = ui.Bar()
     if parent != None:
         bar.SetParent(parent)
     bar.SetPosition(x, y)
     bar.SetSize(width + 20, heigh)
     bar.SetColor(1996488704)
     bar.Show()
     ListBox = ui.ListBoxEx()
     ListBox.SetParent(bar)
     ListBox.SetPosition(0, 0)
     ListBox.SetViewItemCount(5)
     ListBox.SetSize(width, heigh)
     ListBox.Show()
     scroll = ui.ScrollBar()
     scroll.SetParent(bar)
     scroll.SetPosition(width + 5, 0)
     scroll.SetScrollBarSize(heigh)
     scroll.Show()
     ListBox.SetScrollBar(scroll)
     return (bar, ListBox, scroll)
示例#9
0
		def BuildUI(self):
			posX = 500
			self.AddFlag('movable')
			self.AddFlag('float')
			self.SetSize(posX, 150)
			self.SetTitleName("Offline Shop Panel")
			self.SetCloseEvent(self.OpenWindow)
			self.SetCenterPosition()
			self.Show()
	
			self.bar = ui.Bar()
			self.bar.SetParent(self)
			self.bar.SetPosition(10, 35)
			self.bar.SetSize(posX - 20, 100)
			self.bar.SetColor(0x77000000)
			self.bar.Show()
	
			self.ListBox = ui.ListBoxEx()
			self.ListBox.SetParent(self.bar)
			self.ListBox.SetPosition(0, 0)
			self.ListBox.SetSize(posX, 100)
			self.ListBox.SetViewItemCount(5)
			self.ListBox.Show()
	
			self.scroll = ui.ScrollBar()
			self.scroll.SetParent(self.ListBox)
			self.scroll.SetPosition(posX-35, 0)
			self.scroll.SetScrollBarSize(200/2)
			self.scroll.Show()
			self.ListBox.SetScrollBar(self.scroll)
	
			self.refresh = ui.Button()
			self.refresh.SetParent(self)
			self.refresh.SetPosition(self.GetWidth() - 50, 8)
			self.refresh.SetUpVisual("d:/ymir work/ui/game/guild/Refresh_Button_01.sub")
			self.refresh.SetOverVisual("d:/ymir work/ui/game/guild/Refresh_Button_02.sub")
			self.refresh.SetDownVisual("d:/ymir work/ui/game/guild/Refresh_Button_03.sub")
			self.refresh.SetText("")
			self.refresh.SetEvent(self.Refresh)
			self.refresh.Show()
示例#10
0
 def __CreateSymbolListBox(self):
     symbolListBox = ui.ListBoxEx()
     symbolListBox.SetParent(self)
     symbolListBox.SetPosition(15, 50)
     symbolListBox.Show()
     return symbolListBox
示例#11
0
 def __CreateMarkListBox(self):
     markListBox = ui.ListBoxEx()
     markListBox.SetParent(self)
     markListBox.SetPosition(15, 50)
     markListBox.Show()
     return markListBox
示例#12
0
    def LoadDialog(self):
        PythonScriptLoader = ui.PythonScriptLoader()
        if app.ENABLE_NEW_EXCHANGE_WINDOW:
            PythonScriptLoader.LoadScriptFile(
                self, "UIScript/exchangedialog_new.py")
        else:
            PythonScriptLoader.LoadScriptFile(self,
                                              "UIScript/exchangedialog.py")

        self.OwnerSlot = self.GetChild("Owner_Slot")
        self.OwnerSlot.SetSelectEmptySlotEvent(
            ui.__mem_func__(self.SelectOwnerEmptySlot))
        self.OwnerSlot.SetSelectItemSlotEvent(
            ui.__mem_func__(self.SelectOwnerItemSlot))
        self.OwnerSlot.SetOverInItemEvent(ui.__mem_func__(
            self.OverInOwnerItem))
        self.OwnerSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
        self.OwnerMoney = self.GetChild("Owner_Money_Value")
        if not app.ENABLE_NEW_EXCHANGE_WINDOW:
            self.OwnerAcceptLight = self.GetChild("Owner_Accept_Light")
            self.OwnerAcceptLight.Disable()
        self.OwnerMoneyButton = self.GetChild("Owner_Money")
        self.OwnerMoneyButton.SetEvent(
            ui.__mem_func__(self.OpenPickMoneyDialog))

        self.TargetSlot = self.GetChild("Target_Slot")
        self.TargetSlot.SetOverInItemEvent(
            ui.__mem_func__(self.OverInTargetItem))
        self.TargetSlot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
        self.TargetMoney = self.GetChild("Target_Money_Value")
        if not app.ENABLE_NEW_EXCHANGE_WINDOW:
            self.TargetAcceptLight = self.GetChild("Target_Accept_Light")
            self.TargetAcceptLight.Disable()

        dlgPickMoney = uiPickMoney.PickMoneyDialog()
        dlgPickMoney.LoadDialog()
        dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney))
        dlgPickMoney.SetTitleName(localeInfo.EXCHANGE_MONEY)
        if not app.ENABLE_NEW_EXCHANGE_WINDOW:
            dlgPickMoney.SetMax(6)
        else:
            dlgPickMoney.SetMax(20)
        dlgPickMoney.Hide()
        self.dlgPickMoney = dlgPickMoney

        self.AcceptButton = self.GetChild("Owner_Accept_Button")
        self.AcceptButton.SetToggleDownEvent(
            ui.__mem_func__(self.AcceptExchange))

        if app.ENABLE_NEW_EXCHANGE_WINDOW:
            self.TargetAcceptButton = self.GetChild("Target_Accept_Button")

        self.TitleName = self.GetChild("TitleName")
        self.GetChild("TitleBar").SetCloseEvent(
            GFHhg54GHGhh45GHGH.SendExchangeExitPacket)
        if app.ENABLE_NEW_EXCHANGE_WINDOW:
            self.FaceOwnerImage = self.GetChild("FaceOwner_Image")
            self.FaceTargetImage = self.GetChild("FaceTarget_Image")
            self.TargetName = self.GetChild("target_NameText")
            self.TargetLevel = self.GetChild("target_LvText")
            self.ExchangeLogs = self.GetChild("ExchangeLogs")
            self.LogsScrollBar = ui.ThinScrollBar()
            self.LogsScrollBar.SetParent(self.ExchangeLogs)
            self.LogsScrollBar.SetPosition(442 - 75, 17)
            self.LogsScrollBar.SetScrollBarSize(50)
            self.LogsScrollBar.Show()
            self.LogsDropList = ui.ListBoxEx()
            self.LogsDropList.SetParent(self.ExchangeLogs)
            self.LogsDropList.itemHeight = 12
            self.LogsDropList.itemStep = 13
            self.LogsDropList.SetPosition(35, 27)
            self.LogsDropList.SetSize(0, 45)
            self.LogsDropList.SetScrollBar(self.LogsScrollBar)
            self.LogsDropList.SetViewItemCount(2)
            self.LogsDropList.Show()
            self.LogsScrollBar.Show()
            self.listOwnerSlot = []
            self.listTargetSlot = []