Vertically scrollable text container. Useful for creation of walls of text.

Constructor

new (text:Text, width:Int, height:Int, ?parent:Object)

Variables

read onlybottomScrollV:Float

Bottom of current scrollV value. Represents bottom of visible Text area.

htmlText:HtmlText

Reference to HtmlText instance if passed one at creation.

read onlymaxScrollV:Int

Maxiumm possible scrollV value.

scrollStep:Float

Amount of pixels one scroll step uses. Defaults to Text font line height + lineSpacing.

@:value(0)scrollV:Float = 0

Current scrollV value. Starts at 0, up to maxScrollV.
Note: Does not invoke onScrollV.

text:Text

Reference to Text instance.

Methods

@:value({ mouseDrag : true })hookListeners (mouseDrag:Bool = true):Void

dynamiconScrollV (v:Float, oldV:Float):Void

inlinescrollTextBy (steps:Float):Void

Shifts current scrollV by steps and invokes onScrollV.

scrollTextTo (v:Float):Void

Sets scrollV and invokes onScrollV.

inlinetoScrollV (pixels:Float):Float

Converts provided position in pixels to scroll stepped value.
Shortcut to pixels / scrollStep