mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2024-09-28 06:56:58 +00:00
Scrolling fixes
- Fixed window titles rendering in wrong coordinate space - Fixed superfluous redrawing caused by scroll arrow clicking
This commit is contained in:
parent
7feec071c1
commit
0c12da7c89
31
views.s
31
views.s
@ -465,10 +465,12 @@ paintWindowTitle_compute:
|
|||||||
lsr
|
lsr
|
||||||
sec
|
sec
|
||||||
sbc SCRATCH1
|
sbc SCRATCH1
|
||||||
sta WG_LOCALCURSORX ; Position cursor
|
clc
|
||||||
lda #-1
|
adc WG_VIEWRECORDS+0,y
|
||||||
sta WG_LOCALCURSORY
|
sta WG_CURSORX ; Position cursor
|
||||||
jsr WGSyncGlobalCursor
|
lda WG_VIEWRECORDS+1,y
|
||||||
|
dec
|
||||||
|
sta WG_CURSORY
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
paintWindowTitleLoop:
|
paintWindowTitleLoop:
|
||||||
@ -592,6 +594,21 @@ WGViewFocus:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
; WGViewFocusQuiet
|
||||||
|
; Shifts focus to the selected view without redrawing anything
|
||||||
|
; Side effects: Changes selected view, repaints some views
|
||||||
|
;
|
||||||
|
WGViewFocusQuiet:
|
||||||
|
pha
|
||||||
|
|
||||||
|
lda WG_ACTIVEVIEW ; Stash current selection
|
||||||
|
sta WG_FOCUSVIEW ; Focus on our current selection
|
||||||
|
|
||||||
|
pla
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; WGViewUnfocus
|
; WGViewUnfocus
|
||||||
; Unfocuses all views
|
; Unfocuses all views
|
||||||
@ -878,21 +895,21 @@ WGPendingViewAction_done: ; Located here for branch range
|
|||||||
WGPendingViewAction_up:
|
WGPendingViewAction_up:
|
||||||
lda #1 ; Up arrow
|
lda #1 ; Up arrow
|
||||||
jsr WGScrollYBy
|
jsr WGScrollYBy
|
||||||
jsr WGViewFocus
|
jsr WGViewFocusQuiet
|
||||||
jsr WGViewFocusAction ; Trigger application to redraw contents
|
jsr WGViewFocusAction ; Trigger application to redraw contents
|
||||||
bra WGPendingViewAction_done
|
bra WGPendingViewAction_done
|
||||||
|
|
||||||
WGPendingViewAction_down:
|
WGPendingViewAction_down:
|
||||||
lda #-1 ; Down arrow
|
lda #-1 ; Down arrow
|
||||||
jsr WGScrollYBy
|
jsr WGScrollYBy
|
||||||
jsr WGViewFocus
|
jsr WGViewFocusQuiet
|
||||||
jsr WGViewFocusAction ; Trigger application to redraw contents
|
jsr WGViewFocusAction ; Trigger application to redraw contents
|
||||||
bra WGPendingViewAction_done
|
bra WGPendingViewAction_done
|
||||||
|
|
||||||
WGPendingViewAction_left:
|
WGPendingViewAction_left:
|
||||||
lda #1 ; Left arrow
|
lda #1 ; Left arrow
|
||||||
jsr WGScrollXBy
|
jsr WGScrollXBy
|
||||||
jsr WGViewFocus
|
jsr WGViewFocusQuiet
|
||||||
jsr WGViewFocusAction ; Trigger application to redraw contents
|
jsr WGViewFocusAction ; Trigger application to redraw contents
|
||||||
bra WGPendingViewAction_done
|
bra WGPendingViewAction_done
|
||||||
|
|
||||||
|
BIN
weegui.dsk
BIN
weegui.dsk
Binary file not shown.
2
weegui.s
2
weegui.s
@ -64,7 +64,7 @@ WGEntryPointTable:
|
|||||||
.addr WGViewFocusPrev
|
.addr WGViewFocusPrev
|
||||||
.addr WGViewFocusAction
|
.addr WGViewFocusAction
|
||||||
.addr WGPendingViewAction
|
.addr WGPendingViewAction
|
||||||
.addr WGPendingView
|
.addr WGPendingClick
|
||||||
.addr WGScrollX
|
.addr WGScrollX
|
||||||
.addr WGScrollXBy
|
.addr WGScrollXBy
|
||||||
.addr WGScrollY
|
.addr WGScrollY
|
||||||
|
Loading…
Reference in New Issue
Block a user