d-gamedev-team / dimgui

dimgui is a D port of the imgui OpenGL GUI library.
zlib License
48 stars 13 forks source link

How to calculate vertical scrollvalue, if item is selected outside of dimgui? #26

Open gizmomogwai opened 1 year ago

gizmomogwai commented 1 year ago

Lets say I have an imageviewer, that uses dimgui to list the files to show. Besides clicking on the files, it is also possible to press a key to jump to the next file. In case the next file is outside of the current visible part of the scrollarea, the scrollarea needs to be adjusted. Question is how to calc the offset?