Jump to content

[Python] Cannot click button when chance button position


Recommended Posts

Hi everyone,

I'am currently try to change taskbar button position. The problem is when i change button coordinates (x, y) from taskbar.py file, i cant click the button. 

This is the original position of taskbar button.

OWuP39F.jpg

 

When i change position of taskbar button, i cant click with mouse. It doesn't work anymore.

LGK8FdP.jpg

 

 

This is my taskbar.py file. I changed X and Y coordinates

{
	"name" : "button_horse",
	"type" : "button",

	"x" : SCREEN_WIDTH - 900,
	"y" : -40 + Y_ADD_POSITION,

	"tooltip_text" : "Ge�it Portal�",

	"default_image" : "icon/item/71158.tga",
	"over_image" : "icon/item/71158.tga",
	"down_image" : "icon/item/71158.tga",
},

 

my uitaskbar.py file

BUTTON_CHARACTER = 0
BUTTON_INVENTORY = 1
BUTTON_MESSENGER = 2
BUTTON_SYSTEM = 3
BUTTON_CHAT = 4
BUTTON_HORSEQUICK = 5

toggleButtonDict = {}
toggleButtonDict[TaskBar.BUTTON_CHARACTER] = self.GetChild("CharacterButton")
toggleButtonDict[TaskBar.BUTTON_INVENTORY] = self.GetChild("InventoryButton")
toggleButtonDict[TaskBar.BUTTON_MESSENGER] = self.GetChild("MessengerButton")
toggleButtonDict[TaskBar.BUTTON_SYSTEM] = self.GetChild("SystemButton")
toggleButtonDict[TaskBar.BUTTON_HORSEQUICK] = self.GetChild("button_horse")

 

interfacemodule.py

wndTaskBar = uiTaskBar.TaskBar()
wndTaskBar.LoadWindow()
self.wndTaskBar = wndTaskBar
self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_HORSEQUICK, ui.__mem_func__(self.horse_button))


def horse_button(self):
import constInfo
qid = constInfo.LOAD_QUEST_HORSE_BUTTON
event.QuestButtonClick(qid)	

 

Can anyone help me where i am doing mistake? Why i cant click the button when i change button coordinates top of the task bar? 

Thanks.

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.