Update malbert.txt

This commit is contained in:
Niko 2025-04-24 16:19:51 +03:00 committed by GitHub
parent e983c23f55
commit e84987a809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)