From e700045c4765ae047fabdd69cd42260255674705 Mon Sep 17 00:00:00 2001 From: Neckrat Date: Thu, 21 Aug 2025 22:42:53 +0300 Subject: [PATCH] pryamougolnique help Co-authored-by: Ivan Yuriev --- lib/ui/layout.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ui/layout.lua b/lib/ui/layout.lua index 554df3e..537d14b 100644 --- a/lib/ui/layout.lua +++ b/lib/ui/layout.lua @@ -1,5 +1,6 @@ local Vec3 = require "lib.utils.vec3" local ui = require "lib.ui.core" +local controls = require "lib.controls" --- @type Rectangle local ReactiveRectangle = ui.Rectangle { @@ -14,6 +15,9 @@ function ReactiveRectangle:update(dt) if mx > self.origin.x and mx < self.origin.x + self.size.x and my > self.origin.y and my < self.origin.y + self.size.y then + if controls:isJustPressed("select") then + controls:consume("select") + end self.color = { 0, 1, 0 } else self.color = { 1, 0, 0 }