Jump to content

Remove Buff Affect


Recommended Posts

  • 3 months later...

update:

https://gyazo.com/60200a9b0ceb99ecc6f3f5b14048fae9

 

https://mega.nz/file/6xAl0ALZ#H2ksIzWlr8N8cWnTpqZn8ipvhw72ZdbPNRy3r2TvmFM

 

EDIT if you don't have update for class ImageBox

class ImageBox(Window):
    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)
        self.eventDict={}
        self.eventFunc = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
        self.eventArgs = {
            "MOUSE_LEFT_BUTTON_UP" : None, 
            "MOUSE_LEFT_BUTTON_DOWN" : None, 
            "MOUSE_RIGHT_BUTTON_UP" : None, 
            "MOUSE_RIGHT_BUTTON_DOWN" : None, 
            "MOUSE_OVER_IN" : None, 
            "MOUSE_OVER_OUT" : None
        }
    def __del__(self):
        Window.__del__(self)
        self.eventFunc = None
        self.eventArgs = None
    def RegisterWindow(self, layer):
        self.hWnd = wndMgr.RegisterImageBox(self, layer)
    def LoadImage(self, imageName):
        self.name=imageName
        wndMgr.LoadImage(self.hWnd, imageName)
        if len(self.eventDict)!=0:
            print "LOAD IMAGE", self, self.eventDict
    def SetAlpha(self, alpha):
        wndMgr.SetDiffuseColor(self.hWnd, 1.0, 1.0, 1.0, alpha)
        
    def SetColor(self, r, g, b, a):
        wndMgr.SetDiffuseColor(self.hWnd, r, g, b, a)    
    def GetWidth(self):
        return wndMgr.GetWidth(self.hWnd)
    def GetHeight(self):
        return wndMgr.GetHeight(self.hWnd)
        
    def SetEvent(self, func, *args) :
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = func
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SetEvent, Can`t Find has_key : %s" % args[0]
            
    def SAFE_SetEvent(self, func, *args):
        result = self.eventFunc.has_key(args[0])        
        if result :
            self.eventFunc[args[0]] = __mem_func__(func)
            self.eventArgs[args[0]] = args
        else :
            print "[ERROR] ui.py SAFE_SetEvent, Can`t Find has_key : %s" % args[0]
        
    def OnMouseLeftButtonUp(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_UP"], self.eventArgs["MOUSE_LEFT_BUTTON_UP"])
            
    def OnMouseLeftButtonDown(self):
        if self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_LEFT_BUTTON_DOWN"], self.eventArgs["MOUSE_LEFT_BUTTON_DOWN"])
    def OnMouseRightButtonUp(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_UP"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_UP"], self.eventArgs["MOUSE_RIGHT_BUTTON_UP"])
            
    def OnMouseRightButtonDown(self):
        if self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"] :
            apply(self.eventFunc["MOUSE_RIGHT_BUTTON_DOWN"], self.eventArgs["MOUSE_RIGHT_BUTTON_DOWN"])
            
    def OnMouseOverIn(self) :
        if self.eventFunc["MOUSE_OVER_IN"] :
            apply(self.eventFunc["MOUSE_OVER_IN"], self.eventArgs["MOUSE_OVER_IN"])
    def OnMouseOverOut(self) :
        if self.eventFunc["MOUSE_OVER_OUT"] :
            apply(self.eventFunc["MOUSE_OVER_OUT"], self.eventArgs["MOUSE_OVER_OUT"])
            
    def SAFE_SetStringEvent(self, event, func,isa=FALSE):
        if not isa:
            self.eventDict[event]=__mem_func__(func)
        else:
            self.eventDict[event]=func
    
    def SetOnMouseLeftButtonUpEvent(self, event, *args):
        self.eventFunc["MOUSE_LEFT_BUTTON_UP"] = event
        self.eventArgs["MOUSE_LEFT_BUTTON_UP"] = args

 

Edited by Chriss
  • Love 4
Link to post
  • 2 weeks later...
6 hours ago, 2358 said:
  1. The size of the icons does not increase when you click on it with the mouse
  2. How do I make it compatible with the conversion system ?

1 -> Just add self.SetScale(0.8,0.8) in OnMouseOverIn function, and self.SetScale(0.7, 0.7) in OnMouseOverOut function

Edited by IShungite
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Activity

    1. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    2. 1

      [HowTo] The "hello world" of metin2

    3. 1

      TRANSMUTATION WITH BLESSING SCROLL AND MAGIC STONE 100%

    4. 0

      Sash absorb bug

    5. 0

      Debug DB vanilla Core

    6. 0

      Give item after kill monster [c++]

    7. 6

      Current Peer host names...

  • Recently Browsing

    No registered users viewing this page.

Shoutbox

Shoutbox

Chatroom Rules

 

Join our Discord

A request for help = Shoutbox Ban

Be respectful & Respect the rules

 

×
×
  • 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.