diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0b296d8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "haxe.configurations": [] +} \ No newline at end of file diff --git a/assets/fonts/HighSpirited.ttf b/assets/fonts/HighSpirited.ttf new file mode 100644 index 0000000..c64914f Binary files /dev/null and b/assets/fonts/HighSpirited.ttf differ diff --git a/dump/decoding_error.txt b/dump/decoding_error.txt new file mode 100644 index 0000000..39d9972 --- /dev/null +++ b/dump/decoding_error.txt @@ -0,0 +1,2175 @@ +[{ + access: [APublic, AStatic, AFinal] + doc: null + kind: FVar(TPath({ + name: String + pack: [] + params: [] + sub: null + }), { + expr: EConst(CString(close, DoubleQuotes)) + pos: #pos + }) + meta: [] + name: CLOSE + pos: #pos +}, { + access: [APublic, AStatic, AFinal] + doc: null + kind: FVar(TPath({ + name: String + pack: [] + params: [] + sub: null + }), { + expr: EConst(CString(open, DoubleQuotes)) + pos: #pos + }) + meta: [] + name: OPEN + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FVar(TPath({ + name: AppModelLocator + pack: [] + params: [] + sub: null + }), null) + meta: [] + name: model + pos: #pos +}, { + access: [APublic] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: ECall({ + expr: EConst(CIdent(super)) + pos: #pos + }, []) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, MXHXComponent_initMXHX, Normal) + pos: #pos + }, []) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(addEventListener)) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(FeathersEvent)) + pos: #pos + }, CREATION_COMPLETE, Normal) + pos: #pos + }, { + expr: EConst(CIdent(onCreationComplete)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + } + params: [] + ret: null + }) + meta: [] + name: new + pos: #pos +}, { + access: [AOverride, APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(super)) + pos: #pos + }, initialize, Normal) + pos: #pos + }, []) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(model)) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(AppModelLocator)) + pos: #pos + }, getInstance, Normal) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(overlaySkin)) + pos: #pos + }, { + expr: ENew({ + name: RectangleSkin + pack: [] + params: [] + sub: null + }, [{ + expr: ECall({ + expr: EConst(CIdent(SolidColor)) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, MAIN_COLOR3, Normal) + pos: #pos + }, { + expr: EConst(CInt(1, null)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(swipeCloseEnabled)) + pos: #pos + }, { + expr: EConst(CIdent(true)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(swipeOpenEnabled)) + pos: #pos + }, { + expr: EConst(CIdent(false)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(autoSizeMode)) + pos: #pos + }, { + expr: EConst(CIdent(STAGE)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(pullableEdge)) + pos: #pos + }, { + expr: EConst(CIdent(TOP)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(clickOverlayToClose)) + pos: #pos + }, { + expr: EConst(CIdent(false)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EConst(CIdent(drawer)) + pos: #pos + }, { + expr: EConst(CIdent(mainScrollContainer)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: [] + ret: TPath({ + name: Void + pack: [] + params: [] + sub: null + }) + }) + meta: [] + name: initialize + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: [] + name: e + opt: false + type: TPath({ + name: FeathersEvent + pack: [] + params: [] + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: ECall({ + expr: EConst(CIdent(traceBlue)) + pos: #pos + }, [{ + expr: EBinop(OpAdd, { + expr: EBinop(OpAdd, { + expr: EBinop(OpAdd, { + expr: EBinop(OpAdd, { + expr: EConst(CIdent(this)) + pos: #pos + }, { + expr: EConst(CString( --> onCreationComplete() - w: , DoubleQuotes)) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CIdent(width)) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CString( h: , DoubleQuotes)) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CIdent(height)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + } + params: [] + ret: TPath({ + name: Void + pack: [] + params: [] + sub: null + }) + }) + meta: [] + name: onCreationComplete + pos: #pos +}, { + access: [APublic] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(ppal)) + pos: #pos + }, source, Normal) + pos: #pos + }, { + expr: EBinop(OpAdd, { + expr: EBinop(OpAdd, { + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, PROFIL_PICTURES_PATH_512, Normal) + pos: #pos + }, { + expr: EField({ + expr: EField({ + expr: EConst(CIdent(model)) + pos: #pos + }, selectedRider, Normal) + pos: #pos + }, uid, Normal) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CString(.jpg, DoubleQuotes)) + pos: #pos + }) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(openDrawer)) + pos: #pos + }, []) + pos: #pos + }]) + pos: #pos + } + params: [] + ret: null + }) + meta: [] + name: populateAndShow + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, content, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_mainScrollContainer)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: Void + pack: [] + params: [] + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: MXHXComponent_initMXHX + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: VerticalLayout + pack: [feathers, layout] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, horizontalAlign, Normal) + pos: #pos + }, { + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(feathers)) + pos: #pos + }, layout, Normal) + pos: #pos + }, HorizontalAlign, Normal) + pos: #pos + }, JUSTIFY, Normal) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, verticalAlign, Normal) + pos: #pos + }, { + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(feathers)) + pos: #pos + }, layout, Normal) + pos: #pos + }, VerticalAlign, Normal) + pos: #pos + }, TOP, Normal) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, GLOBAL_PADDING, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingLeft, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, GLOBAL_PADDING, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingTop, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, GLOBAL_PADDING, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingRight, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, GLOBAL_PADDING, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingBottom, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: VerticalLayout + pack: [feathers, layout] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_0 + pos: #pos +}, { + access: [APublic] + doc: null + kind: FProp(default, set, TPath({ + name: Button + pack: [feathers, controls] + params: null + sub: null + }), null) + meta: [{ + name: :bindable + params: [{ + expr: EConst(CString(closeDrawerButtonChanged, DoubleQuotes)) + pos: #pos + }] + pos: #pos + }] + name: closeDrawerButton + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: null + name: value + opt: null + type: TPath({ + name: Button + pack: [feathers, controls] + params: null + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, closeDrawerButton, Normal) + pos: #pos + }, { + expr: EConst(CIdent(value)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, dispatchEvent, Normal) + pos: #pos + }, [{ + expr: ENew({ + name: Event + pack: [openfl, events] + params: [] + sub: null + }, [{ + expr: EConst(CString(closeDrawerButtonChanged, DoubleQuotes)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, closeDrawerButton, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: Button + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: null + name: set_closeDrawerButton + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: Button + pack: [feathers, controls] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, text, Normal) + pos: #pos + }, { + expr: EConst(CString(Close drawer, DoubleQuotes)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, addEventListener, Normal) + pos: #pos + }, [{ + expr: EConst(CString(click, DoubleQuotes)) + pos: #pos + }, { + expr: EFunction(FArrow, { + args: [{ + meta: [] + name: event + opt: false + type: null + value: null + }] + expr: { + expr: EMeta({ + name: :implicitReturn + params: [] + pos: #pos + }, { + expr: EReturn({ + expr: EBlock([{ + expr: ECall({ + expr: EConst(CIdent(closeDrawer)) + pos: #pos + }, []) + pos: #pos + }]) + pos: #pos + }) + pos: #pos + }) + pos: #pos + } + params: [] + ret: null + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, closeDrawerButton, Normal) + pos: #pos + }, { + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: Button + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_closeDrawerButton + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: VSpacer + pack: [components] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: VSpacer + pack: [components] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_1 + pos: #pos +}, { + access: [APublic] + doc: null + kind: FProp(default, set, TPath({ + name: AssetLoader + pack: [feathers, controls] + params: null + sub: null + }), null) + meta: [{ + name: :bindable + params: [{ + expr: EConst(CString(ppalChanged, DoubleQuotes)) + pos: #pos + }] + pos: #pos + }] + name: ppal + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: null + name: value + opt: null + type: TPath({ + name: AssetLoader + pack: [feathers, controls] + params: null + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, ppal, Normal) + pos: #pos + }, { + expr: EConst(CIdent(value)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, dispatchEvent, Normal) + pos: #pos + }, [{ + expr: ENew({ + name: Event + pack: [openfl, events] + params: [] + sub: null + }, [{ + expr: EConst(CString(ppalChanged, DoubleQuotes)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, ppal, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: AssetLoader + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: null + name: set_ppal + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: AssetLoader + pack: [feathers, controls] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, ppal, Normal) + pos: #pos + }, { + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: AssetLoader + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_ppal + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: VSpacer + pack: [components] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: VSpacer + pack: [components] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_2 + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: RectangleSkin + pack: [feathers, skins] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, cornerRadius, Normal) + pos: #pos + }, { + expr: EConst(CInt(3, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, fill, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(feathers)) + pos: #pos + }, graphics, Normal) + pos: #pos + }, FillStyle, Normal) + pos: #pos + }, SolidColor, Normal) + pos: #pos + }, [{ + expr: EConst(CInt(16711935, null)) + pos: #pos + }, { + expr: EConst(CInt(1, null)) + pos: #pos + }]) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: RectangleSkin + pack: [feathers, skins] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_3 + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: VerticalLayout + pack: [feathers, layout] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, horizontalAlign, Normal) + pos: #pos + }, { + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(feathers)) + pos: #pos + }, layout, Normal) + pos: #pos + }, HorizontalAlign, Normal) + pos: #pos + }, JUSTIFY, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: VerticalLayout + pack: [feathers, layout] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_4 + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: TextFormat + pack: [feathers, text] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, MONTSERRAT_LIGHT_300, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, font, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, FONT_SIZE_26, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, size, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EField({ + expr: EField({ + expr: EConst(CIdent(mxhx)) + pos: #pos + }, bindable, Normal) + pos: #pos + }, DataBinding, Normal) + pos: #pos + }, bind, Normal) + pos: #pos + }, [{ + expr: EField({ + expr: EConst(CIdent(Constants)) + pos: #pos + }, MAIN_COLOR1, Normal) + pos: #pos + }, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, color, Normal) + pos: #pos + }, { + expr: EConst(CIdent(this)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: TextFormat + pack: [feathers, text] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_5 + pos: #pos +}, { + access: [APublic] + doc: null + kind: FProp(default, set, TPath({ + name: Label + pack: [feathers, controls] + params: null + sub: null + }), null) + meta: [{ + name: :bindable + params: [{ + expr: EConst(CString(firstNameLabelChanged, DoubleQuotes)) + pos: #pos + }] + pos: #pos + }] + name: firstNameLabel + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: null + name: value + opt: null + type: TPath({ + name: Label + pack: [feathers, controls] + params: null + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, firstNameLabel, Normal) + pos: #pos + }, { + expr: EConst(CIdent(value)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, dispatchEvent, Normal) + pos: #pos + }, [{ + expr: ENew({ + name: Event + pack: [openfl, events] + params: [] + sub: null + }, [{ + expr: EConst(CString(firstNameLabelChanged, DoubleQuotes)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, firstNameLabel, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: Label + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: null + name: set_firstNameLabel + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: Label + pack: [feathers, controls] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, text, Normal) + pos: #pos + }, { + expr: EConst(CString(Hello!, DoubleQuotes)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, embedFonts, Normal) + pos: #pos + }, { + expr: EConst(CIdent(true)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingLeft, Normal) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingTop, Normal) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingRight, Normal) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, paddingBottom, Normal) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, backgroundSkin, Normal) + pos: #pos + }, { + expr: null <- expected value + pos: null <- expected value + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, textFormat, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_5)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, firstNameLabel, Normal) + pos: #pos + }, { + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: Label + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_firstNameLabel + pos: #pos +}, { + access: [APublic] + doc: null + kind: FProp(default, set, TPath({ + name: LayoutGroup + pack: [feathers, controls] + params: null + sub: null + }), null) + meta: [{ + name: :bindable + params: [{ + expr: EConst(CString(lg1Changed, DoubleQuotes)) + pos: #pos + }] + pos: #pos + }] + name: lg1 + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: null + name: value + opt: null + type: TPath({ + name: LayoutGroup + pack: [feathers, controls] + params: null + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, lg1, Normal) + pos: #pos + }, { + expr: EConst(CIdent(value)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, dispatchEvent, Normal) + pos: #pos + }, [{ + expr: ENew({ + name: Event + pack: [openfl, events] + params: [] + sub: null + }, [{ + expr: EConst(CString(lg1Changed, DoubleQuotes)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, lg1, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: LayoutGroup + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: null + name: set_lg1 + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: LayoutGroup + pack: [feathers, controls] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, height, Normal) + pos: #pos + }, { + expr: EConst(CInt(80, null)) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, backgroundSkin, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_3)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, layout, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_4)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, xmlContent, Normal) + pos: #pos + }, { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: EArrayDecl([]) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: array_xmlContent + namePos: #pos + type: TPath({ + name: Array + pack: [] + params: [TPType(TPath({ + name: DisplayObject + pack: [flash, display] + params: null + sub: null + }))] + sub: null + }) + }]) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_firstNameLabel)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }]) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, lg1, Normal) + pos: #pos + }, { + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: LayoutGroup + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_lg1 + pos: #pos +}, { + access: [APublic] + doc: null + kind: FProp(default, set, TPath({ + name: ScrollContainer + pack: [feathers, controls] + params: null + sub: null + }), null) + meta: [{ + name: :bindable + params: [{ + expr: EConst(CString(mainScrollContainerChanged, DoubleQuotes)) + pos: #pos + }] + pos: #pos + }] + name: mainScrollContainer + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [{ + meta: null + name: value + opt: null + type: TPath({ + name: ScrollContainer + pack: [feathers, controls] + params: null + sub: null + }) + value: null + }] + expr: { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, mainScrollContainer, Normal) + pos: #pos + }, { + expr: EConst(CIdent(value)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, dispatchEvent, Normal) + pos: #pos + }, [{ + expr: ENew({ + name: Event + pack: [openfl, events] + params: [] + sub: null + }, [{ + expr: EConst(CString(mainScrollContainerChanged, DoubleQuotes)) + pos: #pos + }]) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, mainScrollContainer, Normal) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: ScrollContainer + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: null + name: set_mainScrollContainer + pos: #pos +}, { + access: [APrivate] + doc: null + kind: FFun({ + args: [] + expr: { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: ENew({ + name: ScrollContainer + pack: [feathers, controls] + params: null + sub: null + }, []) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: object + namePos: #pos + type: null + }]) + pos: #pos + }, { + expr: EBlock([{ + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, layout, Normal) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_0)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(object)) + pos: #pos + }, xmlContent, Normal) + pos: #pos + }, { + expr: EBlock([{ + expr: EVars([{ + expr: { + expr: EArrayDecl([]) + pos: #pos + } + isFinal: false + isStatic: false + meta: [] + name: array_xmlContent + namePos: #pos + type: TPath({ + name: Array + pack: [] + params: [TPType(TPath({ + name: DisplayObject + pack: [flash, display] + params: null + sub: null + }))] + sub: null + }) + }]) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(0, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_closeDrawerButton)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(1, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_1)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(2, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_ppal)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(3, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_2)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EArray({ + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }, { + expr: EConst(CInt(4, null)) + pos: #pos + }) + pos: #pos + }, { + expr: ECall({ + expr: EConst(CIdent(createMXHXObject_lg1)) + pos: #pos + }, []) + pos: #pos + }) + pos: #pos + }, { + expr: EConst(CIdent(array_xmlContent)) + pos: #pos + }]) + pos: #pos + }) + pos: #pos + }, { + expr: EBinop(OpAssign, { + expr: EField({ + expr: EConst(CIdent(this)) + pos: #pos + }, mainScrollContainer, Normal) + pos: #pos + }, { + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + }, { + expr: EReturn({ + expr: EConst(CIdent(object)) + pos: #pos + }) + pos: #pos + }]) + pos: #pos + } + params: null + ret: TPath({ + name: ScrollContainer + pack: [feathers, controls] + params: null + sub: null + }) + }) + meta: [{ + name: :noCompletion + params: null + pos: #pos + }] + name: createMXHXObject_mainScrollContainer + pos: #pos +}] +line 1563: expected value +line 1564: expected value \ No newline at end of file diff --git a/project.xml b/project.xml index 964f59a..3aa550f 100644 --- a/project.xml +++ b/project.xml @@ -7,9 +7,9 @@ - @@ -33,6 +33,7 @@ + diff --git a/src/components/VSpacer.hx b/src/components/VSpacer.hx index c74defb..bc33b3f 100644 --- a/src/components/VSpacer.hx +++ b/src/components/VSpacer.hx @@ -5,24 +5,48 @@ import feathers.controls.LayoutGroup; import t9.util.ColorTraces.*; class VSpacer extends LayoutGroup { + public var spacerHeight(default, set):Int; + public var spacerColor(default, set):Int; + public var spacerAlpha(default, set):Float; + private var rs:RectangleSkin; - private var spacerHeight:Int; - private var spacerColor:Int; - private var spacerAlpha:Float; - - public function new(pSpacerHeight:Int = 10, pSpacerColor:Int = 0xFFFFFF, pSpacerAlpha:Float = 0) { + public function new(?pSpacerHeight:Int = 10, ?pSpacerColor:Int = 0xFFFFFF, ?pSpacerAlpha:Float = 0) { super(); - spacerHeight = pSpacerHeight; - spacerColor = pSpacerColor; - spacerAlpha = pSpacerAlpha; + spacerHeight = pSpacerHeight; + spacerColor = pSpacerColor; + spacerAlpha = pSpacerAlpha; } override private function initialize():Void { super.initialize(); + draw(); + } - var rs:RectangleSkin = new RectangleSkin(SolidColor(spacerColor, spacerAlpha)); - rs.height = spacerHeight; - backgroundSkin = rs; - } + function set_spacerHeight(pSpacerHeight:Int) { + spacerHeight = pSpacerHeight; + draw(); + return spacerHeight; + } + + function set_spacerColor(pSpacerColor:Int) { + spacerColor = pSpacerColor; + draw(); + return spacerColor; + } + + function set_spacerAlpha(pSpacerAlpha:Float) { + spacerAlpha = pSpacerAlpha; + draw(); + return spacerAlpha; + } + + private function draw() { + backgroundSkin = null; + rs = null; + + rs = new RectangleSkin(SolidColor(spacerColor, spacerAlpha)); + rs.height = spacerHeight; + backgroundSkin = rs; + } } diff --git a/src/model/Constants.hx b/src/model/Constants.hx index b13e857..6a2f615 100644 --- a/src/model/Constants.hx +++ b/src/model/Constants.hx @@ -33,6 +33,7 @@ class Constants { public static final MONTSERRAT_REGULAR_400:String = "MontserratRegular400"; public static final MONTSERRAT_MEDIUM_500:String = "MontserratMedium500"; public static final MONTSERRAT_BOLD_700:String = "MontserratBold700"; + public static final HIGH_SPIRITED:String = "HighSpirited"; // Fonts sizes public static final FONT_SIZE_10:Int = 10; diff --git a/src/ui/LPTCTheme.hx b/src/ui/LPTCTheme.hx index c717d9b..ae77f73 100644 --- a/src/ui/LPTCTheme.hx +++ b/src/ui/LPTCTheme.hx @@ -107,10 +107,10 @@ class LPTCTheme extends ClassVariantTheme { downSkin.cornerRadius = Constants.GLOBAL_CORNER_RADIUS; button.setSkinForState(ButtonState.DOWN, downSkin); - var format = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_14, Constants.HERO_COLOR); + var format = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_14, Constants.MAIN_COLOR3); button.textFormat = format; - var downFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_14, Constants.MAIN_COLOR3); + var downFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_14, Constants.ACCENT_COLOR2); button.setTextFormatForState(ButtonState.DOWN, downFormat); button.paddingLeft = button.paddingRight = 10; diff --git a/src/view/MyMXHXComp.mxhx b/src/view/MyMXHXComp.mxhx deleted file mode 100644 index 8209f03..0000000 --- a/src/view/MyMXHXComp.mxhx +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/view/RiderCardDrawer.hx b/src/view/RiderCardDrawer.hx index ee61aef..dbc2450 100644 --- a/src/view/RiderCardDrawer.hx +++ b/src/view/RiderCardDrawer.hx @@ -1,49 +1,19 @@ package view; -import bindx.Bind; -import components.VSpacer; -import feathers.controls.AssetLoader; -import feathers.controls.Button; -import feathers.controls.ButtonState; -import feathers.controls.Drawer; -import feathers.controls.HProgressBar; -import feathers.controls.Label; -import feathers.controls.LayoutGroup; import feathers.controls.ScrollContainer; -import feathers.core.PopUpManager; +import feathers.controls.Drawer; import feathers.events.FeathersEvent; -import feathers.events.TriggerEvent; -import feathers.layout.VerticalLayout; import feathers.skins.RectangleSkin; import model.AppModelLocator; import model.Constants; -import model.String.Strings; -import mxhx.macros.MXHXComponent; -import openfl.Assets; -import openfl.events.Event; -import openfl.text.TextFormat; -import openfl.utils.Function; import t9.util.ColorTraces.*; -import ui.LPTCTheme; -import ui.SVGIconFactory; -import vo.RiderVO; +@:build(mxhx.macros.MXHXComponent.build()) class RiderCardDrawer extends Drawer { public static final CLOSE:String = "close"; public static final OPEN:String = "open"; - private var model:AppModelLocator; - - // components - private var ppal:AssetLoader; - private var closeDrawerButton:Button; - private var firstNameLabel:Label; - private var nameLabel:Label; - private var creditLabel:Label; - private var creditProgressBar:HProgressBar; - private var removeOneCreditButton:Button; - private var lastLessonDateTextLabel:Label; - private var lastLessonDateValueLabel:Label; + private var appModel:AppModelLocator; public function new() { super(); @@ -53,7 +23,7 @@ class RiderCardDrawer extends Drawer { override private function initialize():Void { super.initialize(); - model = AppModelLocator.getInstance(); + appModel = AppModelLocator.getInstance(); overlaySkin = new RectangleSkin(SolidColor(Constants.MAIN_COLOR3, 1)); swipeCloseEnabled = true; @@ -62,186 +32,29 @@ class RiderCardDrawer extends Drawer { pullableEdge = TOP; clickOverlayToClose = false; - // main Layout - var mainScrollContainer:ScrollContainer = new ScrollContainer(); - mainScrollContainer.autoSizeMode = STAGE; - - var mainVerticalLayout = new VerticalLayout(); - mainVerticalLayout.paddingLeft = mainVerticalLayout.paddingRight = Constants.GLOBAL_PADDING; - // mainVerticalLayout.gap = Constants.GLOBAL_PADDING; - mainVerticalLayout.horizontalAlign = JUSTIFY; - mainVerticalLayout.verticalAlign = TOP; - mainScrollContainer.layout = mainVerticalLayout; - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // close button - closeDrawerButton = new Button(); - closeDrawerButton.text = "Close Drawer"; - closeDrawerButton.addEventListener(TriggerEvent.TRIGGER, (e) -> { - closeDrawer(); - }); - mainScrollContainer.addChild(closeDrawerButton); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // profile picture - ppal = new AssetLoader(); - // ppal.addEventListener(Event.COMPLETE, (e:Event) -> cast(e.currentTarget, AssetLoader).validateNow()); - mainScrollContainer.addChild(ppal); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // ########################################################################## firstname & name labels group - // layout - var lg1:LayoutGroup = new LayoutGroup(); - lg1.backgroundSkin = new RectangleSkin(SolidColor(Constants.MAIN_COLOR1, 0)); - var vl1:VerticalLayout = new VerticalLayout(); - vl1.horizontalAlign = JUSTIFY; - lg1.layout = vl1; - mainScrollContainer.addChild(lg1); - - // first name Label - firstNameLabel = new Label(); - firstNameLabel.setPadding(0); - firstNameLabel.backgroundSkin = null; - firstNameLabel.embedFonts = true; - firstNameLabel.textFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_BOLD_700).fontName, Constants.FONT_SIZE_26, Constants.MAIN_COLOR1); - lg1.addChild(firstNameLabel); - - // name Label - nameLabel = new Label(); - nameLabel.setPadding(0); - nameLabel.backgroundSkin = null; - nameLabel.embedFonts = true; - nameLabel.textFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_22, Constants.MAIN_COLOR2); - lg1.addChild(nameLabel); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // ########################################################################## Remaining credit label - creditLabel = new Label(); - creditLabel.embedFonts = true; - creditLabel.textFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_BOLD_700).fontName, Constants.FONT_SIZE_16, Constants.MAIN_COLOR1); - mainScrollContainer.addChild(creditLabel); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // ########################################################################## credit progress bar - creditProgressBar = new HProgressBar(0, 0, 10); - mainScrollContainer.addChild(creditProgressBar); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - - // ########################################################################## Remove 1 credit button - removeOneCreditButton = new Button(); - removeOneCreditButton.icon = SVGIconFactory.makeIcon("vector/ticket_icon_black.svg", Constants.BUTTONS_ICON_SIZE, Constants.MAIN_COLOR3); - removeOneCreditButton.setIconForState(ButtonState.DOWN, - SVGIconFactory.makeIcon("vector/ticket_icon_black.svg", Constants.BUTTONS_ICON_SIZE, Constants.HERO_COLOR)); - removeOneCreditButton.text = Strings.RCD_S2; - removeOneCreditButton.addEventListener(TriggerEvent.TRIGGER, (e) -> { - traceRed("removeOneCredit()"); - // this function will be exectuted when the user will click on the ConfirmationPanel's "confirm" button - var f:Function = function() { - trace("remove 1 credit to selected rider in model"); - model.selectedRider.credit--; - } - PopUpManager.addPopUp(new ConfirmationPanel(Strings.CP_S2, Strings.CP_S3, f), parent, true, true); - }); - mainScrollContainer.addChild(removeOneCreditButton); - - // ##### SPACER - mainScrollContainer.addChild(new VSpacer(10)); - // mainScrollContainer.addChild(new VSpacer(2, Constants.MAIN_COLOR2, 1)); - - // ########################################################################## rider basic infos group (lastLessonDate, age, level) - /*var lg2:LayoutGroup = new LayoutGroup(); - lg2.backgroundSkin = new RectangleSkin(SolidColor(Constants.MAIN_COLOR3, 1)); - var vl2:VerticalLayout = new VerticalLayout(); - vl2.horizontalAlign = JUSTIFY; - lg2.layout = vl2; - mainScrollContainer.addChild(lg2); - - lastLessonDateTextLabel = new Label(); - lastLessonDateTextLabel.embedFonts = true; - lastLessonDateTextLabel.textFormat = new TextFormat(Assets.getFont(Constants.MONTSERRAT_MEDIUM_500).fontName, Constants.FONT_SIZE_12, Constants.MAIN_COLOR1); - lastLessonDateTextLabel.text = "Dernier cours"; - lg2.addChild(lastLessonDateTextLabel);*/ - - /*var m = MXHXComponent.withMarkup(' - - - - - - - - ');*/ - - var m = MXHXComponent.withFile('MyMXHXcomp.mxhx'); - mainScrollContainer.addChild(m); - - - //mainScrollContainer.addChild(m); + /*var m = MXHXComponent.withFile('MyMXHXcomp.mxhx'); + mainScrollContainer.addChild(m);*/ drawer = mainScrollContainer; } - - - private function onCreationComplete(e:FeathersEvent):Void { traceBlue(this + " --> onCreationComplete() - w: " + width + " h: " + height); } - - - public function populateAndShow() { - // var rvo:RiderVO = model.selectedRider; // profile picture - ppal.source = Constants.PROFIL_PICTURES_PATH_512 + model.selectedRider.uid + ".jpg"; - - // first name text input - firstNameLabel.text = model.selectedRider.firstName; - if (!firstNameLabel.hasEventListener(Event.CHANGE)) { - firstNameLabel.addEventListener(Event.CHANGE, (e) -> { - if (firstNameLabel.text != model.selectedRider.firstName) { - model.updateSelectedRiderProp(RiderVO.FIRST_NAME, firstNameLabel.text); - } - }); - } - - // name text input - nameLabel.text = model.selectedRider.name; - if (!nameLabel.hasEventListener(Event.CHANGE)) { - nameLabel.addEventListener(Event.CHANGE, (e) -> { - if (nameLabel.text != model.selectedRider.name) { - model.updateSelectedRiderProp(RiderVO.NAME, nameLabel.text); - } - }); - } - - // remaining credit label & progress bar - updateCreditUIElments(null, model.selectedRider.credit); - Bind.bind(model.selectedRider.credit, updateCreditUIElments); - + ppal.source = Constants.PROFIL_PICTURES_PATH_512 + appModel.selectedRider.uid + ".jpg"; openDrawer(); } // update remaining credit label and progress bar - private function updateCreditUIElments(pFromValue:Dynamic, pToValue:Dynamic) { + /*private function updateCreditUIElments(pFromValue:Dynamic, pToValue:Dynamic) { creditLabel.text = Strings.RCD_S1 + Std.string(pToValue); @@ -255,5 +68,5 @@ class RiderCardDrawer extends Drawer { creditProgressBar.variant = LPTCTheme.H_PROGRESS_BAR_VARIANT_INFO; } creditProgressBar.value = pToValue; - } + }*/ } diff --git a/src/view/RiderCardDrawer.mxhx b/src/view/RiderCardDrawer.mxhx new file mode 100644 index 0000000..87371f7 --- /dev/null +++ b/src/view/RiderCardDrawer.mxhx @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file