Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with scrolling in item description #35766

Closed
ZoolookCDDA opened this issue Nov 28, 2019 · 1 comment · Fixed by #35929
Closed

Issue with scrolling in item description #35766

ZoolookCDDA opened this issue Nov 28, 2019 · 1 comment · Fixed by #35929
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

Comments

@ZoolookCDDA
Copy link

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:

  1. In the attached save game, press 'V' and go to the description for the cellphone.
  2. Press PgUp any positive x number of times.
  3. Now, scrolling the item description 1 step down requires x+1 PgDn key presses

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:

  • OS: Linux
    • OS Version: Distributor ID: Ubuntu; Description: Ubuntu 18.04.3 LTS; Release: 18.04; Codename: bionic;
  • Game Version: 0.D-9735-gc3982c9 [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    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

@KorGgenT KorGgenT added <Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. Items / Item Actions / Item Qualities Items and how they work and interact labels Dec 7, 2019
@Night-Pryanik Night-Pryanik added the Controls / Input Keyboard, mouse, keybindings, input UI, etc. label Dec 7, 2019
@8street
Copy link
Contributor

8street commented Dec 7, 2019

Sorry for the previous commits, now I'll redo everything. I found a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants