Panel, header, footer

This commit is contained in:
2025-11-14 16:13:39 +01:00
parent 0ea49051d0
commit 41221bdd77
36 changed files with 1886 additions and 17 deletions
+55 -5
View File
@@ -1,12 +1,62 @@
import components.NekoRectangle;
import openfl.display.Shape;
import openfl.display.Graphics;
import feathers.layout.AnchorLayoutData;
import feathers.layout.AnchorLayout;
import feathers.controls.LayoutGroup;
import openfl.display.Sprite;
import feathers.controls.Panel;
import feathers.controls.navigators.StackNavigator;
import feathers.controls.Application;
import feathers.controls.Label;
class LPTCManager2026 extends Application {
private var mainPanel:Panel;
// private var nav:StackNavigator;
public function new() {
super();
var label = new Label();
label.text = "Hello World";
addChild(label);
}
}
override private function initialize():Void {
super.initialize();
stage.displayState = NORMAL;
stage.scaleMode = NO_SCALE;
mainPanel = new Panel();
mainPanel.autoSizeMode = STAGE;
mainPanel.backgroundSkin = new NekoRectangle(0x93E9CB);
var header = new LayoutGroup();
header.variant = LayoutGroup.VARIANT_TOOL_BAR;
header.layout = new AnchorLayout();
var title = new Label();
title.text = "Header";
title.variant = Label.VARIANT_HEADING;
title.layoutData = AnchorLayoutData.center();
header.addChild(title);
mainPanel.header = header;
var footer = new LayoutGroup();
footer.variant = LayoutGroup.VARIANT_TOOL_BAR;
footer.layout = new AnchorLayout();
var title = new Label();
title.text = "Footer";
title.variant = Label.VARIANT_HEADING;
title.layoutData = AnchorLayoutData.center();
footer.addChild(title);
mainPanel.footer = footer;
addChild(mainPanel);
// nav = new StackNavigator();
trace(this, "--> initialize()");
}
}
+13
View File
@@ -0,0 +1,13 @@
package components;
import openfl.display.Shape;
class NekoRectangle extends Shape {
public function new(pColor:Int = 0xFF0000, pX:Int = 0, pY:Int = 0, pWidth:Int = 100, pHeight:Int = 100) {
super();
graphics.beginFill(pColor);
graphics.drawRect(pX, pY, pWidth, pHeight);
graphics.endFill();
}
}
+13
View File
@@ -0,0 +1,13 @@
package view;
import feathers.controls.ScrollContainer;
class UserLogin extends ScrollContainer {
public function new() {
super();
}
override private function initialize():Void {
super.initialize();
}
}