C# Class Nez.IMGUI

Mostrar archivo Open project: prime31/Nez

Public Methods

Method Description
beginWindow ( float x, float y, float width, float height, bool useRawMousePosition = true ) : void

begins an IMGUI window specifying where and how large it should be. If you are not using IMGUI in world space (for example, inside a Scene with a scaled resolution policy) passing false for useRawMousePosition will use the Input.scaledMousePosition.

button ( string text ) : bool
endWindow ( ) : void
header ( string text ) : void

creates a full width header with text

progressBar ( float value ) : float

value should be between 0 and 1

slider ( float value, string name = "" ) : float

value should be between 0 and 1

space ( float verticalSpace ) : void

adds some vertical space

toggle ( string text, bool isChecked ) : bool

creates a checkbox/toggle

Private Methods

Method Description
IMGUI ( ) : Microsoft.Xna.Framework.Graphics
drawString ( string text, Color color, TextAlign align = TextAlign.Center, float elementHeight = ELEMENT_HEIGHT ) : void
endElement ( float elementHeight = ELEMENT_HEIGHT ) : void
isMouseBetween ( float left, float right ) : bool
isMouseOverElement ( ) : bool

Method Details

beginWindow() public static method

begins an IMGUI window specifying where and how large it should be. If you are not using IMGUI in world space (for example, inside a Scene with a scaled resolution policy) passing false for useRawMousePosition will use the Input.scaledMousePosition.
public static beginWindow ( float x, float y, float width, float height, bool useRawMousePosition = true ) : void
x float The x coordinate.
y float The y coordinate.
width float Width.
height float Height.
useRawMousePosition bool If set to true use raw mouse position.
return void

button() public static method

public static button ( string text ) : bool
text string
return bool

endWindow() public static method

public static endWindow ( ) : void
return void

header() public static method

creates a full width header with text
public static header ( string text ) : void
text string Text.
return void

progressBar() public static method

value should be between 0 and 1
public static progressBar ( float value ) : float
value float Value.
return float

slider() public static method

value should be between 0 and 1
public static slider ( float value, string name = "" ) : float
value float Value.
name string
return float

space() public static method

adds some vertical space
public static space ( float verticalSpace ) : void
verticalSpace float Vertical space.
return void

toggle() public static method

creates a checkbox/toggle
public static toggle ( string text, bool isChecked ) : bool
text string Text.
isChecked bool If set to true is checked.
return bool