From 2b1627d2a06414ece6fc6808ff8d8a9fbab367b4 Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Tue, 7 Jan 2014 20:06:51 -0500 Subject: [PATCH] Add frame min/max size methods --- changelog.txt | 10 ++++++ objects/frame.lua | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/changelog.txt b/changelog.txt index e884e88..c2042a5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,16 @@ Version 0.9.7 - Alpha (Release Date TBD) ================================================ [ADDED] a new base method: textinput(text) +[ADDED] a new frame method: SetResizable(bool) +[ADDED] a new frame method: GetResizable() +[ADDED] a new frame method: SetMinWidth(width) +[ADDED] a new frame method: GetMinWidth() +[ADDED] a new frame method: SetMaxWidth(width) +[ADDED] a new frame method: GetMaxWidth() +[ADDED] a new frame method: SetMinHeight(height) +[ADDED] a new frame method: GetMinHeight() +[ADDED] a new frame method: SetMaxHeight(height) +[ADDED] a new frame method: GetMaxHeight() [ADDED] a new progressbar method: SetText(text) [ADDED] a new progressbar method: GetText() [ADDED] a new tabs method: SetButtonAreaX(x) diff --git a/objects/frame.lua b/objects/frame.lua index f14f160..3bc0df9 100644 --- a/objects/frame.lua +++ b/objects/frame.lua @@ -965,4 +965,84 @@ function newobject:GetResizable() return self.canresize +end + +--[[--------------------------------------------------------- + - func: SetMinWidth(width) + - desc: sets the object's minimum width +--]]--------------------------------------------------------- +function newobject:SetMinWidth(width) + + self.minwidth = width + +end + +--[[--------------------------------------------------------- + - func: GetMinWidth() + - desc: gets the object's minimum width +--]]--------------------------------------------------------- +function newobject:GetMinWidth() + + return self.minwidth + +end + +--[[--------------------------------------------------------- + - func: SetMaxWidth(width) + - desc: sets the object's maximum width +--]]--------------------------------------------------------- +function newobject:SetMaxWidth(width) + + self.maxwidth = width + +end + +--[[--------------------------------------------------------- + - func: GetMaxWidth() + - desc: gets the object's maximum width +--]]--------------------------------------------------------- +function newobject:GetMaxWidth() + + return self.maxwidth + +end + +--[[--------------------------------------------------------- + - func: SetMinHeight(height) + - desc: sets the object's minimum height +--]]--------------------------------------------------------- +function newobject:SetMinHeight(height) + + self.minheight = height + +end + +--[[--------------------------------------------------------- + - func: GetMinHeight() + - desc: gets the object's minimum height +--]]--------------------------------------------------------- +function newobject:GetMinHeight() + + return self.minheight + +end + +--[[--------------------------------------------------------- + - func: SetMaxHeight(height) + - desc: sets the object's maximum height +--]]--------------------------------------------------------- +function newobject:SetMaxHeight(height) + + self.maxheight = height + +end + +--[[--------------------------------------------------------- + - func: GetMaxHeight() + - desc: gets the object's maximum height +--]]--------------------------------------------------------- +function newobject:GetMaxHeight() + + return self.maxheight + end \ No newline at end of file