MenuButton
| Kind | class |
| Package | states |
| Full name | states.MenuButton |
| Source | source/states/ModsMenuState.hx |
| Extends | FlxSpriteGroup |
| Compiled when | #if MODS_ALLOWED |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
bg | FlxSprite | no | — | #if MODS_ALLOWED |
textOn | Alphabet | no | — | #if MODS_ALLOWED |
textOff | Alphabet | no | — | #if MODS_ALLOWED |
icon | FlxSprite | no | — | #if MODS_ALLOWED |
onClick | Void->Void = null | no | — | #if MODS_ALLOWED |
enabled | Bool | no | true | property (default, set) · #if MODS_ALLOWED |
focusChangeCallback | Bool->Void = null | no | — | #if MODS_ALLOWED |
onFocus | Bool | no | false | property (default, set) · #if MODS_ALLOWED |
ignoreCheck | Bool | no | false | #if MODS_ALLOWED |
Public methods
new (constructor)
function new(x:Float, y:Float, width:Int, height:Int, text:String = null, img:FlxGraphic = null, onClick:Void->Void = null, animWidth:Int = 0, animHeight:Int = 0)
Only compiled when #if MODS_ALLOWED.
| Parameter | Type | Default |
|---|---|---|
x | Float | — |
y | Float | — |
width | Int | — |
height | Int | — |
text (optional) | String | null |
img (optional) | FlxGraphic | null |
onClick | Void->Void = null, animWidth:Int = 0, animHeight:Int = 0 | — |
setButtonVisibility
function setButtonVisibility(focusVal:Bool)
Only compiled when #if MODS_ALLOWED.
| Parameter | Type | Default |
|---|---|---|
focusVal | Bool | — |
centerOnBg
function centerOnBg(spr:FlxSprite)
Only compiled when #if MODS_ALLOWED.
| Parameter | Type | Default |
|---|---|---|
spr | FlxSprite | — |
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
_needACheck | Bool | no |
| Method |
|---|
override function update(elapsed:Float) |
function set_onFocus(newValue:Bool) |
function set_enabled(newValue:Bool) |