From 9c28638fa73af92d7a96e09b629efee2348df84a Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 11 Dec 2016 00:13:40 +0100 Subject: [PATCH] add OK/Cancel functionality dialogue --- resources/assets/typescript/Sakura/Dialogue.ts | 6 ++++++ resources/assets/typescript/Sakura/DialogueButton.ts | 3 ++- resources/assets/typescript/Sakura/DialogueType.ts | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/assets/typescript/Sakura/Dialogue.ts b/resources/assets/typescript/Sakura/Dialogue.ts index b6fa287..dfbb8f9 100644 --- a/resources/assets/typescript/Sakura/Dialogue.ts +++ b/resources/assets/typescript/Sakura/Dialogue.ts @@ -40,6 +40,12 @@ namespace Sakura } break; + case DialogueType.OKCancel: + modifiers.push('ok-cancel'); + buttons.push(DialogueButton.Cancel); + buttons.push(DialogueButton.Ok); + break; + default: modifiers.push('info'); buttons.push(DialogueButton.Ok); diff --git a/resources/assets/typescript/Sakura/DialogueButton.ts b/resources/assets/typescript/Sakura/DialogueButton.ts index 8494386..29b80e5 100644 --- a/resources/assets/typescript/Sakura/DialogueButton.ts +++ b/resources/assets/typescript/Sakura/DialogueButton.ts @@ -4,6 +4,7 @@ namespace Sakura { Yes, No, - Ok + Ok, + Cancel } } diff --git a/resources/assets/typescript/Sakura/DialogueType.ts b/resources/assets/typescript/Sakura/DialogueType.ts index d6e6813..f936590 100644 --- a/resources/assets/typescript/Sakura/DialogueType.ts +++ b/resources/assets/typescript/Sakura/DialogueType.ts @@ -4,6 +4,7 @@ namespace Sakura { Info, Confirm, - ConfirmNegative + ConfirmNegative, + OKCancel } }