1
0
Fork 0

Updated some dialog UI style

This commit is contained in:
Michaël Lemaire 2018-06-04 23:15:06 +02:00
parent b35e9d47fa
commit 395b09b24a
5 changed files with 16 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -9,12 +9,15 @@ module TK.SpaceTac.UI {
constructor(view: BaseView, message: string) {
super(view);
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#90FEE3", size: 32 });
this.content.text(message, this.width * 0.5, this.height * 0.4, { color: "#9FC4D6", size: 32, shadow: true });
this.result = new Promise((resolve, reject) => {
this.result = new Promise(resolve => {
this.result_resolver = resolve;
this.content.button("common-button-cancel", this.width * 0.4, this.height * 0.6, () => resolve(false), undefined, undefined, { center: true });
this.content.button("common-button-ok", this.width * 0.6, this.height * 0.6, () => resolve(true), undefined, undefined, { center: true });
this.content.button("menu-button-small", this.width * 0.4, this.height * 0.6, () => resolve(false),
undefined, undefined, { center: true, text: "Cancel", text_style: { color: "#9FC4D6", size: 22, shadow: true } });
this.content.button("menu-button-small", this.width * 0.6, this.height * 0.6, () => resolve(true),
undefined, undefined, { center: true, text: "OK", text_style: { color: "#9FC4D6", size: 22, shadow: true } });
});
}

View File

@ -9,19 +9,19 @@ module TK.SpaceTac.UI {
constructor(view: BaseView, message: string, initial?: string) {
super(view);
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#90FEE3", size: 32 });
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#9FC4D6", size: 32, shadow: true });
let input = new UITextInput(this.content.styled({ size: 24 }), "menu-input", this.width / 2, this.height / 2, 12);
let input = new UITextInput(this.content.styled({ size: 26, color: "#DBEFF9", shadow: true }), "menu-input", this.width / 2, this.height / 2, 12);
if (initial) {
input.setContent(initial);
}
this.result = new Promise((resolve, reject) => {
this.result = new Promise(resolve => {
this.result_resolver = resolve;
this.content.button("common-button-cancel", this.width * 0.4, this.height * 0.7, () => resolve(null),
undefined, undefined, { center: true });
this.content.button("common-button-ok", this.width * 0.6, this.height * 0.7, () => resolve(input.getContent()),
undefined, undefined, { center: true });
this.content.button("menu-button-small", this.width * 0.4, this.height * 0.7, () => resolve(null),
undefined, undefined, { center: true, text: "Cancel", text_style: { color: "#9FC4D6", size: 22, shadow: true } });
this.content.button("menu-button-small", this.width * 0.6, this.height * 0.7, () => resolve(input.getContent()),
undefined, undefined, { center: true, text: "OK", text_style: { color: "#9FC4D6", size: 22, shadow: true } });
});
}

View File

@ -6,7 +6,7 @@ module TK.SpaceTac.UI {
constructor(view: BaseView, message: string, cancel?: Function) {
super(view);
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#90FEE3", size: 32 });
this.content.text(message, this.width * 0.5, this.height * 0.3, { color: "#9FC4D6", size: 32 });
this.content.awaiter(this.width * 0.5, this.height * 0.6);
}
@ -15,7 +15,7 @@ module TK.SpaceTac.UI {
*/
displayError(message: string) {
this.content.clear();
this.content.text(message, this.width * 0.5, this.height * 0.5, { color: "#FE7069", size: 32 });
this.content.text(message, this.width * 0.5, this.height * 0.5, { color: "#FFDFBA", size: 32 });
}
}
}