mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
fixing a small bug with autoload and button events (#1276)
Bug: Button events didn't work properly in autoload pacs, before opening the pac editor (using a pac without opening the editor is indeed autoload's main purpose, or one of them at least) Explanation: Because of this single boolean, the statement at line 1189 of the event part's code resolves to true regardless of whether it's actually true, and the statement skips the necessary lines that update the active buttons. Uninverted button events "worked" because they show stuff when the button is not pressed, so indeed, if no button is recognized then that event will detect the absence and not hide the stuff. if ply == pac.LocalPlayer and (pace and pace.IsFocused() or gui.IsConsoleVisible()) then return end Before we open it, the editor is not focused, so it can't be initialized to true. It should be false.
This commit is contained in:
parent
61932e96e8
commit
e0e684f4ea
@ -311,7 +311,7 @@ function PANEL:SetBottom(pnl)
|
||||
self.div:SetBottom(pnl)
|
||||
end
|
||||
|
||||
pace.Focused = true
|
||||
pace.Focused = false
|
||||
|
||||
function pace.IsFocused()
|
||||
return pace.Focused
|
||||
@ -481,4 +481,4 @@ function PANEL:Paint(w,h)
|
||||
--DFrame.Paint(self, w,h)
|
||||
end
|
||||
|
||||
pace.RegisterPanel(PANEL)
|
||||
pace.RegisterPanel(PANEL)
|
||||
|
Loading…
Reference in New Issue
Block a user