summaryrefslogtreecommitdiff
path: root/src/setup/txt_joybinput.c
diff options
context:
space:
mode:
authorSimon Howard2011-10-20 22:00:46 +0000
committerSimon Howard2011-10-20 22:00:46 +0000
commit31a58552ffc647d2c87b557441d3725c6fba2b37 (patch)
tree093cf65027a121ddcf927fa772e503a6f502c545 /src/setup/txt_joybinput.c
parentabfc7bfe709000c1ca82654b64e6b43d3e06308a (diff)
downloadchocolate-doom-31a58552ffc647d2c87b557441d3725c6fba2b37.tar.gz
chocolate-doom-31a58552ffc647d2c87b557441d3725c6fba2b37.tar.bz2
chocolate-doom-31a58552ffc647d2c87b557441d3725c6fba2b37.zip
Use TXT_MessageBox where appropriate.
Subversion-branch: /branches/v2-branch Subversion-revision: 2446
Diffstat (limited to 'src/setup/txt_joybinput.c')
-rw-r--r--src/setup/txt_joybinput.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/setup/txt_joybinput.c b/src/setup/txt_joybinput.c
index 9ad26a45..97aaca94 100644
--- a/src/setup/txt_joybinput.c
+++ b/src/setup/txt_joybinput.c
@@ -76,22 +76,12 @@ static void PromptWindowClosed(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(joystick))
static void OpenErrorWindow(void)
{
- txt_window_t *window;
-
- window = TXT_NewWindow(NULL);
-
- TXT_AddWidget(window, TXT_NewLabel("Please configure a joystick first!"));
-
- TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL);
- TXT_SetWindowAction(window, TXT_HORIZ_CENTER,
- TXT_NewWindowEscapeAction(window));
- TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, NULL);
+ TXT_MessageBox(NULL, "Please configure a joystick first!");
}
static void OpenPromptWindow(txt_joystick_input_t *joystick_input)
{
txt_window_t *window;
- txt_label_t *label;
SDL_Joystick *joystick;
// Silently update when the shift button is held down.
@@ -115,16 +105,8 @@ static void OpenPromptWindow(txt_joystick_input_t *joystick_input)
// Open the prompt window
- window = TXT_NewWindow(NULL);
- TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL);
- TXT_SetWindowAction(window, TXT_HORIZ_CENTER,
- TXT_NewWindowAbortAction(window));
- TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, NULL);
-
- label = TXT_NewLabel("Press the new joystick button...");
+ window = TXT_MessageBox(NULL, "Press the new joystick button...");
- TXT_AddWidget(window, label);
- TXT_SetWidgetAlign(label, TXT_HORIZ_CENTER);
TXT_SDL_SetEventCallback(EventCallback, joystick_input);
TXT_SignalConnect(window, "closed", PromptWindowClosed, joystick);
joystick_input->prompt_window = window;