|
|
@@ -45,6 +45,9 @@ class MainFrame extends ScriptWidget {
|
|
|
|
|
|
this.getWidget("consolecontainer").visibility = Atomic.UI_WIDGET_VISIBILITY.UI_WIDGET_VISIBILITY_GONE;
|
|
|
|
|
|
+ this.statusText = <Atomic.UIEditField>this.getWidget("editorStatusText");
|
|
|
+ this.statusText.subscribeToEvent(Atomic.UpdateEvent((ev) => this.handleStatusAging(ev)));
|
|
|
+
|
|
|
this.inspectorframe = new InspectorFrame();
|
|
|
this.inspectorlayout.addChild(this.inspectorframe);
|
|
|
|
|
|
@@ -182,6 +185,20 @@ class MainFrame extends ScriptWidget {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ showStatusText(message: string) {
|
|
|
+ this.statusText.text = message; // display the status message
|
|
|
+ this.updateDelta = 10.0; // start the clock for removing the text
|
|
|
+ }
|
|
|
+
|
|
|
+ handleStatusAging(ev) { // to avoid showing stale status text
|
|
|
+ if ( this.updateDelta > 0 ) {
|
|
|
+ this.updateDelta -= ev.timeStep;
|
|
|
+ if ( this.updateDelta < 0 )
|
|
|
+ this.statusText.text = ""; // remove it after 10 seconds.
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
projectframe: ProjectFrame;
|
|
|
resourceframe: ResourceFrame;
|
|
|
inspectorframe: InspectorFrame;
|
|
|
@@ -191,7 +208,8 @@ class MainFrame extends ScriptWidget {
|
|
|
mainToolbar: MainToolbar;
|
|
|
animationToolbar: AnimationToolbar;
|
|
|
menu: MainFrameMenu;
|
|
|
-
|
|
|
+ statusText: Atomic.UIEditField;
|
|
|
+ updateDelta: number;
|
|
|
}
|
|
|
|
|
|
export = MainFrame;
|