[Request]Buton switchbot in inventar.

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
F4NTOM4
Nivel 2

Nivel 2
Mesaje: 158
Membru din: 23 Aug 2014, 00:16
Server: BlackMt2Story
Regat: Jinno
Aprecieri: 33  
Mulţumiri: 11  
 Contact:
Medalii

Salut , Am facut mai multe butoane care sa ruleze questurile din server dar cum fac un buton care sa imi ruleze switchbot.py
Aici ma refer la switchbot by mijago.
inventorywindow.py
{
				"name" : "Switchbot",
				"type" : "button",

				"x" : 169,
				"y" : 37,

				"tooltip_text" : "Schimba bonus",
							
				"default_image" : "locale/es/ui/switcher1.tga",
				"over_image" : "locale/es/ui/switcher2.tga",
				"down_image" : "locale/es/ui/switcher2.tga",                    
				},
Astea sunt functiile care le am in game.py dar este pe buton tastatura..
from switchbot import Bot

self.switchbot = Bot()
self.switchbot.Hide()

onPressKeyDict[app.DIK_F6] = lambda : self.__toggleSwitchbot()


	def __toggleSwitchbot(self):
		if self.switchbot.bot_shown == 1:
			self.switchbot.Hide()
		else:
			self.switchbot.Show()
Ce trebuie sa adaug in uiinventory ?
Imagine
Afișează semnătura
Avatar utilizator
ManiacRobert
Developer

Developer
Mesaje: 1526
Membru din: 09 Dec 2013, 09:51
Server: Canary-World
Regat: Shinsoo
Aprecieri: 310  
Mulţumiri: 687  
Discord: Copiază ID
 Contact:
Medalii

game.py


Sus de tot
from switchbot import Bot
Căutăm
self.playerGauge = uiPlayerGauge.PlayerGauge(self)
		self.playerGauge.Hide()
Sub
self.switchbot = Bot()
		self.switchbot.Hide()
Sub
self.__ServerCommand_Build()
		self.__ProcessPreservedServerCommand()
Add
self.switchbot = Bot()
		self.switchbot.Hide()

Sub
self.quickSlotPageIndex = 0
Add
self.switchbot = Bot()
		self.switchbot.Hide()
Sub
if self.interface:
			self.interface.HideAllWindows()
			self.interface.Close()
			self.interface=None
Add
if self.switchbot:
			self.switchbot.Hide()
Sub
if self.enableXMasBoom:
			self.__XMasBoom_Update()
Add
if constInfo.SWITCHBOT == 1:
			if self.switchbot.bot_shown == 1:
				self.switchbot.Hide()
			else:
				self.switchbot.Show()
			constInfo.SWITCHBOT = 0
Constinfo
SWITCHBOT = 0
Uiiinventory.py
def ClickCostumeButton(self):
		print "Click Costume Button"
		if self.wndCostume:
			if self.wndCostume.IsShow(): 
				self.wndCostume.Hide()
			else:
				self.wndCostume.Show()
		else:
			self.wndCostume = CostumeWindow(self)
			self.wndCostume.Show()
Add
def ClickSchimbaItem(self):
		constInfo.SWITCHBOT = 1
self.SchimbaItem = self.GetChild2("SchimbaItem")
if self.SchimbaItem:
			self.SchimbaItem.SetEvent(ui.__mem_func__(self.ClickSchimbaItem))
Imagine
Imagine
Imagine
Imagine
Afișează semnătura
Avatar utilizator
Yahiko
Membru Club

Membru Club
Mesaje: 3865
Membru din: 25 Mai 2015, 18:31
Aprecieri: 0
Mulţumiri: 4857  
Discord: Copiază ID
 Contact:
Medalii

Subiect inactiv de mai bine de 3 zile. Arhivat.
*Contact Discord: Yahiko#2936
*Doar SMS: 0749592613
*Grup discord: Click
Cu stimă,
Yahiko.

GL & HF
Afișează semnătura
Închis
Răspunsuri
2
Vizualizări
2137
Răspunsuri
3
Vizualizări
615
Răspunsuri
2
Vizualizări
296

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Bing [Bot], Google [Bot] și 225 vizitatori