burger menu try
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package view;
|
||||
|
||||
import components.NekoIconButton;
|
||||
import openfl.display.Bitmap;
|
||||
import feathers.events.TriggerEvent;
|
||||
import feathers.controls.Button;
|
||||
import feathers.layout.HorizontalLayout;
|
||||
@@ -20,7 +22,7 @@ import t9.util.ColorTraces.*;
|
||||
class MainHeader extends LayoutGroup {
|
||||
|
||||
private var lb1:Label;
|
||||
private var dBtn:Button;
|
||||
private var drawerBtn:NekoIconButton;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
@@ -51,9 +53,9 @@ class MainHeader extends LayoutGroup {
|
||||
layout = l;
|
||||
|
||||
// Drawer button
|
||||
dBtn = new Button("menu");
|
||||
dBtn.addEventListener(TriggerEvent.TRIGGER, onDBtnPress);
|
||||
addChild(dBtn);
|
||||
drawerBtn = new NekoIconButton(Assets.getBitmapData("bitmaps/menu_white.png"), 0, 0, Std.int(headerHeight), Std.int(headerHeight));
|
||||
drawerBtn.addEventListener(TriggerEvent.TRIGGER, onDBtnPress);
|
||||
addChild(drawerBtn);
|
||||
|
||||
|
||||
// Title label
|
||||
@@ -66,7 +68,7 @@ class MainHeader extends LayoutGroup {
|
||||
var fnt:Font = Assets.getFont(Constants.MONTSERRAT_MEDIUM_500);
|
||||
|
||||
lb1.textFormat = new TextFormat(fnt.fontName, Std.int(headerHeight * .4), Constants.MAIN_COLOR3);
|
||||
addChild(lb1);
|
||||
//addChild(lb1);
|
||||
}
|
||||
|
||||
private function onCreationComplete(event:FeathersEvent):Void {
|
||||
|
||||
Reference in New Issue
Block a user