Alienhead Posted May 16 Posted May 16 Why does this code always result in the wrong sizes? Should this fill to the bottom of the screen? self.size = framebuffer:GetSize() self.panel = CreatePanel(0, 0, 500, sz.y, interface.background) self.panel:SetColor(0,0,0,0.5) Quote Alienhead Components and Software
Alienhead Posted May 17 Author Posted May 17 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 Quote Alienhead Components and Software
Solution Josh Posted May 17 Solution Posted May 17 self.size = framebuffer:GetSize() self.panel = CreatePanel(0, 0, 500, sz.y, interface.background) Where is the variable sz coming from? Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Alienhead Posted May 17 Author Posted May 17 Thats a damn good question... Thanks :)> Looking at code to long today, it's all running together. Time for a break! Quote Alienhead Components and Software
Alienhead Posted May 17 Author Posted May 17 Yah not sure what I was doing, thinking or whatever.. but all is good.. I wasnt able to get any of the UI's widgets to respond.. but eventually found the problem. 1 Quote Alienhead Components and Software
Alienhead Posted May 17 Author Posted May 17 I plan to release prefab Dropper when Leadwerks 1.0 goes offical. 4 Quote Alienhead Components and Software
Recommended Posts
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.