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

[Bug] Clicking to close a multistructure list only causes it to draw more layers #22

Open
MooMoo7661 opened this issue May 10, 2024 · 0 comments

Comments

@MooMoo7661
Copy link

When trying to close a list of multistructures while using the structure placer wand, it instead just re-draws the list of multistructures, instead of actually closing it.
I assume this is because there's no toggling of the list, and it just appends each click?
It would be pretty nice to be able to close these lists, because as far as I know the only way to do it is by closing the UI.

I suspect it's from here, where each click appends the list without any sort of toggle / detection of the list already being displayed?
Could be wrong, since this was just a quick glance, but I'd appreciate if this was fixed.

if (Generator.StructureDataCache[path].ContainsKey("Structures"))
{
ManualGeneratorMenu.multiMode = true;
int count = Generator.StructureDataCache[path].Get<List<TagCompound>>("Structures").Count;
Height.Set(36 + 36 * count, 0);
var list = new UIList();
for (int k = 0; k < count; k++)
{
list.Add(new MultiSelectionEntry(k));
}
list.Width.Set(300, 0);
list.Height.Set(36 * count, 0);
list.Left.Set(50, 0);
list.Top.Set(36, 0);
Append(list);
}

image
image

Notice the alpha of the list backgrounds increases each click.

@MooMoo7661 MooMoo7661 changed the title Clicking to close a multistructure list only causes it to draw more layers [Bug] Clicking to close a multistructure list only causes it to draw more layers May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant