User Tools

Site Tools


addons:functions:imgui.io

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
addons:functions:imgui.io [2016/06/22 00:14]
atom0s created
addons:functions:imgui.io [2016/06/22 00:23] (current)
atom0s
Line 12: Line 12:
 local io = imgui.io; local io = imgui.io;
 </​code>​ </​code>​
 +
 +-----
 +
 +==== ImGui IO Table Notes ====
 +
 +<WRAP important>​
 +Please note! The imgui.io table differs from the main imgui functions! Please be sure to read the following notes carefully!!
 +</​WRAP>​
 +
 +The imgui.io table differs from the functions found within the '​imgui'​ table. The io table is implemented in a different manner and can make use of certain types such as ImVec2, ImVec4, etc. Because of this, things are used a little differently. But it should be straight forward enough.
 +
 +Here are some examples of how you can make use of the imgui.io table properties:
 +
 +<code lua>
 +-- Getting the display size.. (ImVec2)
 +local display_x = imgui.io.DisplaySize.x;​
 +local display_y = imgui.io.DisplaySize.y;​
 +
 +-- Setting the display size.. (ImVec2)
 +imgui.io.DisplaySize = ImVec2(100, 100);
 +
 +-- Obtaining if the left mouse button is down..
 +local isMouseDown = imgui.io.MouseDown[0];​
 +
 +-- Setting if the left mouse button is down manually..
 +local mouseDown = imgui.io.MouseDown;​
 +mouseDown[0] = true;
 +imgui.io.MouseDown = mouseDown;
 +</​code>​
 +
 +Any property that is within an array must be done in the above manner. You cannot directly index these arrays and set their values. \\
 +You must pull the array, edit it, then reset the full array to make changes.
 +
 +-----
 +
 +==== ImGui IO Table Properties ====
  
 The table holds the following properties: The table holds the following properties:
addons/functions/imgui.io.1466579677.txt.gz · Last modified: 2016/06/22 00:14 by atom0s