Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setMonitorSide(side)
- Sets the side the monitor is on. This is required before calling any of the other functions
- Required arguments:
- Side Side the monitor is on. (string)
- Optional arguments:
- N/A
- Returns
- N/A
- addButton(x,y,width,height,text,function,toggle,relative,idleColor,activeColor,textColor)
- This functions adds a button to the monitor
- Required arguments:
- X The x position of the left top corner of the button. (float)
- Y The y position of the left top corner of the button. (float)
- Width The width of the button. (float)
- Height The height of the button. (float)
- Text The text you want to be displayed on the button. (string)
- Function The function you want to call when the button is clicked. (function)
- Optional arguments:
- Toggle If this is set to true the button will be toggled when clicked (Boolean)
- Relative If this is set to true the x,y,width and height variable will be made relative to the screen size. Meaning an x of 0.2 would set the button at 0.2 of the entire screen width. (Boolean)
- IdleColor The color of the button when not activated. (color) (Will use default when not specified)
- ActiveColor The color of the button when activated. (color) (Will use default when not specified)
- TextColor The color of the text on the button. (color) (Will use default when not specified)
- Returns
- The function returns a button id (float)
- The function returns false when not all arguments were specified, or no monitor was assigned.
- removeButton(buttonID)
- This function removes a button from the monitor
- Required arguments:
- buttonID The ID of the button (float)
- Optional arguments:
- N/A
- Returns
- Returns true when successfully removed.
- Returns false when not successfully removed.
- getButtonInfo(buttonID)
- Required arguments:
- buttonID The ID of the button (float)
- Optional arguments:
- N/A
- Returns
- Returns a table of all information about that button. Prints this when in debug mode.
- Returns false when not successful.
- setButtonInfo(buttonID,infoID,info)
- This function sets info on buttons, what info there is available can be found by using getButtonInfo()
- Required arguments:
- buttonID The ID of the button (float)
- infoID The key that the info is saved on. (string)
- info The info to be set to (any)
- Optional arguments:
- N/A
- Returns
- Returns true when sucessful
- Returns false when not successful
- run ()
- This function checks for clicks on the screen, and runs the function respectable to that button.
- Required arguments:
- N/A
- Optional arguments:
- N/A
- Returns
- N/A
- setDebugMode(bool)
- Sets whether debug mode is activated, if it is activated it will print errors.
- Required arguments:
- Bool true to activate debug mode, false to deactivate. (Boolean)
- Optional arguments:
- Returns
- setIdleColor (color)
- Required arguments:
- Color color for the idle background of the button (color)
- Optional arguments:
- N/A
- Returns
- N/A
- setActiveColor(color)
- Required arguments:
- Color color for the active background of the button (color)
- Optional arguments:
- N/A
- Returns
- N/A
- setBackgroundColor(color)
- Required arguments:
- Color color for the idle background of the monitor (color)
- Optional arguments:
- N/A
- Returns
- N/A
- setTextColor(color)
- Required arguments:
- Color color for the text of the button (color)
- Optional arguments:
- N/A
- Returns
- N/A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement