[PY]Format yang + limita scoasa in negot

Moderators: Moderatori, Moderatori ajutători

Post Reply
User avatar
[M]Maasym.
Fondator TheXFoRce
Fondator TheXFoRce
Posts: 74
Joined: Sun May 01, 2022 11:24 pm
Status:
Detinator Steam: Da
Gaming experience: Nu spun..

[PY]Format yang + limita scoasa in negot

Post by [M]Maasym. »

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,
modifici cu:

Code: Select all

#"only_number" : 1,
2. Intrii in root / uicommon.py

cauti :

Code: Select all

self.inputValue.SetNumberMode()
modifici cu :

Code: Select all

#self.inputValue.SetNumberMode()
cauti :

Code: Select all

	def SetMaxLength(self, length):
		length = min(13, length)
		self.inputValue.SetMax(length)
modifici cu :

Code: Select all

	def SetMaxLength(self, length):
		self.inputValue.SetMax(length)
		self.inputValue.SetUserMax(length)
cauti:

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))
modifici cu :

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))
3. Intri in root / uipickmoney.py

cauti:

Code: Select all

text = self.pickValueEditLine.GetText()
adaugi sub:

Code: Select all

text = text.replace("k", "000")
Pentru a scoate limita de yang de la negot
Intrii in uiexchange.py

cauti si modifici numarul 9 cu un numar mai mare :

Code: Select all

dlgPickMoney.SetMax(9)
Exemplu: Eu am limita de yang scoasa si am 9kkkkkk yang sau ceva de genul , asa ca am modificat sa il pot da pe tot deodata in negot ca in linia de mai jos

Code: Select all

dlgPickMoney.SetMax(20)
Post Reply

Return to “Python”