bug: scrolling Frame does not account for extended Dropdown #36

Closed
opened 2022-10-22 12:28:43 +08:00 by luiz00martins · 1 comment
luiz00martins commented 2022-10-22 12:28:43 +08:00 (Migrated from github.com)

Note: I'm not sure if this is a bug report or a feature request (i.e. if this is unintended or intended behaviour).


Describe the bug

An expanded Dropdown may have items inaccessible, as Frame scrolling is disabled while the dropdown is expanded.

Minimal Working Example

https://user-images.githubusercontent.com/43142209/197318853-3dfcea13-7f3d-40c5-ac11-a71f875ed1ba.mp4

local filePath = "/basalt.lua"
if not(fs.exists(filePath))then
    shell.run("pastebin run ESs1mg7P packed true "..filePath:gsub(".lua", ""))
end
local basalt = require(filePath:gsub(".lua", ""))

local main = basalt.createFrame("mainFrame"):setScrollable()

local w, h = term.getSize()

for i=1,5 do
	main:addDropdown('dropdown_'..tostring(i))
		:setPosition(2, h+i-2)
		:setSize(10, 1)
		:addItem('Item 1')
		:addItem('Item 2')
		:addItem('Item 3')
		:show()
end

basalt.autoUpdate()

In the example above, Item 2 and Item 3 are inaccessible, as:

  1. They are not visible even in that maximum scroll down of the Frame
  2. Further scrolling is disabled while the Dropdown is expanded

Expected behavior

Be able to scroll further down the Frame while the Dropdown is expanded.

Checklist

[x] I am running the latest version.

_Note: I'm not sure if this is a bug report or a feature request (i.e. if this is unintended or intended behaviour)._ --- ### Describe the bug An expanded `Dropdown` may have items inaccessible, as `Frame` scrolling is disabled while the dropdown is expanded. ### Minimal Working Example https://user-images.githubusercontent.com/43142209/197318853-3dfcea13-7f3d-40c5-ac11-a71f875ed1ba.mp4 ```lua local filePath = "/basalt.lua" if not(fs.exists(filePath))then shell.run("pastebin run ESs1mg7P packed true "..filePath:gsub(".lua", "")) end local basalt = require(filePath:gsub(".lua", "")) local main = basalt.createFrame("mainFrame"):setScrollable() local w, h = term.getSize() for i=1,5 do main:addDropdown('dropdown_'..tostring(i)) :setPosition(2, h+i-2) :setSize(10, 1) :addItem('Item 1') :addItem('Item 2') :addItem('Item 3') :show() end basalt.autoUpdate() ``` In the example above, `Item 2` and `Item 3` are inaccessible, as: 1. They are not visible even in that maximum scroll down of the `Frame` 2. Further scrolling is disabled while the `Dropdown` is expanded ### Expected behavior Be able to scroll further down the `Frame` while the `Dropdown` is expanded. ### Checklist [x] I am running the latest version.
NoryiE commented 2022-10-23 04:46:15 +08:00 (Migrated from github.com)

Hello, i guess this is the fix you want: b303b46
currently only on the dev branch available

Hello, i guess this is the fix you want: [b303b46](https://github.com/Pyroxenium/Basalt/commit/b303b46e0869e251c31d902574daaf00afefb98d) currently only on the dev branch available
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GitHub/Basalt#36
No description provided.