EveryOS, on 23 April 2018 - 11:35 AM, said:
im busy and to be honest I have not received a message from you. try re-sending it.
There have been 13 items by RR_DEADPOOL (Search limited from 10-February 22)
Posted by
RR_DEADPOOL
on 24 April 2018 - 11:41 PM
in
General
Posted by
RR_DEADPOOL
on 22 April 2018 - 02:46 AM
in
General
Jummit, on 17 April 2018 - 05:39 PM, said:
CLNinja, on 17 April 2018 - 01:21 AM, said:
Luca_S, on 12 April 2018 - 08:08 PM, said:
Posted by
RR_DEADPOOL
on 12 April 2018 - 06:03 PM
in
Suggestions
apemanzilla, on 11 April 2018 - 10:55 PM, said:
RR_DEADPOOL, on 09 April 2018 - 05:37 AM, said:
Posted by
RR_DEADPOOL
on 12 April 2018 - 06:02 PM
in
General
Lupus590, on 12 April 2018 - 05:54 PM, said:
Saldor010, on 12 April 2018 - 03:04 PM, said:
KingofGamesYami, on 12 April 2018 - 04:53 PM, said:
Posted by
RR_DEADPOOL
on 12 April 2018 - 02:07 PM
in
General
Posted by
RR_DEADPOOL
on 09 April 2018 - 08:08 AM
in
APIs and Utilities
Posted by
RR_DEADPOOL
on 09 April 2018 - 07:06 AM
in
Ask a Pro
Jummit, on 09 April 2018 - 06:51 AM, said:
RR_DEADPOOL, on 09 April 2018 - 06:30 AM, said:
Jummit, on 06 April 2018 - 01:21 PM, said:
--# function to make a new button, takes x, y, w, h and func and returns button
local function newButton(x, y, w, h, func)
return {
x=x,y=y,w=w,h=h,func=func,
draw = function(self)
--# use the paintutils api to draw a box
paintutils.drawFilledBox(self.x, self.y, self.x+self.w-1, self.y+self.h-1, colors.lightBlue)
end,
update = function(self, mouseX, mouseY)
if mouseX>=self.x and mouseY>=self.y and mouseX<self.x+self.w and mouseY<self.y+self.h then
self.func()
end
end
end
--# make a new button
local button = newButton(10, 10, 10, 5, function()
print("pressed")
end)
--# draw button
button:draw()
--# get events once again
local event, mouseButton, mouseX, mouseYos.pullEvent("mouse_click")
button:update(mouseX, mouseY)
Posted by
RR_DEADPOOL
on 09 April 2018 - 06:30 AM
in
Ask a Pro
Jummit, on 06 April 2018 - 01:21 PM, said:
RR_DEADPOOL, on 06 April 2018 - 12:14 PM, said:
--# make a new button
local button = {
x = 10, y = 10, w = 10, h = 5, func = function()
--# we call this function when the button is clicked
print("button clicked")
end
}
--# waits until mouse is pressed and gets data about the click
local event, mouseButton, mouseX, mouseY = os.pullEvent("mouse_click")
--# check if our button is clicked
if mouseX>=button.x and mouseY>=button.y then
# mouse was clicked right and below the button
if mouseX<button.x+button.w and mouseY<button.y+button.h then
--# mouse was clicked left and above the bottom right corner of the button
--# run the button function
button.func()
end
end
--# function to make a new button, takes x, y, w, h and func and returns button
local function newButton(x, y, w, h, func)
return {
x=x,y=y,w=w,h=h,func=func,
draw = function(self)
--# use the paintutils api to draw a box
paintutils.drawFilledBox(self.x, self.y, self.x+self.w-1, self.y+self.h-1, colors.lightBlue)
end,
update = function(self, mouseX, mouseY)
if mouseX>=self.x and mouseY>=self.y and mouseX<self.x+self.w and mouseY<self.y+self.h then
self.func()
end
end
end
--# make a new button
local button = newButton(10, 10, 10, 5, function()
print("pressed")
end)
--# draw button
button:draw()
--# get events once again
local event, mouseButton, mouseX, mouseYos.pullEvent("mouse_click")
button:update(mouseX, mouseY)
Posted by
RR_DEADPOOL
on 09 April 2018 - 05:37 AM
in
Suggestions
Posted by
RR_DEADPOOL
on 06 April 2018 - 12:25 PM
in
Ask a Pro
Posted by
RR_DEADPOOL
on 06 April 2018 - 12:14 PM
in
Ask a Pro
Posted by
RR_DEADPOOL
on 04 April 2018 - 02:38 AM
in
General
Posted by
RR_DEADPOOL
on 03 April 2018 - 04:00 PM
in
General
