From dad0fb7f40d4cddaa110ac2e3139195a51e57a49 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sun, 27 Mar 2022 18:55:56 +0200 Subject: [PATCH] Updated Frames (& Screens) (markdown) --- Frames-(&-Screens).md | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Frames-(&-Screens).md b/Frames-(&-Screens).md index 1b028f2..7dfca47 100644 --- a/Frames-(&-Screens).md +++ b/Frames-(&-Screens).md @@ -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 \ No newline at end of file +# 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 \ No newline at end of file