Skip to content

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

@MooMoo7661

Description

@MooMoo7661

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions