Skip to content

Instantly share code, notes, and snippets.

@gnacu
Created April 18, 2024 21:32
Show Gist options
  • Save gnacu/2712fa325678e27b363cff58f62bb3c7 to your computer and use it in GitHub Desktop.
Save gnacu/2712fa325678e27b363cff58f62bb3c7 to your computer and use it in GitHub Desktop.
a_togfoot ;Menu option toggle footer
#storeget tstviews,9 ;Checkbox
jsr ptrthis
ldy #cflags
lda (this),y
eor #cf_state
sta (this),y
jsr thisdirt
;... fallthrough
togfoot ;Toggle Footer
;this -> checkbox
.block
#pushptr this
ldy #cflags
lda (this),y
and #cf_state
beq hidefoot
;-- Show Footer --
#storeget views,4 ;Footer
jsr ptrthis
ldy #dflags
lda (this),y
ora #df_visib.df_dirty
sta (this),y
#storeget views,3 ;Tab View
jsr ptrthis
#setobj8 this,offbot,6
jmp done
hidefoot ;-- Hide Footer --
#storeget views,4 ;Footer
jsr ptrthis
ldy #dflags
lda (this),y
ora #df_dirty
and #df_visib:$ff
sta (this),y
#storeget views,3 ;Tab View
jsr ptrthis
#setobj8 this,offbot,1
done #setflag this,mflags,mf_resiz
#storeget views,2 ;Rght Contain
jsr ptrthis
jsr thisdirt
#pullxy
jsr ptrthis
jmp mkdirt
.bend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment