mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-25 10:30:50 +00:00
STF: Apple Left/Right as Home/End. Fixes #4
This commit is contained in:
parent
39581705cf
commit
045a48cd1e
@ -516,17 +516,26 @@ title: jsr on_title_bar_click
|
||||
beq no_mod
|
||||
|
||||
;; Modifiers
|
||||
;; TODO: Should Apple-Up/Down be Page Up/Down or Home/End?
|
||||
lda event_params::key
|
||||
|
||||
cmp #CHAR_DOWN
|
||||
cmp #CHAR_DOWN ; Apple-Down = Page Down
|
||||
bne :+
|
||||
jsr page_down
|
||||
jmp input_loop
|
||||
|
||||
: cmp #CHAR_UP
|
||||
: cmp #CHAR_UP ; Apple-Up = Page Up
|
||||
bne :+
|
||||
jsr page_up
|
||||
jmp input_loop
|
||||
|
||||
: cmp #CHAR_LEFT ; Apple-Left = Home
|
||||
bne :+
|
||||
jsr scroll_top
|
||||
jmp input_loop
|
||||
|
||||
: cmp #CHAR_RIGHT ; Apple-Right = End
|
||||
bne :+
|
||||
jsr scroll_bottom
|
||||
|
||||
: jmp input_loop
|
||||
|
||||
@ -717,6 +726,14 @@ end: rts
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
.proc scroll_top
|
||||
lda winfo::vthumbpos
|
||||
beq end
|
||||
copy #0, updatethumb_params::thumbpos
|
||||
jsr update_scroll_pos
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
vscroll_max := $FA
|
||||
|
||||
.proc on_vscroll_below_click
|
||||
@ -762,6 +779,15 @@ end: rts
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
.proc scroll_bottom
|
||||
lda winfo::vthumbpos
|
||||
cmp #vscroll_max
|
||||
beq end
|
||||
copy #vscroll_max, updatethumb_params::thumbpos
|
||||
jsr update_scroll_pos
|
||||
end: rts
|
||||
.endproc
|
||||
|
||||
.proc update_scroll_pos ; Returns with carry set if mouse released
|
||||
jsr update_voffset
|
||||
jsr update_vscroll
|
||||
|
Loading…
Reference in New Issue
Block a user