Skip to content

Conversation

@luttje
Copy link
Contributor

@luttje luttje commented Aug 9, 2025

First of all: Thanks for the quick merges of my PR's recently 👍 and excuse these tiny PR's over the past few days. Let me know if you'd like a break from them and I'll refrain from making more PR's for a while

This PR fixes not some main menu options being inaccessible when screen height is too 'small' for the number of buttons to display.

hook.Add("CreateMenuButtons", "test", function(tabs)
	tabs["test1"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test2"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test3"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test4"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test5"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test6"] = function(container)
		container:Add("MyTestPanel")
	end
	tabs["test7"] = function(container)
		container:Add("MyTestPanel") -- overflows outside the panel on my resolution of 1600x900
	end
end)

Before this PR:
before

After:
after

After with fewer menu items:
after with fewer menu items

Tested this in the skeleton gamemode. Scrolling works great with both the mouse wheel and that scrollbar grip.

Fixes not all options being accessible when screen height is too small
@alexgrist
Copy link
Member

Thank you for writing easily easy to read and understand PR descriptions and providing before and after images, it makes merging these so much quicker and easier.

@alexgrist alexgrist merged commit 480da47 into NebulousCloud:master Aug 10, 2025
2 checks passed
@luttje luttje deleted the fix/main-menu-buttons-scrollpanel branch August 10, 2025 19:49
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

Successfully merging this pull request may close these issues.

2 participants