2
* This file is part of the dis-Emi-A HaXe Library. Copyright (c) edA-qa mort-ora-y
3
* For full copyright and license information please refer to doc/license.txt.
9
import neash.text.TextField;
10
import neash.text.TextFieldAutoSize;
12
import flash.text.TextField;
13
import flash.text.TextFieldAutoSize;
16
class MenuItemString extends MenuItem
18
private var text : String;
20
public function new( pop : Menu, atext : String, evt )
26
textF = new TextField( );
27
textF.selectable = false;
28
textF.textColor = Theme.current.textColor.asInt();
30
textF.autoSize = TextFieldAutoSize.LEFT;
33
draw( false, textF.width );
36
private var textF : TextField;
37
override private function draw( highlight : Bool, w : Float )
41
textF.textColor = (highlight
42
? Theme.current.highTextColor
43
: Theme.current.textColor).asInt();
47
? Theme.current.highBackColor
48
: Theme.current.menuColor ).asInt()
50
graphics.moveTo( 0, 0 );
51
graphics.lineTo( w, 0 );
52
graphics.lineTo( w, height );
53
graphics.lineTo( 0, height );