Issue with scrolling in item description #35766
Labels
<Bug>
This needs to be fixed
Controls / Input
Keyboard, mouse, keybindings, input UI, etc.
Info / User Interface
Game - player communication, menus, etc.
Items / Item Actions / Item Qualities
Items and how they work and interact
Describe the bug
When scrolling the description of an item with PgUp and PgDown, the scrolling might get stuck.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Since pressing PgUp x number of times does not scroll the description, a single PgDn key press in step 3 above should suffice to scroll the description down by one step, not x+1 key presses.
Versions and configuration
22:23:00.906 : Starting log.
22:23:00.906 INFO : Cataclysm DDA version 0.D-9735-gc3982c9
22:23:00.908 INFO : Number of render drivers on your system: 3
22:23:00.908 INFO : Render driver: 0/opengl
22:23:00.908 INFO : Render driver: 1/opengles2
22:23:00.908 INFO : Render driver: 2/software
22:23:01.073 INFO : SDL version used during compile is 2.0.4
22:23:01.073 INFO : SDL version used during linking and in runtime is 2.0.8
22:23:01.165 INFO : Active renderer: 2/software
22:23:01.177 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0
22:23:01.200 WARNING : opendir [./mods/] failed with "Ingen sådan fil eller filkatalog".
22:23:04.141 WARNING : opendir [./save/Birdseye/mods] failed with "Ingen sådan fil eller filkatalog".
22:23:11.243 INFO : Loaded tileset: retrodays
22:23:28.177 : GAME REPORT:
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]
22:23:32.263 : Log shutdown.
Additional context
The bug seems to occur for any item whose entire description requires scrolling with PgUp and PgDn. It probably isn't necessary to use the attached save to obtain the bug.
A similar bug occurs when scrolling to the bottom of the item description and then pressing PgDn x number of times. Scrolling the description up by one step now requires PgUp to be pressed x+1 times.
I assume that somewhere in the code, the scroll offset is incremented/decremented even when it is outside the bounds defined by the item description and this causes the bug.
ScrollProblems.zip
The text was updated successfully, but these errors were encountered: