increase size of yes/no box touch area

This commit is contained in:
Alula 2021-04-28 21:34:09 +02:00
parent 65be03261c
commit 8d906536c1
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
2 changed files with 4 additions and 4 deletions

View File

@ -479,7 +479,7 @@ impl GameScene {
batch.add_rect(
center + 51.0 + pos_x,
state.canvas_size.1 - 86.0,
pos_y + 10.0,
&state.constants.textscript.textbox_rect_cursor,
);
}

View File

@ -657,9 +657,9 @@ impl TextScriptVM {
let (off_left, _, off_right, off_bottom) =
crate::framework::graphics::screen_insets_scaled(ctx, state.scale);
let box_x = ((state.canvas_size.0 - off_left - off_right) / 2.0) as isize + 51;
let box_y = (state.canvas_size.1 - off_bottom - 96.0) as isize;
let box_y = (state.canvas_size.1 - off_bottom - 96.0 - 10.0) as isize;
if state.touch_controls.consume_click_in(Rect::new_size(box_x, box_y, 40, 20)) {
if state.touch_controls.consume_click_in(Rect::new_size(box_x, box_y, 40, 40)) {
match selection {
ConfirmSelection::Yes => confirm = true,
ConfirmSelection::No => {
@ -673,7 +673,7 @@ impl TextScriptVM {
);
}
}
} else if state.touch_controls.consume_click_in(Rect::new_size(box_x + 41, box_y, 40, 20)) {
} else if state.touch_controls.consume_click_in(Rect::new_size(box_x + 41, box_y, 40, 40)) {
match selection {
ConfirmSelection::Yes => {
state.sound_manager.play_sfx(1);