futire Drawer button addition
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package view;
|
||||
|
||||
import feathers.events.TriggerEvent;
|
||||
import feathers.controls.Button;
|
||||
import feathers.layout.HorizontalLayout;
|
||||
import feathers.layout.AnchorLayoutData;
|
||||
import feathers.text.TextFormat;
|
||||
@@ -18,6 +20,7 @@ import t9.util.ColorTraces.*;
|
||||
class MainHeader extends LayoutGroup {
|
||||
|
||||
private var lb1:Label;
|
||||
private var dBtn:Button;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
@@ -46,6 +49,12 @@ class MainHeader extends LayoutGroup {
|
||||
l.paddingLeft = l.paddingRight = Std.int(headerHeight * .3);
|
||||
l.paddingTop = l.paddingBottom = Std.int(headerHeight * .2);
|
||||
layout = l;
|
||||
|
||||
// Drawer button
|
||||
dBtn = new Button("menu");
|
||||
dBtn.addEventListener(TriggerEvent.TRIGGER, onDBtnPress);
|
||||
addChild(dBtn);
|
||||
|
||||
|
||||
// Title label
|
||||
lb1 = new Label();
|
||||
@@ -63,4 +72,9 @@ class MainHeader extends LayoutGroup {
|
||||
private function onCreationComplete(event:FeathersEvent):Void {
|
||||
traceBlue(this + " --> onCreationComplete()");
|
||||
}
|
||||
|
||||
function onDBtnPress(event:TriggerEvent):Void {
|
||||
var button = cast(event.currentTarget, Button);
|
||||
trace("button triggered: " + button.text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user