Unchecked commits to resume work on linux
This commit is contained in:
parent
d1f92b47ed
commit
5bc968b800
@ -18,10 +18,8 @@ class Main extends Sprite {
|
||||
private function onInit(e:Event)
|
||||
{
|
||||
//Scanner.scanTextureDir();
|
||||
trace("heyy");
|
||||
stage.frameRate = 1000;
|
||||
var game:Game = new Game(stage);
|
||||
trace("kokk");
|
||||
stage.addEventListener(Event.ENTER_FRAME, game.onEnterFrame);
|
||||
stage.addEventListener(KeyboardEvent.KEY_DOWN,Input.onKeyIsDown);
|
||||
stage.addEventListener(KeyboardEvent.KEY_UP,Input.onKeyIsUp);
|
||||
@ -30,7 +28,6 @@ class Main extends Sprite {
|
||||
//Mode.setVideoMode(1280, 960);
|
||||
}
|
||||
private function onResize (event:Event):Void {
|
||||
trace("yeet");
|
||||
//Here we can do shit with window scaling
|
||||
//stage.stageWidth;
|
||||
//stage.stageHeight;
|
||||
|
||||
@ -12,6 +12,13 @@ import engine.ConVar;
|
||||
import game.ui.console.Console;
|
||||
//import Lib.application.
|
||||
|
||||
|
||||
typedef UINode = {
|
||||
object:UIPane,
|
||||
?children:Array<UINode>
|
||||
}
|
||||
|
||||
|
||||
class UITool{
|
||||
public static var ccmd_dev_uitool = ConVar.registerCCmd("dev_uitool", (args:Array<String>) -> { open();});
|
||||
public static var uiEditorWindow:openfl.display.Window;
|
||||
@ -41,6 +48,36 @@ class UITool{
|
||||
|
||||
public static var ccmd_dev_uitool_refresh = ConVar.registerCCmd("dev_uitool_refresh", update);
|
||||
|
||||
public static var uiNodes:Map<UIPane, UINode> = [];
|
||||
public static var rootNodes:Array<UINode> = [];
|
||||
public static function collect(){
|
||||
for(pane in UIPane.panelist){
|
||||
var node:UINode = null;
|
||||
if(uiNodes[pane] == null){
|
||||
node = {
|
||||
object: pane,
|
||||
children: []
|
||||
};
|
||||
}
|
||||
else{
|
||||
node = uiNodes[pane];
|
||||
}
|
||||
var parentNode:UINode = null;
|
||||
if(uiNodes[pane.parent] == null){
|
||||
parentNode = {
|
||||
object:pane.parent,
|
||||
children: []
|
||||
}
|
||||
}
|
||||
else{
|
||||
parentNode = uiNodes[pane.parent];
|
||||
}
|
||||
parentNode.children.push(node);
|
||||
if(pane.parent == null){
|
||||
rootNodes.push(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function update(args:Array<String>){
|
||||
|
||||
@ -6,6 +6,7 @@ package engine.ui;
|
||||
// | ____ | | | |_ \ | ____|
|
||||
// | | | | | \__/ | | |____
|
||||
// |__| |__| \______/ |______|
|
||||
|
||||
/*
|
||||
/ file: UIPane.hx
|
||||
/ author: and.schaafsma@gmail.com
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user