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