提交 f94a97e9 编写于 作者: baidwwy's avatar baidwwy 🏋

GUI

上级 77ea4a13
-- @Author : GGELUA
-- @Date : 2022-04-03 14:00:28
-- @Last Modified by : baidwwy
-- @Last Modified time : 2022-04-10 06:02:45
-- @Last Modified time : 2022-04-14 23:14:43
local SDL = require 'SDL'
local GUI控件 = require('GUI.控件')
......@@ -241,7 +241,7 @@ do
if not self.是否选中 and k == self._rbtn then
self._curspr = v
end
if v.宽度 > self.宽度 or v.高度 > self.高度 then
if self.宽度 == 0 or self.高度 == 0 then
self:置宽高(v.宽度, v.高度)
end
--rawset(t, k, v)
......@@ -263,7 +263,7 @@ do
if self.是否选中 and k == self._rbtn then
self._curspr = v
end
if v.宽度 > self.宽度 or v.高度 > self.高度 then
if self.宽度 == 0 or self.高度 == 0 then
self:置宽高(v.宽度, v.高度)
end
--rawset(t, k, v)
......
-- @Author : GGELUA
-- @Date : 2022-04-03 14:00:28
-- @Last Modified by : baidwwy
-- @Last Modified time : 2022-04-10 05:58:19
-- @Last Modified time : 2022-04-14 23:35:23
local SDL = require 'SDL'
......@@ -366,8 +366,10 @@ function GUI控件:检查点(x, y)
end
function GUI控件:检查透明(x, y)
if self._spr and type(self._spr.取透明) == 'function' then
return self._spr:取透明(x, y) > 0
if self:检查点(x, y) then
if self._spr and type(self._spr.取透明) == 'function' then
return self._spr:取透明(x, y) > 0
end
end
return false
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册