Table of Contents

Class Button

Namespace
OmegaGUI.Model
Assembly
OmegaGUI.dll

Button control

public class Button : ButtonBase, ICloneable
Inheritance
object
Button
Implements
Inherited Members

Constructors

Button()

public Button()

Properties

CustomStyle

A custom style for this button - no auto-update

public string CustomStyle { get; set; }

Property Value

string

ImageAlpha

The level of transparency of the image from 0 (invisible) to 255 (solid)

public byte ImageAlpha { get; set; }

Property Value

byte

ImageFile

The file containing a custom image to display on the button, drawn underneath any Text

public string ImageFile { get; set; }

Property Value

string

Remarks

Assigning the value this already has is a no-op, so scripts can set this on every frame without reloading the texture each time.

ImageFileValid

public bool ImageFileValid { get; }

Property Value

bool

ImageLocation

The upper left corner of the area in the image file to use

public Point ImageLocation { get; set; }

Property Value

Point

ImagePadding

The space between the button's edges and its ImageFile, in unscaled dialog units

public Padding ImagePadding { get; set; }

Property Value

Padding

ImageSize

The distance to the lower right corner of the area in the image file to use

public Size ImageSize { get; set; }

Property Value

Size

StyleValid

public bool StyleValid { get; }

Property Value

bool

Text

The text displayed on the control

public override string Text { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this instance.

public override Control Clone()

Returns

Control

CloneButton()

Creates a deep copy of this Button instance.

public Button CloneButton()

Returns

Button

The new copy of the Button.

CloneFromTo(Button, Button)

Copies all members declared by Button from one instance to another.

protected static void CloneFromTo(Button from, Button to)

Parameters

from Button
to Button

OnLayoutUpdated()

Called after EffectiveLocation/EffectiveSize have been (re-)calculated, e.g. following a Scale change.

protected override void OnLayoutUpdated()

ShouldSerializeImageFile()

public bool ShouldSerializeImageFile()

Returns

bool

ShouldSerializeImageLocation()

public bool ShouldSerializeImageLocation()

Returns

bool

ShouldSerializeImagePadding()

public bool ShouldSerializeImagePadding()

Returns

bool

ShouldSerializeImageSize()

public bool ShouldSerializeImageSize()

Returns

bool