Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 22c0c19

Browse files
committed
Tiny fixes to extrabar
1 parent b09c802 commit 22c0c19

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Neuron.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,8 @@ function Neuron:ToggleBarEditMode(show)
692692
for _, bar in pairs(Neuron.BARIndex) do
693693
bar:Show() --this shows the transparent overlay over a bar
694694
bar:Update(true)
695-
bar:UpdateObjectVisibility(true)
696695
bar:UpdateObjects()
696+
bar:UpdateObjectVisibility(true)
697697
end
698698

699699
else
@@ -703,8 +703,8 @@ function Neuron:ToggleBarEditMode(show)
703703
for _, bar in pairs(Neuron.BARIndex) do
704704
bar:Hide()
705705
bar:Update(nil, true)
706-
bar:UpdateObjectVisibility()
707706
bar:UpdateObjects()
707+
bar:UpdateObjectVisibility()
708708
end
709709

710710
if (NeuronBarEditor)then
@@ -736,8 +736,8 @@ function Neuron:ToggleButtonEditMode(show)
736736
end
737737

738738
for _,bar in pairs(Neuron.BARIndex) do
739-
bar:UpdateObjectVisibility(true)
740739
bar:UpdateObjects()
740+
bar:UpdateObjectVisibility(true)
741741
end
742742

743743

@@ -752,8 +752,8 @@ function Neuron:ToggleButtonEditMode(show)
752752
end
753753

754754
for _,bar in pairs(Neuron.BARIndex) do
755-
bar:UpdateObjectVisibility()
756755
bar:UpdateObjects()
756+
bar:UpdateObjectVisibility()
757757

758758
if (bar.handler:GetAttribute("assertstate")) then
759759
bar.handler:SetAttribute("state-"..bar.handler:GetAttribute("assertstate"), bar.handler:GetAttribute("activestate") or "homestate")
@@ -792,8 +792,8 @@ function Neuron:ToggleBindingMode(show)
792792
end
793793

794794
for _,bar in pairs(Neuron.BARIndex) do
795-
bar:UpdateObjectVisibility(true)
796795
bar:UpdateObjects()
796+
bar:UpdateObjectVisibility(true)
797797
end
798798

799799
else
@@ -809,8 +809,8 @@ function Neuron:ToggleBindingMode(show)
809809
end
810810

811811
for _,bar in pairs(Neuron.BARIndex) do
812-
bar:UpdateObjectVisibility()
813812
bar:UpdateObjects()
813+
bar:UpdateObjectVisibility()
814814
end
815815
end
816816
end

Objects/BUTTON.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ function BUTTON:SetObjectVisibility()
507507
end
508508

509509
self:SetAttribute("showGrid", self.showGrid) --this is important because in our state switching code, we can't querry self.showGrid directly
510-
self:SetAttribute("isshown", show)
510+
self:SetAttribute("isshown", self.isShown)
511511

512512
if self.isShown then
513513
self:Show()

Objects/EXTRABTN.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function EXTRABTN:OnEvent(event, ...)
8383

8484
if event == "PLAYER_ENTERING_WORLD" then
8585
self.binder:ApplyBindings()
86+
self:UpdateIcon()
8687
end
8788

8889
end

0 commit comments

Comments
 (0)