2017-09-24 22:23:22 +00:00
|
|
|
module TK.SpaceTac.UI {
|
2017-07-20 15:32:00 +00:00
|
|
|
/**
|
|
|
|
* Dialog with a waiting indicator
|
|
|
|
*/
|
|
|
|
export class UIWaitingDialog extends UIDialog {
|
|
|
|
constructor(view: BaseView, message: string, cancel?: Function) {
|
|
|
|
super(view);
|
|
|
|
|
2018-06-04 21:15:06 +00:00
|
|
|
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#9FC4D6", size: 32 });
|
2018-06-03 21:27:35 +00:00
|
|
|
this.content.awaiter(this.width * 0.5, this.height * 0.6);
|
2017-07-20 15:32:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display an error as the result of waiting.
|
|
|
|
*/
|
|
|
|
displayError(message: string) {
|
2018-05-15 14:57:45 +00:00
|
|
|
this.content.clear();
|
2018-06-04 21:15:06 +00:00
|
|
|
this.content.text(message, this.width * 0.5, this.height * 0.5, { color: "#FFDFBA", size: 32 });
|
2017-07-20 15:32:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|