Plugins - Documentation



Required Functions


Function Inputs Outputs
IPlugin.Name Nothing Plugin Name as string
This functions outputs the Plugin name.
Function Inputs Outputs
IPlugin.Display Nothing The display the plugin belongs to, as String
This functions outputs the Display required for this plugin, only use "lcdsys" as output
Function Inputs Outputs
IPlugin.Description Nothing The description of the Plugin, as String
This functions outputs the Description of the plugin for the user to see when enabling/disabling the plugin
Function Inputs Outputs
IPlugin.CallBack method as String Reply as Hashtable
This functions outputs the Plugin name.
Function Inputs Outputs
IPlugin.ComboBoxes Nothing ComboBoxes as Hashtable
This functions creates custom ComboBoxes for the plugin to use.

The output is a Hashtable.
The value of each hashtable will be another Hashtable with two options, one for the ComboValue and one for the ComboTitle

Hashtable - One entry per ComboBox
Param 1 Option Name This is the Name you will use to call this ComboBox
Param 2 HashTable - List of Options This is the list of options the ComboBox will have
 
HashTable - List of options of the ComboBox
Param 1 Option-Value This defines the value the option will have, you will read this.
Param 2 Option-Title This defines the title the user will see for this option

 

Function Inputs Outputs
IPlugin.AvailableSensors pluginOptions As Hashtable ElementsAvailable as Hashtable
This functions creates the list of available elements to display on the OnWindows and WhileGaming tab.
This is called every time the user enters those tabs.

Hashtable - One Entry per Element
Param 1 Element Name This is the Name you will use for this Element
Param 2 Element Title This is the Title the user will see for this Element

 

Function Inputs Outputs
IPlugin.PluginOptionsDefault Nothing PluginDefaultOptions as Hashtable
This functions defines the default options of your plugin.

The output is a Hashtable.
The value of each hashtable will be another Hashtable with two options, one for the ComboValue and one for the ComboTitle

Hashtable - One entry per Option
Param 1 Option Name This is the Name of the Option
Param 2 Option Value This is the default value of the Option

 

Function Inputs Outputs
IPlugin.PluginOptions pluginCurrentOptions as Hasht... PluginOptions as Hashtable
This functions creates the Plugin Options the user will see when enabling/disabling the plugin


Hashtable - One entry per Option
Param 1 Input Type This is the input type to use, text or a ComboBox
Param 2 Title This is the title the user will see for this option
Param 3 Variable This is the variable name you will use to read this value

 

Function Inputs Outputs
IPlugin.CreateOptions sensorId As String,
elementData As Hashtable
ElementOptions as Hashtable
This functions creates the options the elements will have when clicking on them.

It is called every time an element of the plugin is clicked on.

Hashtable - One entry per Element
Param 1 Index An unused Index
Param 2 ArrayList - Element Options This is the list of options the element will have
 
ArrayList {4} - List of options
Param 1 Input Type This is the input type to use, text or a ComboBox
Param 2 Title This is the title the user will see for this option
Param 3 Variable This is the variable name you will use to read this value
Param 4 Help/Description This is the help/description that will apear when selecting this option

 

Function Inputs Outputs
IPlugin.SetDefaultOptions sensorId As String,
elementData As Hashtable
ElementDefaulOptions as Hashtable
This function returns the default options for the element

Hashtable - Contains all the options values
Param 1 Option Variable This is the variable name of the option
Param 2 Option Value This is the value the option will have

IMPORTANT: Always define the variable "width" and "height" or the element will not be displayed on the screen.

Function Inputs Outputs
IPlugin.DisplayOnLCD sensorId As String,
elementData As Hashtable, pluginOptions As Hashtable, cacheRuns As Integer
Commands as ArrayList
This function draws on the screen.

It returns an ArrayList of ArrayList, each Inner-Array List contains:

ArrayList - One entry per Command
Param 1 Command as String The command name to be executed
Param 2-10 Varies depending on Command Varies depending on command

 


Available ComboBoxes for Configurations/Options


Name Title Description
Text A regular Text-Box This is a text box in which the user can write text
Combo3 Enabled/Disabled ComboBox Enabled: 0
Disabled: 1
Sensors List of available Sensors The user will have a list of available sensors on GOverlay, the value will be the sensor TAG
ColorBasic List of Basic Colors The user will have a list of basic colors, this is for use with Regular-Text font. The value is an integer from 0 to 60
ColorRGB List of RGB Basic Colors The user will have a list of basic RGB Colors and can also pick a custom RGB Color. The value is a RGB565 integer.
ComboOnOf On/Off ComboBox Disabled: Disabled
Enabled: Enabled
ComboYesNo Yes/No ComboBox Yes: Yes
No: No
TextSize List of Text-Size for Square-Text Extra Small=4, Very Small=5, Small=10, Normal=15, Big=20, Very Big=30, Extreme=40
FontStyle2 List of Fonts including Square+IMG Regular Font=0
Square Font=1
Numbers Font 1=2
Numbers Font 2=3
Numbers Font 3=4
Numbers Font 4=5
Orientation Horizontal/Vertical Horizontal=0, Vertical=1
Your custom ComboBox You can use your custom created ComboBox

