mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 05:50:24 +00:00
prompt handlers
This commit is contained in:
parent
e7adcc2232
commit
0bc3ecdbb6
@ -3958,10 +3958,9 @@ LBC0C: jsr LBDE1
|
|||||||
bpl LBC42
|
bpl LBC42
|
||||||
MGTK_RELAY2_CALL MGTK::InRect, cancel_rect
|
MGTK_RELAY2_CALL MGTK::InRect, cancel_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
bne LBC2D
|
bne :+
|
||||||
jmp LBCE9
|
jmp LBCE9
|
||||||
|
: bit alert_action
|
||||||
LBC2D: bit alert_action
|
|
||||||
bvs LBC42
|
bvs LBC42
|
||||||
MGTK_RELAY2_CALL MGTK::InRect, try_again_rect
|
MGTK_RELAY2_CALL MGTK::InRect, try_again_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
@ -17979,11 +17978,11 @@ LA579: MGTK_RELAY_CALL MGTK::GetEvent, event_params
|
|||||||
lda event_params_kind
|
lda event_params_kind
|
||||||
cmp #MGTK::event_kind_button_down
|
cmp #MGTK::event_kind_button_down
|
||||||
bne LA58C
|
bne LA58C
|
||||||
jmp LA5EE
|
jmp prompt_click_handler
|
||||||
|
|
||||||
LA58C: cmp #MGTK::event_kind_key_down
|
LA58C: cmp #MGTK::event_kind_key_down
|
||||||
bne LA593
|
bne LA593
|
||||||
jmp LA6FD
|
jmp prompt_key_handler
|
||||||
|
|
||||||
LA593: lda LD8E8
|
LA593: lda LD8E8
|
||||||
beq prompt_input_loop
|
beq prompt_input_loop
|
||||||
@ -18013,7 +18012,10 @@ LA5E5: jsr set_cursor_pointer_with_flag
|
|||||||
LA5E8: jsr reset_state
|
LA5E8: jsr reset_state
|
||||||
jmp prompt_input_loop
|
jmp prompt_input_loop
|
||||||
|
|
||||||
LA5EE: MGTK_RELAY_CALL MGTK::FindWindow, event_params_coords
|
;;; Click handler for prompt dialog
|
||||||
|
|
||||||
|
prompt_click_handler:
|
||||||
|
MGTK_RELAY_CALL MGTK::FindWindow, event_params_coords
|
||||||
lda findwindow_params_which_area
|
lda findwindow_params_which_area
|
||||||
bne LA5FF
|
bne LA5FF
|
||||||
lda #$FF
|
lda #$FF
|
||||||
@ -18045,7 +18047,7 @@ LA614: lda winfoF
|
|||||||
LA63A: MGTK_RELAY_CALL MGTK::InRect, desktop_aux::ok_button_rect
|
LA63A: MGTK_RELAY_CALL MGTK::InRect, desktop_aux::ok_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq check_button_ok
|
beq check_button_ok
|
||||||
jmp LA6C1
|
jmp maybe_check_button_cancel
|
||||||
|
|
||||||
prompt_button_ok := 0
|
prompt_button_ok := 0
|
||||||
prompt_button_cancel := 1
|
prompt_button_cancel := 1
|
||||||
@ -18086,7 +18088,7 @@ check_button_no:
|
|||||||
check_button_all:
|
check_button_all:
|
||||||
MGTK_RELAY_CALL MGTK::InRect, desktop_aux::all_button_rect
|
MGTK_RELAY_CALL MGTK::InRect, desktop_aux::all_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
bne LA6C1
|
bne maybe_check_button_cancel
|
||||||
jsr set_penmode_xor2
|
jsr set_penmode_xor2
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::all_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::all_button_rect
|
||||||
jsr button_loop_all
|
jsr button_loop_all
|
||||||
@ -18094,7 +18096,8 @@ check_button_all:
|
|||||||
lda #prompt_button_all
|
lda #prompt_button_all
|
||||||
: rts
|
: rts
|
||||||
|
|
||||||
LA6C1: bit LD8E7
|
maybe_check_button_cancel:
|
||||||
|
bit LD8E7
|
||||||
bpl check_button_cancel
|
bpl check_button_cancel
|
||||||
lda #$FF
|
lda #$FF
|
||||||
rts
|
rts
|
||||||
@ -18102,10 +18105,9 @@ LA6C1: bit LD8E7
|
|||||||
check_button_cancel:
|
check_button_cancel:
|
||||||
MGTK_RELAY_CALL MGTK::InRect, desktop_aux::cancel_button_rect
|
MGTK_RELAY_CALL MGTK::InRect, desktop_aux::cancel_button_rect
|
||||||
cmp #MGTK::inrect_inside
|
cmp #MGTK::inrect_inside
|
||||||
beq LA6D9
|
beq :+
|
||||||
jmp LA6ED
|
jmp LA6ED
|
||||||
|
: jsr set_penmode_xor2
|
||||||
LA6D9: jsr set_penmode_xor2
|
|
||||||
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::cancel_button_rect
|
MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::cancel_button_rect
|
||||||
jsr button_loop_cancel
|
jsr button_loop_cancel
|
||||||
bmi :+
|
bmi :+
|
||||||
@ -18121,8 +18123,11 @@ LA6F7: jsr LB9B8
|
|||||||
lda #$FF
|
lda #$FF
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LA6FD: lda event_params_modifiers
|
;;; Key handler for prompt dialog
|
||||||
cmp #$2 ; closed-apple
|
|
||||||
|
prompt_key_handler:
|
||||||
|
lda event_params_modifiers
|
||||||
|
cmp #MGTK::event_modifier_solid_apple
|
||||||
bne LA71A
|
bne LA71A
|
||||||
lda event_params_key
|
lda event_params_key
|
||||||
and #$7F
|
and #$7F
|
||||||
|
3
mgtk.inc
3
mgtk.inc
@ -531,6 +531,9 @@ event_kind_key_down := 3 ; Key was pressed
|
|||||||
event_kind_drag := 4 ; Mouse button still down
|
event_kind_drag := 4 ; Mouse button still down
|
||||||
event_kind_apple_key := 5 ; Mouse button was depressed, modifier key down
|
event_kind_apple_key := 5 ; Mouse button was depressed, modifier key down
|
||||||
|
|
||||||
|
event_modifier_open_apple := 1 << 0
|
||||||
|
event_modifier_solid_apple := 1 << 1
|
||||||
|
|
||||||
;;; Used in FindWindow
|
;;; Used in FindWindow
|
||||||
area_desktop := 0
|
area_desktop := 0
|
||||||
area_menubar := 1
|
area_menubar := 1
|
||||||
|
Loading…
Reference in New Issue
Block a user