Format yang in K si limita scoasa pentru negot
Info:- Este functional si daca ai limita de yang scoasa si daca nu o ai
1. Intrii in uiscript / pickmoneydialog.py
cauti:
Code: Select all
"only_number" : 1,
Code: Select all
#"only_number" : 1,
cauti :
Code: Select all
self.inputValue.SetNumberMode()
Code: Select all
#self.inputValue.SetNumberMode()
Code: Select all
def SetMaxLength(self, length):
length = min(13, length)
self.inputValue.SetMax(length)
Code: Select all
def SetMaxLength(self, length):
self.inputValue.SetMax(length)
self.inputValue.SetUserMax(length)
Code: Select all
def __OnValueUpdate(self):
ui.EditLine.OnIMEUpdate(self.inputValue)
text = self.inputValue.GetText()
money = 0
if text and text.isdigit():
try:
money = long(text)
except ValueError:
money = 199999999
self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(money))
Code: Select all
def __OnValueUpdate(self):
ui.EditLine.OnIMEUpdate(self.inputValue)
text = self.inputValue.GetText()
for i in xrange(len(text)):
if not text[i].isdigit():
text=text[0:i]+text[i+1:]
self.inputValue.SetText(text)
self.moneyText.SetText(self.moneyHeaderText + localeInfo.NumberToMoneyString(text))
cauti:
Code: Select all
text = self.pickValueEditLine.GetText()
Code: Select all
text = text.replace("k", "000")
Pentru a scoate limita de yang de la negot
Intrii in uiexchange.pycauti si modifici numarul 9 cu un numar mai mare :
Code: Select all
dlgPickMoney.SetMax(9)
Code: Select all
dlgPickMoney.SetMax(20)