mirror of
https://github.com/chev2/gmod-addons.git
synced 2025-10-30 06:31:35 +00:00
Screenshot Editor: Improve initialization; proper reload on autorefresh
This commit is contained in:
parent
552727db3c
commit
343dd16c31
1 changed files with 11 additions and 4 deletions
|
|
@ -156,8 +156,15 @@ concommand.Add("screenshot_editor", function(ply, cmd, args, argStr)
|
|||
screenshot_editor.PANEL = mainWindow
|
||||
end)
|
||||
|
||||
hook.Add("Initialize", "RunScreenshotEditorInitialize", function()
|
||||
hook.Run("ScreenshotEditorInitialize")
|
||||
end)
|
||||
local function InitializeScreenshotEditorHook()
|
||||
table.Empty(FILTER_DATA)
|
||||
table.Empty(FRAME_DATA)
|
||||
|
||||
--if game.GetWorld() ~= NULL then hook.Run("ScreenshotEditorInitialize") end
|
||||
hook.Run("ScreenshotEditorInitialize")
|
||||
end
|
||||
|
||||
hook.Add("Initialize", "RunScreenshotEditorInitialize_OnGamemodeInitialize", InitializeScreenshotEditorHook)
|
||||
hook.Add("OnReloaded", "RunScreenshotEditorInitialize_OnReloaded", InitializeScreenshotEditorHook)
|
||||
|
||||
-- Debug autorefresh
|
||||
if game.GetWorld() ~= NULL then InitializeScreenshotEditorHook() end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue