diff options
| author | ruki <[email protected]> | 2018-01-13 00:28:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-12 20:53:47 +0800 |
| commit | bcb58d536cb131be4358d8893cfd1db77f72d942 (patch) | |
| tree | dc283ebaf56f2f6f8555f0c030275dd17ed9c024 /xmake/core/ui/rect.lua | |
| parent | 5d8d758fa2fb4a8e9691dae010b97725c6b736c0 (diff) | |
add box dialog
Diffstat (limited to 'xmake/core/ui/rect.lua')
| -rw-r--r-- | xmake/core/ui/rect.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/ui/rect.lua b/xmake/core/ui/rect.lua index c10d54377..4e91ff702 100644 --- a/xmake/core/ui/rect.lua +++ b/xmake/core/ui/rect.lua @@ -45,6 +45,12 @@ function rect:size() return point { self.ex - self.sx, self.ey - self.sy } end +-- resize rect +function rect:resize(w, h) + self.ex = self.sx + w + self.ey = self.sy + h +end + -- move rect function rect:move(dx, dy) self.sx = self.sx + dx |
