Jump to content

Noa

Inactive Member
  • Posts

    14
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Noa

  1. thanks for noting...

     

    SetEvent is a func on Button class, so i can't use it for images

     

    othe thinks can not be a part of parent from ui.Button but images.

     

    it is not a bad idea as you say that all depends on what you want to do with it

     

    I have solved it on the same day, i know there a other function that allow to show onin an onout

     

    add ui  on class ImageBox 

     

    this function

    	def OnMouseLeftButtonDown(self):
    		try:
    			self.eventDict["MOUSE_BUTTON_DOWN"]()
    		except KeyError:
    			pass
    

    This is the use func

    def CreateImageButton(self,parent,x,y):
    	self.image = ui.Imagebox()
    	self.image.SetParent(parent)
    	self.image.SetPosition(x,y)
    	self.image.LoadImage("d:/ymir work/ui/public/Test_button_01.sub")
    	self.image.SAFE_SetStringEvent("MOUSE_OVER_IN",self.OverOutImage)
    	self.image.SAFE_SetStringEvent("MOUSE_OVER_IN",self.OverInImage)
    	self.image.SAFE_SetStringEvent("MOUSE_BUTTON_DOWN",self.PushImage)
    	self.image.Show()
    	return self.image
    
    def OverOutImage(self):
    	self.image.Hide()
    	self.image.LoadImage("d:/ymir work/ui/public/Test_button_01.sub")
    	self.image.Show()
    
    def OverInImage(self):
    	self.image.Hide()
    	self.image.Loadimage("d:/ymir work/ui/public/Test_button_02.sub")
    	self.image.Show()
    
    #Push & normal effect
    def PushImage(self):
    	self.image.Hide()
    	self.image.Loadimage("d:/ymir work/ui/public/Test_button_03.sub")
    	self.image.Show()
    	self.image.Hide()
    	self.image.LoadImage("d:/ymir work/ui/public/Test_button_01.sub")
    	self.image.Show()
    	# what happen when push func
    
  2. hey, first happy new year.

     

    i create this board and this fake button https://metin2.download/picture/Lu1Pm8avlf15kKe09R393UcqQu3y3Svg/.png

    it's a Imagebox, my problem ist to give a click function 

     

    there are this func onMouseLeftButtonUpEvent but it works only on window wndMgr

     

    so there ar other click event functions on images ?

    • Metin2 Dev 1
  3. self.List  = [
    	self.comp.Button(self.Board, 'Button', '', 440, 223, self.fatk_func, 'd:/ymir work/ui/public/large_button_01.sub', 'd:/ymir work/ui/public/large_button_02.sub', 'd:/ymir work/ui/public/large_button_03.sub')
    ]
    def OnUpdate(self):
    	for i in self.List:
    		if self.i.IsIn():
    

    why self.i.IsIn() doesn't work and what kind solution exist?

     

    syserr:

     

    1130 15:30:06256 :: if self.i.IsIn():
    1130 15:30:06256 :: AttributeError
    1130 15:30:06256 :: 'Show' object has no attribute 'i'
  4. Hello everybody, iam still trying to create a tooltip on my board, its not apear when my mouse is over a button.

     

    code:

    	def OnUpdate(self):
    		global ToolTipShowIn
    		self.KrSkill = uiToolTip.SkillToolTip()
    		if self.fatk.IsIn():
    			if ToolTipShowIn==0:
    				ToolTipShowIn = 1
    				self.fatk.SetSkillToolTip(self.KrSkill)
    		else:
    			if ToolTipShowIn==1:
    				ToolTipShowIn = 0
    				self.KrSkill.Hide()
    

    syserr:

    1128 23:35:23364 :: self.fatk.SetSkillToolTip(self.KrSkill)
    1128 23:35:23364 :: AttributeError
    1128 23:35:23364 :: 'Button' object has no attribute 'SetSkillToolTip'
    
×
×
  • 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.