- added HProgressBar to RiderCardDrawer
- added Spacer class insted of padding & gap
This commit is contained in:
@@ -41,11 +41,11 @@ class RidersListRendererAccessory extends LayoutGroup {
|
||||
var iconColor:Int;
|
||||
var fnt:Font = Assets.getFont(Constants.MONTSERRAT_MEDIUM_500);
|
||||
|
||||
if (riderCredit <= 0) {
|
||||
if (riderCredit <= Constants.CREDIT_ULTRA_LOW_LIMIT) {
|
||||
iconColor = Constants.ALARM;
|
||||
} else if (riderCredit <= 2) {
|
||||
} else if (riderCredit <= Constants.CREDIT_LOW_LIMIT) {
|
||||
iconColor = Constants.ALERT;
|
||||
} else if (riderCredit <= 6) {
|
||||
} else if (riderCredit <= Constants.CREDIT_AVERAGE_LIMIT) {
|
||||
iconColor = Constants.WARNING;
|
||||
} else {
|
||||
iconColor = Constants.INFO;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package components;
|
||||
|
||||
import feathers.skins.RectangleSkin;
|
||||
import feathers.controls.LayoutGroup;
|
||||
import t9.util.ColorTraces.*;
|
||||
|
||||
class VSpacer extends LayoutGroup {
|
||||
|
||||
private var spacerHeight:Int;
|
||||
private var spacerColor:Int;
|
||||
private var spacerAlpha:Float;
|
||||
|
||||
public function new(pSpacerHeight:Int = 10, pSpacerColor:Int = 0xFFFFFF, pSpacerAlpha:Float = 0) {
|
||||
super();
|
||||
|
||||
spacerHeight = pSpacerHeight;
|
||||
spacerColor = pSpacerColor;
|
||||
spacerAlpha = pSpacerAlpha;
|
||||
}
|
||||
|
||||
override private function initialize():Void {
|
||||
super.initialize();
|
||||
|
||||
var rs:RectangleSkin = new RectangleSkin(SolidColor(spacerColor, spacerAlpha));
|
||||
rs.height = spacerHeight;
|
||||
backgroundSkin = rs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user