mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2025-03-03 17:30:17 +00:00
- Arbitrary view focusing
This commit is contained in:
parent
d9aaa8144a
commit
6ca94984bc
10
gui.s
10
gui.s
@ -145,6 +145,8 @@ keyLoop:
|
||||
beq keyLoop_toggle
|
||||
cmp #32
|
||||
beq keyLoop_toggle
|
||||
cmp #'o'
|
||||
beq keyLoop_focusOkay
|
||||
|
||||
jmp keyLoop
|
||||
|
||||
@ -159,7 +161,13 @@ keyLoop_focusPrev:
|
||||
keyLoop_toggle:
|
||||
jsr WGViewFocusAction
|
||||
jmp keyLoop
|
||||
|
||||
|
||||
keyLoop_focusOkay:
|
||||
lda #2
|
||||
jsr WGSelectView
|
||||
jsr WGViewFocus
|
||||
jmp keyLoop
|
||||
|
||||
rts ; This seems to work for returning to BASIC.SYSTEM, but I don't think it's right
|
||||
|
||||
|
||||
|
BIN
guidemo.dsk
BIN
guidemo.dsk
Binary file not shown.
42
views.s
42
views.s
@ -486,6 +486,42 @@ WGSelectView_done:
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGViewFocus
|
||||
; Shifts focus to the selected view
|
||||
; Side effects: Changes selected view, repaints some views
|
||||
;
|
||||
WGViewFocus:
|
||||
SAVE_AY
|
||||
|
||||
lda WG_ACTIVEVIEW ; Stash current selection
|
||||
pha
|
||||
|
||||
LDY_FOCUSVIEW ; Unfocus current view
|
||||
lda WG_VIEWRECORDS+9,y
|
||||
and #%01111111
|
||||
sta WG_VIEWRECORDS+9,y
|
||||
|
||||
lda WG_FOCUSVIEW
|
||||
jsr WGSelectView
|
||||
jsr WGPaintView
|
||||
|
||||
pla
|
||||
sta WG_FOCUSVIEW ; Focus on our original selection
|
||||
jsr WGSelectView
|
||||
|
||||
LDY_FOCUSVIEW
|
||||
|
||||
lda WG_VIEWRECORDS+9,y ; Change state and repaint to reflect it
|
||||
ora #%10000000
|
||||
sta WG_VIEWRECORDS+9,y
|
||||
|
||||
jsr WGPaintView
|
||||
|
||||
RESTORE_AY
|
||||
rts
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; WGViewFocusNext
|
||||
; Shifts focus to the next view
|
||||
@ -511,7 +547,7 @@ WGViewFocusNext:
|
||||
sta WG_FOCUSVIEW
|
||||
|
||||
WGViewFocusNext_focus:
|
||||
lda WG_FOCUSVIEW
|
||||
lda WG_FOCUSVIEW ; Change state and repaint to reflect it
|
||||
jsr WGSelectView
|
||||
|
||||
lda WG_VIEWRECORDS+9,y
|
||||
@ -554,11 +590,11 @@ WGViewFocusPrev_findEndLoop:
|
||||
bra WGViewFocusPrev_findEndLoop
|
||||
|
||||
WGViewFocusPrev_focus:
|
||||
lda WG_FOCUSVIEW
|
||||
lda WG_FOCUSVIEW ; Change state and repaint to reflect it
|
||||
jsr WGSelectView
|
||||
|
||||
LDY_FOCUSVIEW
|
||||
|
||||
|
||||
lda WG_VIEWRECORDS+9,y
|
||||
ora #%10000000
|
||||
sta WG_VIEWRECORDS+9,y
|
||||
|
Loading…
x
Reference in New Issue
Block a user