Wiki

Clone wiki

Mono:UI / Concepts / Properties

INTRODUCED: v0.1.0
LAST UPDATED: v0.1.0

Properties

Properties are settings that you can use to customise how Mono:UI Objects look and behave. Depending on the type of Object they're applied to, their behaviour may differ. Please see the wiki page of the Object you're using to see the precise effects.
Some Objects may entirely ignore certain properties, if they're irrelevant to the behaviour of that Object.

Usage

Using a Property

var _i = instance_create_depth( 0, 0, 0, m_Button );

MONO( _i, [
    [ "label", "Hello World!" ]
] );

// Result: the created m_Button will have "Hello World!" on it.

Creating a Property

m_property_define( "Foo" );
m_property_set_default( "all", "Foo", "Bar" );
var _i = instance_create_depth( 0, 0, 0, m_Button );

msg = show_message_async( _i.__properties[? "Foo" ] );

// Result: "Bar"

Full List

Name Default Value Description Used By
shape.width 0 The width of the Object's main component, or 0 to automatically determine it. m_Button
shape.height 0 The height of the Object's main component, or 0 to automatically determine it. m_Button
shape.padding.x 18 The horizontal padding of the Object's main component. m_Button
shape.padding.y 9 The vertical padding of the Object's main component. m_Button
shape.rounded 5 The radius of the corners of the Object's main component. m_Button
shape.border true Whether the Object's main component has a border. m_Button
shape.outline false Whether the Object's main component is only an outline. m_Button
shape.shadow true Whether the Object's main component has a shadow. m_Button
shape.shadow.colour $000000 The colour of the shadow if present. m_Button
shape.hidden false Whether the Object is hidden. m_Button
plan undefined The Plan to be executed when the Object has fulfilled its purpose. m_Button
plan.disabled false Whether the Object is disabled. m_Button
theme "mild" The Object's Theme. m_Button
label "\n" The text displayed on the Object. m_Button
label.font -1 The Font to use for the label. m_Button
label.side mono_ESide.left The side the label is on. m_Button
label.align.x fa_center The horizontal text-alignment of the label. m_Button
label.align.y fa_middle The vertical text-alignment of the label. m_Button
label.offset.x 0 The offset the label should have after all other calculations have taken place. m_Button
label.offset.y 0 The offset the label should have after all other calculations have taken place. m_Button
icon noone The Icon to be displayed on the Object. m_Button

See Also

Updated