[v3!] TopbarPlus v3.0.0 | Construct intuitive topbar icons; customise them with themes, dropdowns, captions, labels and much more

when is wally getting fixed hm hm hm bruh

Why is :setCornerRadius(UDim.new(1,0)) not working on icon? I did it on icon which is Icon.new().

1 Like

I keep getting this error:
The Parent property of Caption is locked, current parent: NULL, new parent ClippedContainer
Im not entirely sure why but here is my code:

StarterGUI:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
	
local PlayerList : InterfaceClass.Interface = GUI:SetupScreen(script, PlayerListScreen, {Enum.KeyCode.L})
PlayerList.TopBarButton:align("right")
PlayerList.TopBarButton:setOrder(1)
PlayerList.TopBarButton:setImage("rbxassetid://96786312579642")
PlayerList.TopBarButton:setImageScale(1)
PlayerList.TopBarButton:setCaption("Open Player List")

local Leaderboard : InterfaceClass.Interface = GUI:SetupScreen(script, LeaderboardScreen, {Enum.KeyCode.K})
Leaderboard.TopBarButton:align("right")
Leaderboard.TopBarButton:setOrder(2)
Leaderboard.TopBarButton:setImage("rbxassetid://87002394105185")
Leaderboard.TopBarButton:setImageScale(1)
Leaderboard.TopBarButton:setCaption("Open Leaderboard")
	
local Menu : IconClass.Icon = TopBarPlus.new()
Menu:setName("SocialMenu")
Menu:align("right")
Menu:setImage("rbxassetid://81711784540994")
Menu:setOrder(1)
Menu:setImageScale(1)
Menu:setCaption("Open Social Menu")
Menu:setMenu({PlayerList.TopBarButton, Leaderboard.TopBarButton})

Try this:

donateIcon.bindEvent:Connect("selected", function()
	game.Players.LocalPlayer.PlayerGui.DonationUI.MainFrame.Visible = true
end)

(NOT TESTED)

donateIcon:bindEvent("selected", function()
    game.Players.LocalPlayer.PlayerGui.DonationUI.MainFrame.Visible = true
end)

this should work i think

Hey all, sending my thanks for all the feedback and bug reports :pray:

I have two weeks of break at the start of January which will be dedicated to writing and deploying the many necessary features and fixes you’ve reported here and privately. Thanks for your patience and see you with updates in the new year!

6 Likes

good job Ben
i’m proud of you :+1:

2 Likes

image

sorry but how to get rid of the wasd Pad icon on the Dance Animation Icon? its automatically there

here is my code

Icon.new()
		:align("Left")
		:setImage(99340692500709)
		:bindToggleKey(Enum.KeyCode.Backquote)
		:setLabel("", "Deselected")
		:setLabel("", "Selected")
		:setLabel("Backpack", "Viewing")
		:setCornerRadius(1, 0)
		:setCaption("Backpack")
		:bindEvent("selected", function()
			Toggle_Inventory(true)
		end)
		:bindEvent("deselected", function()
			Toggle_Inventory(false)
		end)

		Icon.new()
			:align("Left")
			:setImage(6995969596)
			:bindToggleKey(Enum.KeyCode.M)
			:setCornerRadius(1, 0)
			:setLabel("", "Deselected")
			:setLabel("", "Selected")
			:setLabel("Dance Animations", "Viewing")
			:setCaption("Dance Animations")
			:bindEvent("selected", function()
				Frame:TweenPosition(UDim2.new(0.05,0,0.5,0))
			end)
			:bindEvent("deselected", function()
				Frame:TweenPosition(UDim2.new(0.05,0,1.5,0))
			end)

also i wish you a merry christmas Ben!!!

hi ben, i want to report that when you reseting, menu that you already create, creating again.

How can i add scrolling bars into categories?

I’m not sure about this, but when testing topbarplus on my game, I’ve run into an increase in threads and LuauHeap memory usage of the script running all the topbarplus icons. In this test place, I tried spamming buttons and creating snapshots periodically, and I noticed a huge increase in threads + the “EXAMPLES” script increasing in size (and not going down).


In the graph section of Luauheap, the “array” part of the registry increases.

Over each snapshot, the size of EXAMPLES and the size of each thread keep increasing and not coming back down. I’m a little worried that this would cause/contribute to a memory leak in my game, so I’m just wondering is there a memory leak in topbarplus or is this just how it’s supposed to be?

Does anyone know how to make a right click detection for buttons. Like a button you can left click to do one thing and right click to do another thing, I really need this. Thanks.

The Dpad will show up in studio but not in game

When I reset it bugs out and I can’t get frames to open but it shows that the button is working and I am getting an error with the ones I have a TweenPosition set up with after reset


image

image

Is there some temporary thing I can do, like make fake invisible health bar?

1 Like

You would have to make one manually

Hiya! Is there a way to make a button Pc/Mobile only? Im making a system where i have a button that will allow mobile users to open the command bar for basic admin essentials but i dont know how to make it mobile only.

Try using:

local UIS = game:GetService("UserInputService")

if UIS.TouchEnabled then
   --code for mobile
   else
   --code for pc
end

There are laptops with touchscreen though, so I wouldn’t only do that.


@gompiegoofy
Try using this instead:

local TopbarPlus = require(game:GetService("ReplicatedStorage").TopbarPlus)
local UserInputService = game:GetService("UserInputService")
local icon = TopbarPlus.new()

if not UserInputService.TouchEnabled then
	icon:setEnabled(false)
end

UserInputService.LastInputTypeChanged:Connect(function(lastInputType)
	icon:setEnabled(lastInputType == Enum.UserInputType.Touch)
end)

Corrected these mistakes

Old Script
local TopbarPlus = require(game:GetService("ReplicatedStorage").TopbarPlus)
local UserInputService = game:GetService("UserInputService")
local icon = TopbarPlus.new()

if not UserInputService.TouchEnded then
	icon:setEnabled(false)
end

UserInputService.LastInputTypeChanged:Connect(function(lastInputType)
	icon:setEnabled(lastInputType == Enum.UserInputType.Touch and true or false)
end)