Added : RidesrScreen, ToolBar

Riders list is now populated with JSON
TODO : resize list and tolbar
This commit is contained in:
2025-11-23 22:11:53 +01:00
parent 858568a235
commit e8789829ae
5 changed files with 145 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
package view;
import feathers.controls.ListView;
import feathers.events.FeathersEvent;
import model.AppModelLocator;
import openfl.events.Event;
import t9.util.ColorTraces.*;
class RidersList extends ListView {
private var model = AppModelLocator.getInstance();
public function new() {
super();
addEventListener(FeathersEvent.CREATION_COMPLETE, onCreationComplete);
width = 300;
height = 400;
}
override private function initialize():Void {
super.initialize();
model.addEventListener(AppModelLocator.RIDERS_LIST_DP_CHANGE, onRideListDpChange);
}
private function onCreationComplete(event:FeathersEvent):Void {
traceBlue(this + " --> onCreationComplete()");
}
private function onRideListDpChange(e:Event):Void {
traceGreen(this + " : onRideListDpChange");
dataProvider = model.ridersListDP;
itemToText = function(item:Dynamic):String {
return item.firstName;
};
}
}