Jump to content

Recommended Posts

Posted

My interface commands dont see to work no more.

I dont even get highlighting around the button when I mouseover, and hovering and or clicking on button produces no event.

Anything changed? or does my code just not work any longer?

 

 

 
            self.size = framebuffer:GetSize()
            self.panel = CreatePanel(0, 0, 500, sz.y, interface.background)
            self.panel:SetColor(0,0,0,0.5)
 
            -- title image
            self.title = CreatePanel(15,10,500,100,self.panel)
            local pixmap = LoadPixmap("Source/Components/AH_XtremeBiomes/Ui/title.png")
            self.title:SetColor(255,255,255,0)
            self.title:SetPixmap(pixmap)
 
            local x = 150
            local y = 200
            self.button1 = CreateButton("Button", x, y, 150, 50, self.panel)
            self.button1:SetFontScale(2)
        end
 
    --@# UI Monitoring
    local ev = nil
    local pos = window:GetMousePosition()

 

    while (PeekEvent()) do


 
        ev = WaitEvent()
        if (ev.id == EVENT_WINDOWCLOSE and ev.source == window) then
            return 0
        else
 
           --- Button 1
            if ev.source == self.button1 then
                log("here")
            end
 
        end
    end
 
 
 
 
    end
  • Solution
Posted
self.size = framebuffer:GetSize()
self.panel = CreatePanel(0, 0, 500, sz.y, interface.background) 

Where is the variable sz coming from?

Let's build cool stuff and have fun. :)

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.   Paste as plain text instead

  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.

×
×
  • Create New...