@@ -50,8 +50,20 @@ package com.hendrix.feathers.controls.flex
5050 private var _quadStrip1 : Quad = null ;
5151 private var _quadStrip2 : Quad = null ;
5252
53+ private var _textFormat : TextFormat = null ;
54+
5355 private var _tweenFade : Tween = null ;
5456
57+ public function set btnNo (value :Button ):void
58+ {
59+ _btnNo = value ;
60+ }
61+
62+ public function set btnYes (value :Button ):void
63+ {
64+ _btnYes = value ;
65+ }
66+
5567 /**
5668 * callback for user action
5769 */
@@ -74,9 +86,9 @@ package com.hendrix.feathers.controls.flex
7486 */
7587 private var _textNo : String ;
7688
77- private var _dialogPercentWidth : Number = NaN ;
78- private var _dialogPercentHeight : Number = NaN ;
79- private var _fontSizePercent : Number = NaN ;
89+ private var _dialogPercentWidth : Number = NaN ;
90+ private var _dialogPercentHeight : Number = NaN ;
91+ private var _fontSizePercent : Number = NaN ;
8092
8193
8294 /**
@@ -115,6 +127,12 @@ package com.hendrix.feathers.controls.flex
115127 Starling. juggler. add (_tweenFade );
116128 }
117129
130+ public function get textFormat ():TextFormat { return _textFormat ; }
131+ public function set textFormat (value :TextFormat ):void
132+ {
133+ _textFormat = value ;
134+ }
135+
118136 /**
119137 * warning text
120138 */
@@ -166,8 +184,8 @@ package com.hendrix.feathers.controls.flex
166184 {
167185 _colorBg = value ;
168186
169- if (_quadBgDark ) {
170- _quadBgDark . color = _colorBg ;
187+ if (_quadBg ) {
188+ _quadBg . color = _colorBg ;
171189 }
172190 }
173191
@@ -212,21 +230,33 @@ package com.hendrix.feathers.controls.flex
212230 {
213231 super . initialize ();
214232
215- var tf_btns: TextFormat = new TextFormat ("arial11" , 22 , 0x3C3C3C );
216- var tf_lbl: TextFormat = new TextFormat ("arial11" , 22 , 0x3C3C3C );
233+ var tf_btns: TextFormat = _textFormat ? _textFormat : new TextFormat ("arial11" , 22 , 0x3C3C3C );
234+ var tf_lbl: TextFormat = _textFormat ? _textFormat : new TextFormat ("arial11" , 22 , 0x3C3C3C );
235+
236+ _btnYes = _btnYes ? _btnYes : CompsFactory. newButton(0x7DD9FF , null , btnYes_onTriggered, tf_btns, _textYes );
237+ _btnNo = _btnNo ? _btnNo : CompsFactory. newButton(0x7DD9FF , null , btnNo_onTriggered, tf_btns, _textNo );
217238
218- _btnYes = CompsFactory. newButton(0x7DD9FF , null , btnYes_onTriggered, tf_btns, _textYes );
219- _btnNo = CompsFactory. newButton(0x7DD9FF , null , btnNo_onTriggered, tf_btns, _textNo );
239+ _btnYes . addEventListener (Event . TRIGGERED , btnYes_onTriggered);
240+ _btnNo . addEventListener (Event . TRIGGERED , btnNo_onTriggered);
241+
242+ if (_btnYes . defaultLabelProperties. textFormat == null )
243+ _btnYes . defaultLabelProperties. textFormat = tf_btns;
244+ if (_btnNo . defaultLabelProperties. textFormat == null )
245+ _btnNo . defaultLabelProperties. textFormat = tf_btns;
246+
247+ _btnYes . label = _textYes ;
248+ _btnNo . label = _textNo ;
220249
221250 _btnYes . defaultLabelProperties. embedFonts = true ;
222251 _btnNo . defaultLabelProperties. embedFonts = true ;
252+
223253 _btnYes . horizontalAlign = Button . HORIZONTAL_ALIGN_CENTER ;
224254 _btnNo . horizontalAlign = Button . HORIZONTAL_ALIGN_CENTER ;
225255
226256 _lblWarning = CompsFactory. newLabel(_textWarning , tf_lbl, true , true , TextAlign. CENTER );
227257
228- _quadBg = new Quad(1 , 1 , 0xffffff );
229- _quadBgDark = new Quad(1 , 1 , _colorBg );
258+ _quadBg = new Quad(1 , 1 , _colorBg );
259+ _quadBgDark = new Quad(1 , 1 , 0x00 );
230260
231261 _quadBgDark . alpha = 0.4 ;
232262
@@ -291,6 +321,8 @@ package com.hendrix.feathers.controls.flex
291321 _btnYes . defaultLabelProperties. textFormat = null ;
292322 _btnYes . defaultLabelProperties. textFormat = tf;
293323
324+ //_btnNo.height = 0;
325+ //_btnYes.height = 0;
294326 _btnNo . validate ();
295327 _btnYes . validate ();
296328
@@ -325,7 +357,7 @@ package com.hendrix.feathers.controls.flex
325357
326358 if (_textHeadline )
327359 {
328- var tf_lbl: TextFormat = new TextFormat ("arial11" , 22 , 0x3C3C3C );
360+ var tf_lbl: TextFormat = _textFormat ? _textFormat : new TextFormat ("arial11" , 22 , 0x3C3C3C );
329361 _lblHeadLine = CompsFactory. newLabel(_textHeadline , tf_lbl, false , true , TextAlign. CENTER );
330362 _lblHeadLine . textRendererProperties. textFormat. size = isNaN (_fontSizePercent ) ? width * 0.05 : height * _fontSizePercent / 100 ;;
331363
0 commit comments