X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fquestion.C;h=768ead5fa7648372069c2d384d13d1d3928bdc42;hb=ca4207ccb98b0ce69a33461aaed0ad6b5504cbc2;hp=43130fca6db6856cc482ad087a6725da41d1cd2e;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/question.C b/cinelerra-5.1/cinelerra/question.C index 43130fca..768ead5f 100644 --- a/cinelerra-5.1/cinelerra/question.C +++ b/cinelerra-5.1/cinelerra/question.C @@ -27,15 +27,14 @@ #include "ctype.h" -#define WIDTH 375 -#define HEIGHT 160 +#define WIDTH xS(375) +#define HEIGHT yS(120) QuestionWindow::QuestionWindow(MWindow *mwindow) : BC_Window(_(PROGRAM_NAME ": Question"), mwindow->gui->get_abs_cursor_x(1) - WIDTH / 2, mwindow->gui->get_abs_cursor_y(1) - HEIGHT / 2, - WIDTH, - HEIGHT) + WIDTH, HEIGHT) { this->mwindow = mwindow; } @@ -47,13 +46,13 @@ QuestionWindow::~QuestionWindow() void QuestionWindow::create_objects(const char *string, int use_cancel) { lock_window("QuestionWindow::create_objects"); - int x = 10, y = 10; - add_subwindow(new BC_Title(10, 10, string)); - y += 30; + int x = xS(10), y = yS(10); + add_subwindow(new BC_Title(x, y, string)); + y += yS(30); add_subwindow(new QuestionYesButton(mwindow, this, x, y)); x += get_w() / 2; add_subwindow(new QuestionNoButton(mwindow, this, x, y)); - x = get_w() - 100; + x = get_w() - xS(100); if(use_cancel) add_subwindow(new BC_CancelButton(x, y)); unlock_window(); } @@ -77,7 +76,7 @@ int QuestionYesButton::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); } QuestionNoButton::QuestionNoButton(MWindow *mwindow, QuestionWindow *window, int x, int y) @@ -99,5 +98,5 @@ int QuestionNoButton::keypress_event() handle_event(); return 1; } - return 0; + return context_help_check_and_show(); }