header fonts
This commit is contained in:
+17
-15
@@ -1,19 +1,15 @@
|
||||
import openfl.Assets;
|
||||
import openfl.text.Font;
|
||||
import feathers.text.TextFormat;
|
||||
import model.Constants;
|
||||
import feathers.layout.VerticalAlign;
|
||||
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;
|
||||
import feathers.controls.LayoutGroup;
|
||||
import feathers.controls.Panel;
|
||||
import feathers.layout.AnchorLayout;
|
||||
import feathers.layout.AnchorLayoutData;
|
||||
import feathers.text.TextFormat;
|
||||
import model.Constants;
|
||||
import openfl.Assets;
|
||||
import openfl.text.Font;
|
||||
|
||||
class LPTCManager2026 extends Application {
|
||||
private var mainPanel:Panel;
|
||||
@@ -34,23 +30,29 @@ class LPTCManager2026 extends Application {
|
||||
mainPanel.autoSizeMode = STAGE;
|
||||
mainPanel.backgroundSkin = new NekoRectangle(Constants.MAIN_COLOR3);
|
||||
|
||||
// ############################################################################################# HEADER
|
||||
var header = new LayoutGroup();
|
||||
header.autoSizeMode = CONTENT;
|
||||
header.backgroundSkin = new NekoRectangle(Constants.HERO_COLOR, 0, 0, stage.stageWidth, Std.int(stage.stageHeight * 8 / 100));
|
||||
header.backgroundSkin = new NekoRectangle(Constants.HERO_COLOR, 0, 0, Std.int(stage.stageWidth * Constants.MAIN_HEADER_WIDTH_RATIO), Std.int(stage.stageHeight * Constants.MAIN_HEADER_HEIGHT_RATIO));
|
||||
header.variant = LayoutGroup.VARIANT_TOOL_BAR;
|
||||
header.layout = new AnchorLayout();
|
||||
|
||||
var title = new Label();
|
||||
title.backgroundSkin = new NekoRectangle(Constants.ACCENT_COLOR2, 0, 0, 200, 80);
|
||||
title.verticalAlign = VerticalAlign.MIDDLE;
|
||||
title.text = "Header";
|
||||
var fnt:Font = Assets.getFont(Constants.MONTSERRAT_SEMIBOLD_600);
|
||||
var fnt:Font = Assets.getFont(Constants.MONTSERRAT_MEDIUM_500);
|
||||
|
||||
title.textFormat = new TextFormat(fnt.fontName, 20, Constants.MAIN_COLOR3);
|
||||
var tf:TextFormat = new TextFormat(fnt.fontName, Std.int(stage.stageHeight * Constants.MAIN_HEADER_HEIGHT_RATIO * .1), Constants.MAIN_COLOR3);
|
||||
title.textFormat = tf;
|
||||
|
||||
title.variant = Label.VARIANT_HEADING;
|
||||
title.layoutData = AnchorLayoutData.center();
|
||||
header.addChild(title);
|
||||
|
||||
mainPanel.header = header;
|
||||
|
||||
// ############################################################################################# FOOTER
|
||||
var footer = new LayoutGroup();
|
||||
|
||||
footer.autoSizeMode = CONTENT;
|
||||
|
||||
@@ -11,8 +11,14 @@ class Constants {
|
||||
public static final MAIN_COLOR3:Int = 0xECEFF0;
|
||||
|
||||
// Fonts
|
||||
public static final MONTSERRAT_SEMIBOLD_600:String = "Montserrat_SemiBold_600";
|
||||
public static final MONTSERRAT_LIGHT_300:String = "MontserratLight300";
|
||||
public static final MONTSERRAT_REGULAR_400:String = "MontserratRegular400";
|
||||
public static final MONTSERRAT_MEDIUM_500:String = "MontserratMedium500";
|
||||
public static final MONTSERRAT_BOLD_700:String = "MontserratBold700";
|
||||
|
||||
// UI Proportions against satge dimmentions
|
||||
public static final MAIN_HEADER_WIDTH_RATIO:Float = 1;
|
||||
public static final MAIN_HEADER_HEIGHT_RATIO:Float = 0.3;
|
||||
|
||||
private function new() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user