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

SimpleGUI::ListBox() で項目数が多いとスクロールバーのつまみが消える不具合 #985

Closed
Reputeless opened this issue Mar 30, 2023 · 1 comment

Comments

@Reputeless
Copy link
Member

@Reputeless
Copy link
Member Author

before (v0.6.7)

image

after (v0.6.8)

image

# include <Siv3D.hpp>

void Main()
{
	Scene::SetBackground(ColorF{ 0.8, 0.9, 1.0 });

	ListBoxState listbox200;
	{
		for (int32 i = 0; i < 200; ++i)
		{
			listbox200.items.emplace_back(Format(i));
		}
	}

	ListBoxState listbox2000;
	{
		for (int32 i = 0; i < 2000; ++i)
		{
			listbox2000.items.emplace_back(Format(i));
		}
	}

	while (System::Update())
	{
		ClearPrint();

		if (listbox200.selectedItemIndex)
		{
			Print << listbox200.items[*listbox200.selectedItemIndex];
		}

		if (listbox2000.selectedItemIndex)
		{
			Print << listbox2000.items[*listbox2000.selectedItemIndex];
		}

		SimpleGUI::ListBox(listbox200, Vec2{ 80, 40 }, 120, 156);

		SimpleGUI::ListBox(listbox2000, Vec2{ 240, 40 }, 120, 156);
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant