Topbar+ v1 (deprecated) | Add additional functionality and themes to your topbar

The first issue won’t be related to Topbar+. For the second, you can find documentation here if you’re interested in learning about V1 themes. The current theme system is quite confusing to work with, so we’ve developed a new one we’ll hopefully have released soon.

3 Likes

This resource is great! I love when we can make our interfaces fit in with the style Roblox is going for.

I do have a problem with dropdowns though. Whenever I attempt to interact with the dropdown I created, (except for when I set a button assigned to the dropdown, which makes me believe there isn’t really an error with the dropdown table…) the script errors out on attempting to call a nil value.

The code I’m attempting to run:
Dropdown Table

local tutDropdown = {
	{
		name = "Join Group",
		icon = "rbxassetid://2746105644",
		clicked = function()
			print("soon")
		end,
		events = {}
	},
	{
		name = "Activities",
		icon = "rbxassetid://2746074974",
		clicked = function()
			print("soon")
		end,
		events = {}
	},
	{
		name = "About",
		icon = "rbxassetid://2746077483",
		clicked = function()
			gui.About.Visible = not gui.About.Visible
		end,
		events = {}
	},
}

Part of the script that errors out (trying to set some properties of the dropdown)

tutDropdown:set("closeWhenClicked", false)
tutDropdown:set("closeWhenClickedAway", true)

Defining the button

local tutorialIcon = iconController:createIcon("Tutorial", 5908536412, 3)
tutorialIcon:setLabel("Help")
tutorialIcon:setTip("Join Group & Guide & About")
tutorialIcon:createDropdown(tutDropdown) -- I tried with and without this part, still the same result.

Another part which errors out (trying to bind left-click to open the dropdown in a ‘hacky’ way.)

local function forceDropdown()
	local bool = tutDropdown:isOpen()
	if bool then
		tutDropdown:hide()
	else
		tutDropdown:show()
	end
end

tutorialIcon:setToggleFunction(forceDropdown)

I really have no idea what exactly is the issue. The table seems fine, and I’ve already said an argument to my reasoning, and it’s not very easy for me to debug anything in the TopBar+ module considering the error comes from the LocalScript that makes the top bar and doesn’t bring any details.

PlayerScripts.TopBarGenerator:102: attempt to call a nil value

pls help

The dropdown is the object returned from :createDropdown instead of the dropdown options itself. Try something like this instead:

local tutDropdownOptions = {
	{
		name = "Join Group",
		icon = "rbxassetid://2746105644",
		clicked = function()
			print("soon")
		end,
		events = {}
	},
	{
		name = "Activities",
		icon = "rbxassetid://2746074974",
		clicked = function()
			print("soon")
		end,
		events = {}
	},
	{
		name = "About",
		icon = "rbxassetid://2746077483",
		clicked = function()
			gui.About.Visible = not gui.About.Visible
		end,
		events = {}
	},
}

local tutDropdown = tutorialIcon:createDropdown(tutDropdownOptions)
tutDropdown:set("closeWhenClicked", false)
tutDropdown:set("closeWhenClickedAway", true)
3 Likes

Thank you! It did work.

For the bind of left click to the dropdown, I actually went with something like this

local function forceDropdown()
	if tutDropdown.isOpen then -- Rather than tutDropdown:IsOpen()
		tutDropdown:hide()
	else
		tutDropdown:show()
	end
end

The documentation mentions local bool = dropdown:isOpen() as a way to get a bool of whether or not the dropdown is opened.

I’m not the best with module scripts so maybe this would be easily deducted by someone familiar with them, or maybe my use case isn’t the one listed in the documentation, but you might consider adding it…
https://1foreverhd.github.io/HDAdmin/projects/topbarplus/dropdown/

I highly recommend setting the bindToIcon setting to true to achieve this for V1 as there’s a fair amount of internal logic to make the dropdown show/hide in all situations.

Good spot thanks! This is meant to be a property instead of a method. I’ve updated the docs to reflect this:
https://1foreverhd.github.io/HDAdmin/projects/topbarplus/dropdown/#isopen

3 Likes

That’s so cool ForeverHD! It’s very useful!

1 Like

Instead of having it to be an image how do I make it say VIP in italics like in animation mocap?

I believe their italic text was converted into an image.

You can set text by doing icon:setLabel(text), however for V1 you can’t get rid of the image.

We’ll be releasing Topbar+ V2 in the upcoming days which will allow you to remove the image, so when combined with rich text will enable you to achieve that.

4 Likes

That would be nice if you make a plugin that allows you to make advanced icon like that! Im sure more players would use it for guis.

You bet, that’s certainly the end goal if I ever find the time (or if anyone would like to contribute to that)!

In the meantime we’re developing a plugin to help install and update the application, and hopefully some tutorials to assist with setting up.

2 Likes

The VIP button in Animations:Mocap is an image @NoobieCqrlos
Source: I’m the Technical Director on Animations:Mocap

3 Likes

If you require this 2 times in a game, does it check if its already in the game?

Modules are only run once even if required multiple times, so it doesn’t need to check if it’s already in the game anyway.

SO if one script requires it (with the id) and another script requires it (with the id) nothing will go wrong?

I just tried that out and nothing went wrong, but you only need to require this module on the server once anyways.

1 Like

Nice! Btw do you know when HD Admin (V3 Version) is coming out? I wanna know if i can wait for it.

Wow, how long did this take to you? But btw, it‘‚ amazing, along side with Zone+. Keep this up!

We won’t announce any release dates until it’s complete to avoid false expectations although hopefully very soon in the upcoming months. The project will likely be released as an entirely separate application now due to its scale. Feel free to DM if you have any other questions or suggestions to keep on topic!

4 Likes

Including the V2 remake coming out soon, at least 150+ hours. I’ve personally found it a great way to become more familiar with tools like git and rojo while developing open source. That also doesn’t include the awesome contributions from other people like @Lucke0051!

7 Likes

Looks amazing, great for if you want to have varied and customizable easy to use topbar-icons. Personally think this would be a great addition for roblox to add theirself. :+1:

1 Like