Example #1
0
    def Open(self, maxValue, unitValue=1):

        if localeInfo.IsYMIR() or localeInfo.IsCHEONMA(
        ) or localeInfo.IsHONGKONG():
            unitValue = ""

        width = self.GetWidth()
        (mouseX, mouseY) = wndMgr.GetMousePosition()

        if mouseX + width / 2 > wndMgr.GetScreenWidth():
            xPos = wndMgr.GetScreenWidth() - width
        elif mouseX - width / 2 < 0:
            xPos = 0
        else:
            xPos = mouseX - width / 2

        self.SetPosition(xPos, mouseY - self.GetHeight() - 20)

        if localeInfo.IsARABIC():
            self.maxValueTextLine.SetText("/" + str(maxValue))
        else:
            self.maxValueTextLine.SetText(" / " + str(maxValue))

        self.pickValueEditLine.SetText(str(unitValue))
        self.pickValueEditLine.SetFocus()

        ime.SetCursorPosition(1)

        self.unitValue = unitValue
        self.maxValue = maxValue
        self.Show()
        self.SetTop()
Example #2
0
	def ClickRadioButton(self, bType):
		for eachButton in self.GetObject('main','buttonList'):
			eachButton.SetUp()

		self.selectType = bType
		self.GetObject('main','buttonList')[bType].Down()
		self.GetObject('main','text_value').SetText(self.GetObjectConverted(bType))
		
		ime.SetCursorPosition(len(self.GetObject('main','text_value').GetText()) + 1)
    def Open(self, player_name):
        global gplayer_name
        gplayer_name = player_name
        self.SetCenterPosition()
        self.hourValueEditLine.SetFocus()

        ime.SetCursorPosition(1)
        self.Show()
        self.SetTop()
Example #4
0
 def _OnSetFocus(self):
     ime.SetText(self.GetText())
     ime.SetMax(self.GetMax())
     ime.SetUserMax(self.GetUserMax())
     ime.SetCursorPosition(-1)
     if self.IsNumberMode():
         ime.SetNumberMode()
     else:
         ime.SetStringMode()
     ime.EnableCaptureInput()
     if self.IsUseIME():
         ime.EnableIME()
     else:
         ime.DisableIME()
     wndMgr.ShowCursor(self.GetWindowHandle())
Example #5
0
	def Open(self, maxValue, unitValue=1):
		width = self.GetWidth()
		(mouseX, mouseY) = wndMgr.GetMousePosition()

		if mouseX + width/2 > wndMgr.GetScreenWidth():
			xPos = wndMgr.GetScreenWidth() - width
		elif mouseX - width/2 < 0:
			xPos = 0
		else:
			xPos = mouseX - width/2

		self.SetPosition(xPos, mouseY - self.GetHeight() - 20)

		self.maxValueTextLine.SetText(" / " + str(localeInfo.AddPointToNumberString(maxValue)))

		self.pickValueEditLine.SetText(str(unitValue))
		self.pickValueEditLine.SetFocus()

		ime.SetCursorPosition(1)

		self.unitValue = unitValue
		self.maxValue = maxValue
		self.Show()
		self.SetTop()
Example #6
0
 def SetValue(self, value):
     value = str(value)
     self.inputValue.SetText(value)
     self.__OnValueUpdate()
     ime.SetCursorPosition(len(value))
Example #7
0
		def MoveCursor(text):
			ime.SetCursorPosition(len(text) + 1)
Example #8
0
    def _OnMouseLeftButtonDown(self):
        if not self.IsIn():
            return

        self.SetFocus()
        ime.SetCursorPosition(wndMgr.GetCursorPosition(self.GetWindowHandle()))