Closed Qwertygiy closed 5 years ago
Further information:
The NUI Editor dropdown has the same issue.
The Video Settings scrollbar does not have the same issue.
My initial guess with this information is that the scrollbar knob is not properly capturing the mouse click before the options in the dropdown list, as if the knob is either "behind" the options; a lower priority than the options; or not "interrupting" the click's progress to prevent it from reaching the options.
The universe setup screen in the advanced setup also has the same problem. Clicking a location on the scroll bar makes the menu disappear, but on reopening it we can see that the knob is at the position we clicked on before.
Same in the languge select menu. I think the answer somewhere in UIDropdownScrollable class, because all of thouse are dropdownscrollables, and "video settings" menu is not.
@Override
public boolean onMouseClick(NUIMouseClickEvent event) {
opened = !opened;
if (opened) {
optionListeners.clear();
for (int i = 0; i < getOptions().size(); ++i) {
optionListeners.add(new ItemListener(i));
}
}
return true;
}
Code snippet from the UIDropdownScrollable class. On click, opened
is just getting flipped. That explains why the scrollbar is closing on clicking anywhere inside it, including the vertical bar. How can I check whether the click position is on the options, or the scrollbar?
What you were trying to do
Clicking the knob beside the Gameplay Template options in the main menu to drag it and scroll it up and down between choices.
What actually happened
The list of options closed as soon as the knob was clicked, rather than allowing itself to be dragged.
How to reproduce
Log details and game version
TerasologyOmega, 2.2.0, default installation.
Computer details
Model: Toshiba Satellite C55D-A5206 OS: 64-bit Ubuntu OS Version: 4.15.0.47-generic (as Kubuntu 18.04) CPU: AMD A4-5000 APU GPU: Radeon integrated graphics Driver: X.org AMD KABINI (DRM 2.50.0, LLVM 7.0.0) JVM: OpenJDK 1.8.0 OpenGL: 4.4 (Compatibility Profile) Mesa 18.2.2