From 840ea5c1b9d7d198842d85ca86eb0d71854eb9aa Mon Sep 17 00:00:00 2001 From: Xerasin Date: Sun, 4 Mar 2012 09:44:50 -0800 Subject: [PATCH 1/3] Header no longer needed --- src/PlayX/lua/playx/client/panel.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PlayX/lua/playx/client/panel.lua b/src/PlayX/lua/playx/client/panel.lua index b42cad5e..176dd623 100644 --- a/src/PlayX/lua/playx/client/panel.lua +++ b/src/PlayX/lua/playx/client/panel.lua @@ -23,7 +23,7 @@ local hasLoaded = false --- Draw the settings panel. local function SettingsPanel(panel) panel:ClearControls() - panel:AddControl( "Header", { Text = "Settings", Description = "" } ) + //panel:AddControl( "Header", { Text = "Settings", Description = "" } ) panel:AddControl("CheckBox", { Label = "Enabled", @@ -135,7 +135,7 @@ end --- Draw the control panel. local function ControlPanel(panel) panel:ClearControls() - panel:AddControl( "Header", { Text = "Administrate", Description = "" } ) + //panel:AddControl( "Header", { Text = "Administrate", Description = "" } ) local options = { ["Auto-detect"] = {["playx_provider"] = ""} @@ -213,7 +213,7 @@ vgui.Register( "dlistview", PANEL ,"DListView") --- Draw the control panel. local function BookmarksPanel(panel) panel:ClearControls() - panel:AddControl( "Header", { Text = "Bookmarks", Description = "" } ) + //panel:AddControl( "Header", { Text = "Bookmarks", Description = "" } ) panel:SizeToContents(true) @@ -272,7 +272,7 @@ end --- Draw the control panel. local function NavigatorPanel(panel) panel:ClearControls() - panel:AddControl( "Header", { Text = "Navigator", Description = "" } ) + //panel:AddControl( "Header", { Text = "Navigator", Description = "" } ) panel:SizeToContents(true) From f0ebf612592ff358fdb0fdaac8502144cf74bcba Mon Sep 17 00:00:00 2001 From: Xerasin Date: Sun, 4 Mar 2012 09:46:08 -0800 Subject: [PATCH 2/3] Pointless to comment them. --- src/PlayX/lua/playx/client/panel.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/PlayX/lua/playx/client/panel.lua b/src/PlayX/lua/playx/client/panel.lua index 176dd623..e440bc61 100644 --- a/src/PlayX/lua/playx/client/panel.lua +++ b/src/PlayX/lua/playx/client/panel.lua @@ -23,7 +23,6 @@ local hasLoaded = false --- Draw the settings panel. local function SettingsPanel(panel) panel:ClearControls() - //panel:AddControl( "Header", { Text = "Settings", Description = "" } ) panel:AddControl("CheckBox", { Label = "Enabled", @@ -135,7 +134,6 @@ end --- Draw the control panel. local function ControlPanel(panel) panel:ClearControls() - //panel:AddControl( "Header", { Text = "Administrate", Description = "" } ) local options = { ["Auto-detect"] = {["playx_provider"] = ""} @@ -213,7 +211,6 @@ vgui.Register( "dlistview", PANEL ,"DListView") --- Draw the control panel. local function BookmarksPanel(panel) panel:ClearControls() - //panel:AddControl( "Header", { Text = "Bookmarks", Description = "" } ) panel:SizeToContents(true) @@ -272,7 +269,6 @@ end --- Draw the control panel. local function NavigatorPanel(panel) panel:ClearControls() - //panel:AddControl( "Header", { Text = "Navigator", Description = "" } ) panel:SizeToContents(true) From dd7a94934d03b55b57c4402569b51263be7b03d1 Mon Sep 17 00:00:00 2001 From: Xerasin Date: Sat, 24 Nov 2012 22:09:44 -0800 Subject: [PATCH 3/3] - Fix flash Provider - Fix Image Provider --- src/PlayX/lua/entities/gmod_playx/cl_init.lua | 13 ++++++++++--- src/PlayX/lua/playxlib.lua | 5 ++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/PlayX/lua/entities/gmod_playx/cl_init.lua b/src/PlayX/lua/entities/gmod_playx/cl_init.lua index b11923d0..9f6e4f23 100644 --- a/src/PlayX/lua/entities/gmod_playx/cl_init.lua +++ b/src/PlayX/lua/entities/gmod_playx/cl_init.lua @@ -165,7 +165,7 @@ function ENT:SetProjectorBounds(forward, right, up) end function ENT:CreateBrowser() - self.Browser = vgui.Create("HTML") + self.Browser = vgui.Create("DHTML") self.Browser:SetMouseInputEnabled(false) self.Browser:SetSize(self.HTMLWidth, self.HTMLHeight) self.Browser:SetPaintedManually(true) @@ -195,7 +195,13 @@ function ENT:Play(handler, uri, start, volume, handlerArgs) if not self.Browser then self:CreateBrowser() end - + + self.Browser:AddFunction("gmod","Ready",function() + if not IsValid(self) then return end + MsgN("PlayX DEBUG: Page loaded, preparing to inject") + self:InjectPage() + end) + self.Browser.OpeningURL = function(_, url, target, postdata) local query = url:match("^http://playx.sktransport/%?(.*)$") @@ -221,7 +227,8 @@ function ENT:Play(handler, uri, start, volume, handlerArgs) else self.Browser:OpenURL(PlayX.HostURL) end - + + self.Browser:QueueJavascript("gmod.Ready()") self.Playing = true end diff --git a/src/PlayX/lua/playxlib.lua b/src/PlayX/lua/playxlib.lua index 34bc2ee5..8b9a7a4d 100644 --- a/src/PlayX/lua/playxlib.lua +++ b/src/PlayX/lua/playxlib.lua @@ -379,8 +379,7 @@ playxlib.HandlerResult = HandlerResult -- Make callable local mt = {} mt.__call = function(...) - local arg = {...} - return HandlerResult.new(unpack(arg)) + return HandlerResult.new(...) end setmetatable(HandlerResult, mt) @@ -556,7 +555,7 @@ setInterval(function() { local body = [[
-