Code: Select all
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function gadget:GetInfo()
return {
name = "Button",
desc = "It's a button",
author = "Das Bruce",
date = "2009-07-01",
license = "Public Domain",
layer = 1,
enabled = true
}
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local viewx=0
local viewy=0
local width=100
local height=100
local blx=200
local bly=200
if (gadgetHandler:IsSyncedCode()) then
function gadget:DrawScreen(viewx,viewy)
gl.PushMatrix()
gl.Translate(blx, bly, 0)
gl.Color( 1, 1, 1)
gl.Texture(":n:bitmaps/UI/button.png")
gl.TexRect(0, 0, width, height)
gl.Texture(false)
gl.PopMatrix()
end
end