Update malbert.txt
This commit is contained in:
parent
e983c23f55
commit
e84987a809
1 changed files with 27 additions and 1 deletions
28
malbert.txt
28
malbert.txt
|
|
@ -104,8 +104,30 @@ if CLIENT then
|
|||
local f1 = malbert:getScale()[1]
|
||||
local f2 = malbert:getScale()[2]
|
||||
local h = 0
|
||||
local MOUSE_DOWN = false
|
||||
local CLEAR = false
|
||||
local col = Color(h,255,255)
|
||||
|
||||
hook.add("InputPressed","MOUSE_DOWN",function(a)
|
||||
if a == MOUSE.MOUSE1 then
|
||||
MOUSE_DOWN = true
|
||||
end
|
||||
|
||||
if a == MOUSE.MOUSE2 then
|
||||
CLEAR = true
|
||||
end
|
||||
end)
|
||||
|
||||
hook.add("InputReleased","MOUSE_DOWN",function(a)
|
||||
if a == MOUSE.MOUSE1 then
|
||||
MOUSE_DOWN = false
|
||||
end
|
||||
|
||||
if a == MOUSE.MOUSE2 then
|
||||
CLEAR = false
|
||||
end
|
||||
end)
|
||||
|
||||
hook.add("RenderOffscreen","test",function()
|
||||
local now = timer.systime()
|
||||
if next_frame > now then return end
|
||||
|
|
@ -113,13 +135,17 @@ if CLIENT then
|
|||
|
||||
render.selectRenderTarget("screenRT")
|
||||
|
||||
if CLEAR then
|
||||
render.clear()
|
||||
end
|
||||
|
||||
local x,y = getCursor()
|
||||
|
||||
render.setColor(col)
|
||||
|
||||
render.drawRect(0,0,180,60)
|
||||
|
||||
if input.isMouseDown(MOUSE.MOUSE1) then
|
||||
if MOUSE_DOWN then
|
||||
render.drawRoundedBox(180,x-8*f1,y-8*f2,16*f1,16*f2)
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue