1ForeverHD / TopbarPlus

Construct dynamic and intuitive topbar icons. Enhance the appearance and behaviour of these icons with features such as themes, dropdowns and menus.
https://devforum.roblox.com/t/topbarplus/1017485
Mozilla Public License 2.0
100 stars 129 forks source link

First leftward icon gets glitched #11

Closed MirayXS closed 3 years ago

MirayXS commented 3 years ago

First leftward icon gets glitched

my first icon, which is located at the left, get's glitched like this

image

Sometimes it works well, but most of the time it just glitches. Sometimes it doesn't even show the icon at all but its only clickable/toggleable like this

image

This is my code, there's more, but this is the part of this icon

-- PLayer Guis
local gui = playerGui:WaitForChild("PhysicsSettings")

-- Leftwards icons

local settingsMenu = gui
local settingsIcon = Icon.new()
:setImage(2484556379)
:setLabel("Settings")
:setTip("Open Settings (b)")
:setCaption("Physics Settings")
:bindToggleKey(Enum.KeyCode.B)

:setOrder(1)

:setLeft()

--:notify()
:bindEvent("selected", function()
    print("selected!")
    settingsMenu.Enabled = true
end)
:bindEvent("deselected", function()
    print("deselected!")
    settingsMenu.Enabled = false
end)

I also noticed that over playing time or resetting in-game it gets positioned right, but when you spawn the first time it gets glitched like the first screenshot

1ForeverHD commented 3 years ago

I can't seem to reproduce the bug with the following code:

-- PLayer Guis
local Icon = require(game.ReplicatedStorage.Icon)
local playerGui = game.Players.LocalPlayer.PlayerGui
local gui = playerGui:WaitForChild("PhysicsSettings")

-- Leftwards icons

local settingsMenu = gui
local settingsIcon = Icon.new()
:setImage(2484556379)
:setLabel("Settings")
:setTip("Open Settings (b)")
:setCaption("Physics Settings")
:bindToggleKey(Enum.KeyCode.B)

:setOrder(1)

:setLeft()

--:notify()
:bindEvent("selected", function()
    print("selected!")
    settingsMenu.Enabled = true
end)
:bindEvent("deselected", function()
    print("deselected!")
    settingsMenu.Enabled = false
end)

Can you re-insert the TopbarPlus model or grab the latest release and replace your current module then see if the problem persists - we did recently make a bug fix for something similar.

If that doesn't work, can you send a stripped down place file of the icon construction code and hollowed-out GUIs

MirayXS commented 3 years ago

The first option didn't work.

And the place file, must be only the icon module in RS and the script in StarterPlayer PlayerScripts right?

MirayXS commented 3 years ago

i got a rbxl file imma upload it somewhere

MirayXS commented 3 years ago

https://we.tl/t-4733nmKylO

1ForeverHD commented 3 years ago

Can you upload this to a separate roblox game please and uncopylock the place

MirayXS commented 3 years ago

alright will do, sorry for the late reply

MirayXS commented 3 years ago

i think i did it the place is private but i think i uncopylocked it its jmy first time un copylocking a game place https://www.roblox.com/games/6524078189/Untitled-Game

1ForeverHD commented 3 years ago

Thanks for your help! We've discovered and patched two critical bugs. You can get these in the latest release (https://github.com/1ForeverHD/TopbarPlus/releases/tag/v2.3.1) or by re-adding the TopbarPlus model.

Feel free to close this issue once you've tested the latest updates and it all works good.

MirayXS commented 3 years ago

Alright thanks you very much! and i'm glad i helped to discover some bugs. I'll test later today and tell you what happens 👍

MirayXS commented 3 years ago

Hey sorry if i didnt reply yet, my roblox account got previously banned for 7 days, and i couldn't test, ill test right now !

MirayXS commented 3 years ago

Works well! thank you for updating 😄

1ForeverHD commented 3 years ago

No problem, and glad to hear that!