Updated Frames (& Screens) (markdown)
@@ -2,28 +2,28 @@ Frames are like screens or screens are frames. Frames can be sub objects of scre
|
||||
|
||||
Here are all possible functions you can use with screens and frames:
|
||||
|
||||
#screen.new(string) -- creates a new screen object
|
||||
#frame:addFrame(string) -- creates a new frame object
|
||||
#frame:setTitle(string) -- sets the title
|
||||
#frame:setTitleAlign(string) -- sets the title alignment ("left","right","center")
|
||||
#frame:setPosition(int, int) -- changes the position relative to its parent frame
|
||||
#frame:setBackground(int) -- changes the background color
|
||||
#frame:setForeground(int) -- changes the text color
|
||||
#frame:setSize(int, int) -- changes the size (width, height)
|
||||
#frame:showBar([bool]) -- shows/hides the bar on top where you will see the title if its active (no args = true)
|
||||
#frame:isModifierActive(int or string) -- returns true if user is currently holding a key (following strings are possible: "shift","ctrl","alt"), int can be everything computercraft supports
|
||||
#frame:show() -- shows the frame on the screen
|
||||
#frame:hide() -- hides the frame
|
||||
#frame:remove() -- removes the frame completly
|
||||
#frame:getObject(string) - gets an created object (arg = id)
|
||||
#frame:removeObject(string) - removes the object with the id
|
||||
#frame:addObject(object) -- you can add a object manually, normaly you shouldn't use this function, it gets called internally
|
||||
#frame:drawObject() -- this draws the frame, you dont need that function, it gets called internally
|
||||
#frame:mouseEvent(string,int,int,int) -- internal mouse event, better don't use it, i created mouse hooks for you
|
||||
#frame:keyEvent(string,int) -- internal keyevent, better don't use it, i created key hooks for you
|
||||
#frame:changeZIndexOfObj(object, int) -- changes the z index of an object
|
||||
#frame:setFocusedElement(object) -- changes the currently focused element
|
||||
#frame:removeFocusedElement(object) -- removes the focus of the currently focused element
|
||||
#frame:getFocusedElement() -- gets the currently focused element
|
||||
#frame:getFocusEvent() -- event which gets fired when the frame gets the focus -- its more for internal usage
|
||||
#frame:setMoveable(bool) -- sets if the frame should be moveable or not (to move the frame you need to drag it on the top bar
|
||||
# screen.new(string) -- creates a new screen object
|
||||
# frame:addFrame(string) -- creates a new frame object
|
||||
# frame:setTitle(string) -- sets the title
|
||||
# frame:setTitleAlign(string) -- sets the title alignment ("left","right","center")
|
||||
# frame:setPosition(int, int) -- changes the position relative to its parent frame
|
||||
# frame:setBackground(int) -- changes the background color
|
||||
# frame:setForeground(int) -- changes the text color
|
||||
# frame:setSize(int, int) -- changes the size (width, height)
|
||||
# frame:showBar([bool]) -- shows/hides the bar on top where you will see the title if its active (no args = true)
|
||||
# frame:isModifierActive(int or string) -- returns true if user is currently holding a key (following strings are possible: "shift","ctrl","alt"), int can be everything computercraft supports
|
||||
# frame:show() -- shows the frame on the screen
|
||||
# frame:hide() -- hides the frame
|
||||
# frame:remove() -- removes the frame completly
|
||||
# frame:getObject(string) - gets an created object (arg = id)
|
||||
# frame:removeObject(string) - removes the object with the id
|
||||
# frame:addObject(object) -- you can add a object manually, normaly you shouldn't use this function, it gets called internally
|
||||
# frame:drawObject() -- this draws the frame, you dont need that function, it gets called internally
|
||||
# frame:mouseEvent(string,int,int,int) -- internal mouse event, better don't use it, i created mouse hooks for you
|
||||
# frame:keyEvent(string,int) -- internal keyevent, better don't use it, i created key hooks for you
|
||||
# frame:changeZIndexOfObj(object, int) -- changes the z index of an object
|
||||
# frame:setFocusedElement(object) -- changes the currently focused element
|
||||
# frame:removeFocusedElement(object) -- removes the focus of the currently focused element
|
||||
# frame:getFocusedElement() -- gets the currently focused element
|
||||
# frame:getFocusEvent() -- event which gets fired when the frame gets the focus -- its more for internal usage
|
||||
# frame:setMoveable(bool) -- sets if the frame should be moveable or not (to move the frame you need to drag it on the top bar
|
||||
Reference in New Issue
Block a user