Input Variables used in functions


Name Title Description
sensorId Provides the Element ID This String gives you the ID of your element, you might created a couple of elements on your plugin so goverlay will tell you thru this string what element performs the action.
elementData Provides the element Data This Hashtable provides all the configuration of the element, by default it has:
x: Represents the X position on the screen.
y: Represents the Y position on the screen.
width: Has the width of the element
height: Has the height of the element.
All your elementConfigurations will appear here.
pluginOptions Provides the Plugin Options This Hashtable provides all the configuration of your plugin and other plugins.
Try to always use a unique name so other plugins wont replace your variables.
cacheRuns Number of Cache Runs This Integer has the number or times the drawing happened, this will reset to zero every time this number reachs the MaximumCache setting. So every time this value is 0, you should re-draw everything except background images, otherwise, only draw what has changed to avoid over-use of the LCD processor.

Draw Commands


Name Title
text Draws text using the regular font

Example:
commandList.Add(New ArrayList({"text", x, y, "Test Number " & testvar, 0, False, False, 0, 0}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 x Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 3 y Position Integer The Y position on the screen as integer, from 0 to 240
Param 4 Text String The text to display
Param 5 Reserved Width Integer If you first write an "A", then write "AB" and then write again "A",  you will still see "AB" on the screen, this is because the pixels are not cleared from the screen.
To solve this issue, you can reserve an amount of space on the screen, think it as drawing a space, so you would draw "A" and then "AB" and then "A " (with that space) so it would only show "A", to make it work like this without the need of manually write spaces, just set the maximum width and that part will be cleared and no text will draw beyond that.
Param 6 Unused Boolean set as False
Param 7 Unused Boolean set as False
Param 8 Unused Integer set as 0
Param 9 Color Integer This is the color of the text, integer from 0 to 60, you can get the list of colors with the combobox BasicColors

 
text_square Draws text using a font made with lines

Example:
commandList.Add(New ArrayList({"text_square", "Square Font", 0, 50, 10, 10 * 2, 3, convertcolorto16bit(153, 23, 36)}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 Text String The text to display
Param 3 x Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 4 y Position Integer The Y position on the screen as integer, from 0 to 240
Param 5 Width Integer The width of the characters
Param 5 Height Integer The height of the characters, usually twice the width
Param 6 Spacing Integer The space between characters
Param 7 RGBColor Integer RGB565 Color

 
text_image Draws text using a font made with images (numeric only)

Example:
commandList.Add(New ArrayList({"text_image", 0, 100, "12345", 3}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 x Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 3 y Position Integer The Y position on the screen as integer, from 0 to 240
Param 4 Text String Text to display, it only supports numbers, dots and ":", make sure to output as string, if its a number use .ToString()
Param 5 Font-Number Integer The font number to use
1: Big (used in FPSBox)
2: Small (Used in CPUInfoBox)
3: Medium (Used in CPUInfoBox)
4: Tiny (Used in NotificationBox)

 
wait Performs a wait command

Example:
commandList.Add(New ArrayList({"wait", 10}))

Since all commands are executed in a row, the LCD might get overloaded with commands and might drop some, if you are going to draw background images (usually big images) try to add a wait of at least 100ms, test it yourself to see if you need a wait command or not.

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 Time in MS Integer The time to wait in Milliseconds

 
image Draws an image stored in the device

Example:
commandList.Add(New ArrayList({"image", 0, 130, 164}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 x Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 3 y Position Integer The Y position on the screen as integer, from 0 to 240
Param 4 Image # Integer The image destination number to draw

 
draw_rectangle Draws a rectangle

Example:
commandList.Add(New ArrayList({"draw_rectangle", 200, 50, 250, 80, 1, convertcolorto16bit(253, 23, 36)}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 x1 Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 3 y1 Position Integer The Y position on the screen as integer, from 0 to 240
Param 4 x2 Position Integer The X Final Position (Must be bigger than X1)
Param 5 y2 Position Integer The Y Final Position (Must be bigger than Y1)
Param 6      
Param 7 RGBColor Integer RGBColor in RGB565 integer

 
fill_rectangle Fills a rectangle

Example:
commandList.Add(New ArrayList({"fill_rectangle", 200, 100, 250, 150, convertcolorto16bit(219, 214, 70)}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 x1 Position Integer The X position on the screen as integer, from 0 to 320 (keep in mind that at 320 you cant actually write text since its the edge of the screen)
Param 3 y1 Position Integer The Y position on the screen as integer, from 0 to 240
Param 4 x2 Position Integer The X Final Position (Must be bigger than X1)
Param 5 y2 Position Integer The Y Final Position (Must be bigger than Y1)
Param 6 RGBColor Integer RGBColor in RGB565 integer
draw_lines Draws connected lines

Example:
Dim lines As New ArrayList
lines.Add(New ArrayList({250, 10}))
lines.Add(New ArrayList({260, 30}))
commandList.Add(New ArrayList({"draw_lines", lines, convertcolorto16bit(27, 160, 232)}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 Lines ArrayList This array will contain the list of lines to draw
This will be a list of all the lines requested to draw

ArrayList {2} - Contains all the options values
Param 1 x Position The x Position of the Line
Param 2 y Position The y Position of the Line

You need at least 4 points (2 ArrayList entires) draw a line.
Param 3 RGBColor Integer The RGB Color as RGB565 Integer

 
log Writes a Log to the LOG Tab of GOverlay

Example:
commandList.Add(New ArrayList({"log", "This is a log message"}))

ArrayList - One entry per Command
Param 1 Command String The command name to be executed
Param 2 text String The text to write in the LOG

 

GOverlay Variables


Name Variable Type or Sub-Variable Description
LCDSys_Vars <Hashtable> This Hashtable contains some general LCDSysInfo variables
  device_init_ok Will be True or False depending if LCDSysInfo is inited
  Settings_Cache_Enabled Will be True or False depending if the LCDSysInfo Cache is enabled
  Settings_Cache_Max Will contain the integer value of the max-cache runs
LCDSys_ICO <Hashtable> Contains Icons->Destination numbers references, for example, you can grab the destination number of the icon for the CPUInfoBox Background.
LCDSys_Cache <Hashtable> Contains some Cached values as Hashtable, it is used to store the previous draw-value so we wont re-draw again if the value is the same (to save resources), this gets Reset every X runs defined in GOverlay, so you can store your values and if they dont exist anymore, you can re-draw again.
GLOBAL_GeneralVars <Hashtable> Contains some general information of GOverlay
  lcdsys_windows_elements Contains a Hashtable with all the available elements for LCDSysInfo on the OnWindows Tab
  lcdsys_gaming_elements Contains a Hashtable with all the available elements for LCDSysInfo on the WhileGaming Tab
  lcdsys_windows_inited Will be zero after screen clear, so it is useful to only draw background images when this value is zero, after the first pass, this value will be 1
  lcdsys_dotype Will be "lcdsys_gaming_elements" when the display is in gaming mode and "lcdsys_windows_elements" when the display is in windows mode
  lcdsys_first_run Will be 1 after the first run of the program, before that, the key wont exist
GLOBAL_CachedValues <Hashtable> Hashtable containing the values for all the sensors gathered, if the user is using the Latency element, you will be able to read the latency using this variable since it will be cached in here.
  [ping] Might be 123 meaning that the last-readed latency was 123
GameRunning <Boolean> Will be True when a game is running and False when no game is running (needs RTSS to work)
SkypeEnabled <Boolean> Will be True when Skype is Enabled in the settings and False when is not
SkypeSplash <Boolean> Will be True when this setting is enabled and False when is not
TSEnabled <Boolean> Will be True when Teamspeak is Enabled in the settings and False when is not
TSRunning <Boolean> Will be True when Teamspeak is running and False when is not
GOverlayVersion <String> Will be the current GOverlay Version

objHost



Function Inputs Outputs
objHost.DebugMessage Text as String Nothing
Write an instant message to the LOG window of GOverlay

Function Inputs Outputs
objHost.AccessHost Text as String Nothing
You can access GOverlay variables thru the objHost to read or set them, example:

objHost.AccessHost("set", "LCDSys_Cache", "this_is_my_personal_variable", 123)

Dim GetMyVariableBack As Integer = objHost.AccessHost("retrieve", "LCDSys_Cache", "this_is_my_personal_variable", "")

Hashtable
Param 1 Type as String The Type of Action
retrieve: Get a variable
set: Set a variable
Param 2 Variable as String The variable to get or set
Param 3 Sub-Variable as String Some variables have sub-variables because they are actually arrays, you can access the array key by specifying it in here, if you dont provide a key, you will get the whole array
Param 4 Value If using set, you can specify the new value here

 




 

Copyright 2020 @ GOverlay.com - Privacy Policy