Skip to content

Commit

Permalink
LBTK: Fix regression in redraw while scrolling
Browse files Browse the repository at this point in the history
Over-optimization in 5f615cf. Maybe it can be restored.
  • Loading branch information
inexorabletash committed Jan 10, 2025
1 parent 5f615cf commit c9dbaee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions res/notes/testplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,7 @@ Repeat for each list box:
* Selects the last item.
* Hold down the mouse button on the scrollbar's up arrow or down arrow; verify that the scrolling continues as long as the button is held down.
* Click on an item. Verify it is selected. Click on white space below the items (if possible). Verify that selection is cleared.
* Hold the down arrow to scroll to the bottom of the list. Hold the up arrow to scroll to the top. Verify the correct items redraw.

For the Sounds DA:
* Click on an item. Verify it is selected, and plays the sound. Click on the same selected item. Verify it plays the sound again.
Expand Down
5 changes: 2 additions & 3 deletions toolkits/lbtk.s
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,6 @@ update:
lda lbr_copy + LBTK::ListBoxRecord::num_items
beq finish

index := tmp_point + .sizeof(MGTK::Point)

lda lbr_copy + LBTK::ListBoxRecord::num_rows
sta rows
ldy #MGTK::Winfo::vthumbpos
Expand All @@ -725,7 +723,8 @@ update:
loop:
MGTK_CALL MGTK::MoveTo, tmp_point

lda index
index := *+1
lda #SELF_MODIFIED_BYTE
ldxy #tmp_point
jsr DrawEntryProc

Expand Down

0 comments on commit c9dbaee

Please sign in to comment.