-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
vertical sliders #229
Comments
Hello! Scrolls are fine, they can work in any direction You have a kind if camera (scroll_view node) and game map (scroll_content). So you can scroll through all the map You can check the examples here https://insality.github.io/druid/druid/ and also make note how the GUI layout is created (for scroll view/content) If you have any concrete question, please answer :) |
I'm fairly sure there is a bug in the sliders. I cannot drag the pin if the I moved the pin to the 0 position for testing purposes. WorksThis works as expected. I can use mouse to drag the pin to the right to increase the value. local scroll_slider = self.druid:new_slider("grid_scroll_pin", vmath.vector3(287, 0, 0), function (_, value)
grid_scroll:scroll_to_percent(vmath.vector3(value, 0, 0), true)
end) Does not workCannot use mouse to drag the pin. Pin should be draggable to the left to increase the value local scroll_slider = self.druid:new_slider("grid_scroll_pin", vmath.vector3(-287, 0, 0), function (_, value)
grid_scroll:scroll_to_percent(vmath.vector3(value, 0, 0), true)
end) This issue persist for both horizontal and vertical. I tried to make a vertical scroll but got stopped by this issue when trying to make a slider where 0 value is at the top and 1 value is at the bottom. There was a broken success by rotating the EditLooks like a small change fixed this but I have no idea yet if it breaks something. if self.dist.x ~= 0 then
self.value = (self.target_pos.x - self.start_pos.x) / self.dist.x
end
if self.dist.y ~= 0 then
self.value = (self.target_pos.y - self.start_pos.y) / self.dist.y
end Edit 2Okay.. the above is not the fix. For now I got a vertical slider with a static grid working. So far the issue was that the pivot for Now to try to get it working with a data list.. Edit 3I had a huge headache when trying to get the slider to scroll the data list without it going too far when moving too fast. This problem fixed itself when I commented out this line in scroll.lua. The pin is scrolling the data list by calculating the list item index from percent. |
Hi,
about vertical sliders: it seems the end pos can only be positive? If not, how do you make a proper vertical slider?
Thanks.
The text was updated successfully, but these errors were encountered: