mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:04:54 +08:00
add GUI module
This commit is contained in:
+10
-2
@@ -4,6 +4,7 @@ import { ForwardPipeline } from '../pipeline/forward/forward-pipeline';
|
||||
import { RenderPipeline } from '../pipeline/render-pipeline';
|
||||
import { IRenderViewInfo, RenderView } from '../pipeline/render-view';
|
||||
import { IRenderSceneInfo, RenderScene } from '../renderer/scene/render-scene';
|
||||
import { GUI } from '../renderer/gui/gui';
|
||||
|
||||
export let _createSceneFun;
|
||||
export let _createViewFun;
|
||||
@@ -29,8 +30,12 @@ export class Root {
|
||||
return this._windows;
|
||||
}
|
||||
|
||||
public get pipeline (): RenderPipeline | null {
|
||||
return this._pipeline;
|
||||
public get pipeline (): RenderPipeline {
|
||||
return this._pipeline as RenderPipeline;
|
||||
}
|
||||
|
||||
public get gui (): GUI {
|
||||
return this._gui as GUI;
|
||||
}
|
||||
|
||||
public get scenes (): RenderScene[] {
|
||||
@@ -52,6 +57,7 @@ export class Root {
|
||||
private _windows: GFXWindow[] = [];
|
||||
private _mainWindow: GFXWindow | null = null;
|
||||
private _pipeline: RenderPipeline | null = null;
|
||||
private _gui: GUI | null = null;
|
||||
private _scenes: RenderScene[] = [];
|
||||
private _views: RenderView[] = [];
|
||||
private _frameTime: number = 0;
|
||||
@@ -78,6 +84,8 @@ export class Root {
|
||||
|
||||
this._pipeline = pipeline;
|
||||
|
||||
this._gui = new GUI(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { Root } from '../../core/root';
|
||||
|
||||
export class GUI {
|
||||
|
||||
public get root (): Root {
|
||||
return this._root;
|
||||
}
|
||||
|
||||
private _root: Root;
|
||||
|
||||
constructor (root: Root) {
|
||||
this._root = root;
|
||||
}
|
||||
|
||||
public frameMove (deltaTime: number) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user