summaryrefslogtreecommitdiff
path: root/textscreen
diff options
context:
space:
mode:
authorSimon Howard2006-08-31 18:11:07 +0000
committerSimon Howard2006-08-31 18:11:07 +0000
commitb20f94345cd4eb779acf08f3017d02d56aaad9a6 (patch)
treed421ffa271da57f7acc5ee2a71eb363542efa239 /textscreen
parent4306fa59932ef037855d8b783245987377038477 (diff)
downloadchocolate-doom-b20f94345cd4eb779acf08f3017d02d56aaad9a6.tar.gz
chocolate-doom-b20f94345cd4eb779acf08f3017d02d56aaad9a6.tar.bz2
chocolate-doom-b20f94345cd4eb779acf08f3017d02d56aaad9a6.zip
Change name of escape window actions to 'Close' and add a separate
'Abort' button creator. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 575
Diffstat (limited to 'textscreen')
-rw-r--r--textscreen/txt_window_action.c14
-rw-r--r--textscreen/txt_window_action.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c
index aabae15b..5df08e3b 100644
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -107,10 +107,24 @@ static void WindowAcceptCallback(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(window))
TXT_WidgetKeyPress(window, KEY_ENTER);
}
+// An action with the name "close" the closes the window
+
txt_window_action_t *TXT_NewWindowEscapeAction(txt_window_t *window)
{
txt_window_action_t *action;
+ action = TXT_NewWindowAction(KEY_ESCAPE, "Close");
+ TXT_SignalConnect(action, "pressed", WindowCloseCallback, window);
+
+ return action;
+}
+
+// Exactly the same as the above, but the button is named "abort"
+
+txt_window_action_t *TXT_NewWindowAbortAction(txt_window_t *window)
+{
+ txt_window_action_t *action;
+
action = TXT_NewWindowAction(KEY_ESCAPE, "Abort");
TXT_SignalConnect(action, "pressed", WindowCloseCallback, window);
diff --git a/textscreen/txt_window_action.h b/textscreen/txt_window_action.h
index 80e1d3e5..57028b80 100644
--- a/textscreen/txt_window_action.h
+++ b/textscreen/txt_window_action.h
@@ -43,6 +43,10 @@ txt_window_action_t *TXT_NewWindowAction(int key, char *label);
txt_window_action_t *TXT_NewWindowEscapeAction(txt_window_t *window);
+// Same as above, but the button is named "abort"
+
+txt_window_action_t *TXT_NewWindowAbortAction(txt_window_t *window);
+
// Accept button that does nothing
txt_window_action_t *TXT_NewWindowAcceptAction(txt_window_t *window);