Show / Hide Table of Contents

Class GUI

The interface for GUI with manual positioning.

Inheritance
System.Object
GUI
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:ImGui
Assembly:ImGui.dll
Syntax
public class GUI

Fields

| Improve this Doc

Active

Declaration
public const string Active = "Active"
Field Value
Type Description
System.String
| Improve this Doc

Hover

Declaration
public const string Hover = "Hover"
Field Value
Type Description
System.String
| Improve this Doc

Normal

Declaration
public const string Normal = "Normal"
Field Value
Type Description
System.String

Methods

| Improve this Doc

Button(Rect, String, String)

Create a button. When the user click it, something will happen immediately.

Declaration
public static bool Button(Rect rect, string text, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.String text

text to display on the button

System.String id

the unique id of this control

Returns
Type Description
System.Boolean

true when the users clicks the button.

| Improve this Doc

HoverButton(Rect, String, String)

Create a button that will be actived when the mouse is over it.

Declaration
public static bool HoverButton(Rect rect, string text, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.String text

text to display on the control

System.String id

the unique id of this control

Returns
Type Description
System.Boolean

whether it is activated (the mouse is over it)

| Improve this Doc

Image(Rect, String, String)

Create a image.

Declaration
public static void Image(Rect rect, string filePath, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.String filePath

file path of the image to display. The path should be relative to current dir or absolute.

System.String id

the unique id of this control

| Improve this Doc

Label(Rect, String, String)

Create a label.

Declaration
public static void Label(Rect rect, string text, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.String text

text to display on the label

System.String id

the unique id of this control

| Improve this Doc

PolygonButton(Rect, IReadOnlyList<Point>, Rect, String, String)

Create a polyon-button.

Declaration
public static bool PolygonButton(Rect rect, IReadOnlyList<Point> points, Rect textRect, string text, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.Collections.Generic.IReadOnlyList<Point> points

Point list of the polygon.

Rect textRect

the rect that occupied by the text

System.String text

text to display on the button

System.String id

the unique id of this control

Returns
Type Description
System.Boolean

true when the users clicks the button.

| Improve this Doc

Slider(Rect, Double, Double, Double, String)

Create a horizontal slider that user can drag to select a value.

Declaration
public static double Slider(Rect rect, double value, double minValue, double maxValue, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.Double value

The value the slider shows.

System.Double minValue

The value at the top end of the slider.

System.Double maxValue

The value at the bottom end of the slider.

System.String id

the unique id of this control

Returns
Type Description
System.Double

The value set by the user.

Remarks

minValue <= value <= maxValue

| Improve this Doc

Toggle(Rect, Boolean, String)

Create a toggle (check-box).

Declaration
public static bool Toggle(Rect rect, bool value, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.Boolean value

Is this toggle checked or unchecked?

System.String id

the unique id of this control

Returns
Type Description
System.Boolean

new value of the toggle

| Improve this Doc

ToggleButton(Rect, String, Boolean, String)

Create a button that acts like a toggle.

Declaration
public static bool ToggleButton(Rect rect, string text, bool value, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.String text

text to display on the button

System.Boolean value

Is this toggle checked or unchecked?

System.String id

the unique id of this control

Returns
Type Description
System.Boolean

new value of the toggle-button

| Improve this Doc

VSlider(Rect, Double, Double, Double, String)

Create a vertical slider that user can drag to select a value.

Declaration
public static double VSlider(Rect rect, double value, double minValue, double maxValue, string id)
Parameters
Type Name Description
Rect rect

position and size of the control

System.Double value

The value the slider shows.

System.Double minValue

The value at the top end of the slider.

System.Double maxValue

The value at the bottom end of the slider.

System.String id

the unique id of this control

Returns
Type Description
System.Double

The value set by the user.

Remarks

minValue <= value <= maxValue

  • Improve this Doc
Back to top Copyright © 2016 zwcloud
Generated by DocFX