54 lines
1.5 KiB
Haxe
54 lines
1.5 KiB
Haxe
package view;
|
|
|
|
import lime.app.Event;
|
|
import model.Constants;
|
|
import feathers.skins.RectangleSkin;
|
|
import feathers.layout.VerticalLayoutData;
|
|
import feathers.layout.AnchorLayoutData;
|
|
import feathers.layout.AnchorLayout;
|
|
import feathers.events.FeathersEvent;
|
|
import feathers.layout.VerticalLayout;
|
|
import feathers.controls.ScrollContainer;
|
|
import t9.util.ColorTraces.*;
|
|
import openfl.events.Event;
|
|
|
|
class RidersScreen extends ScrollContainer {
|
|
|
|
private var tb:ToolBar;
|
|
private var rl:RidersList;
|
|
|
|
public function new() {
|
|
super();
|
|
addEventListener(FeathersEvent.CREATION_COMPLETE, onCreationComplete);
|
|
}
|
|
|
|
override private function initialize():Void {
|
|
super.initialize();
|
|
|
|
backgroundSkin = new RectangleSkin(SolidColor(Constants.MAIN_COLOR2, 1));
|
|
|
|
var vl:VerticalLayout = new VerticalLayout();
|
|
vl.horizontalAlign = JUSTIFY;
|
|
layout = vl;
|
|
|
|
tb = new ToolBar();
|
|
var vld1 = new VerticalLayoutData();
|
|
vld1.percentHeight = 10.0;
|
|
tb.layoutData = vld1;
|
|
// TODO implémenter le fuzzy search
|
|
//addEventListener("ToolbarEvent", (e:Event) -> {traceRed(e);});
|
|
addChild(tb);
|
|
|
|
rl = new RidersList();
|
|
var vld2 = new VerticalLayoutData();
|
|
vld2.percentHeight = 90.0;
|
|
rl.layoutData = vld2;
|
|
addChild(rl);
|
|
|
|
}
|
|
|
|
private function onCreationComplete(event:FeathersEvent):Void {
|
|
traceBlue(this + " --> onCreationComplete() - w: " + width + " h: " + height );
|
|
}
|
|
}
|