I made button thing with GUI api

local b1 = engine.construct("guiButton",engine.interface,{

backgroundColour = colour:fromRGB(255,0,0),
size = guiCoord(0.029, 0,0.065, 0),
position = guiCoord(0.884, 0,0.069, 0),

})

local b2 = engine.construct(“guiButton”,engine.interface,{

backgroundColour = colour:fromRGB(0,255,0),
size = guiCoord(0.029, 0,0.065, 0),
position = guiCoord(0.843, 0,0.15, 0),

})

local b3 = engine.construct(“guiButton”,engine.interface,{

backgroundColour = colour:fromRGB(0,0,255),
size = guiCoord(0.029, 0,0.065, 0),
position = guiCoord(0.924, 0,0.15, 0),

})

local b4 = engine.construct(“guiButton”,engine.interface,{

backgroundColour = colour:fromRGB(255,255,0),
size = guiCoord(0.029, 0,0.065, 0),
position = guiCoord(0.884, 0,0.232, 0),

})

local f1 = engine.construct(“guiFrame”,engine.interface,{
backgroundColour = colour:fromRGB(0,255,0),
size = guiCoord(0.10, 0,0.10, 0),
position = guiCoord(0.5, 0,0.5, 0),
})

b1:mouseLeftPressed(function()
f1.position = f1.position - guiCoord(0, 0,0.1, 0)
end)

b2:mouseLeftPressed(function()
f1.position = f1.position - guiCoord(0.1,0,0,0)
end)

b3:mouseLeftPressed(function()
f1.position = f1.position + guiCoord(0.1,0,0,0)
end)

b4:mouseLeftPressed(function()
f1.position = f1.position + guiCoord(0, 0,0.1, 0)
end)

2 Likes

Looking great! TevX is coming very soon and will make sharing stuff like this really easy!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.