How can you check the state of the TopBar (i.e. enabled or disabled)?
For example, to check the transparency of the TopBar, you would use
The application I’m developing this for will be used within games I don’t own, therefore I can’t set my own variable for when the TopBar is enabled and disabled.
By ‘disabled’, are you talking about disabling the top bar with
starterGui:SetCore("TopbarEnabled", false), or
SetCore, i.e. starterGui:SetCore(“TopbarEnabled”, false)
I cannot find any documentation on getting whether or not the top bar is enabled. Unfortunately, I don’t think there’s a way of checking this. I’ll file a feature request, though—this is definitely something that we need.
As a Roblox developer, it is currently impossible to check whether the topbar has been disabled through starterGui:SetCore("TopbarEnabled", false) and listen for this happening.
As a solution, I propose two new arguments that can be passed to StarterGui:GetCore:
"TopbarEnabled", which returns a boolean that is true if the topbar is enabled and otherwise false.
"TopbarEnabledEvent", which returns a BindableEvent that is fired whenever the topbar is enabled or disabled. A boolean that describ…
The feature request was disapproved because:
The topbar is intended to be used for Roblox GUI only. You should not be creating interface under the topbar while it exists, as this defeats the purpose of isolating Roblox GUI to the topbar so future changes won’t cover developer UI. Doing this in a free model will not be appreciated by developers using it.
You should leave it up to users who insert the button into their game to place it where it fits with their interface, because there is always the potential for conflict in any place you put it.
The only thing I can find similar to this is a CoreGui BindableEvent called
TopbarEnabledChanged, it is a member of
CoreGuiChatConnections and is fired when the visibility of the Topbar is changed.
I don’t think what you’re looking for exists - it would be good to make a Feature Request for this.
Since there’s no way of checking if the top bar is enabled or disabled, I think that the only option is creating a global variable in a local script whenever you change it, but it would be really boring to do this if there’s multiple local scripts.
@Dandystan Appreciate that, we’ll hopefully see this implemented soon.
@LordHammy Thanks, I’ll have a look at this and see what I can make out of it.
@Herickman In the meantime, I’ll be adding an additional function to the API which developers can access via a module:
It seems that
isTopBarEnabled() is an internal function in the Roblox
CoreScript for the Topbar. (Line 40) Hopefully this can be made usable using GetCoreGuiEnabled.
Interesting. I thought a GetCore equivalent for TopbarEnabled existed. As this isn’t the case, you can’t check for the topbar’s enabled state. A feature request should suffice just fine.