1
0
Fork 0
spacetac/src/ui/common/UIWaitingDialog.ts

21 lines
700 B
TypeScript
Raw Normal View History

2017-09-24 22:23:22 +00:00
module TK.SpaceTac.UI {
/**
* 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);
}
/**
* 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 });
}
}
}