512 forward compatibility merge
This commit is contained in:
committed by
CitadelStationBot
parent
fd2705b6e6
commit
4b297f509e
@@ -149,20 +149,20 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
asset_list[type] = assetlist
|
||||
|
||||
/datum/html_interface/proc/createWindow(datum/html_interface_client/hclient)
|
||||
winclone(hclient.client, "window", "browser_\ref[src]")
|
||||
winclone(hclient.client, "window", "browser_[REF(src)]")
|
||||
|
||||
var/list/params = list(
|
||||
"size" = "[width]x[height]",
|
||||
"statusbar" = "false",
|
||||
"on-close" = "byond://?src=\ref[src]&html_interface_action=onclose"
|
||||
"on-close" = "byond://?src=[REF(src)]&html_interface_action=onclose"
|
||||
)
|
||||
|
||||
if (hclient.client.hi_last_pos)
|
||||
params["pos"] = "[hclient.client.hi_last_pos]"
|
||||
|
||||
winset(hclient.client, "browser_\ref[src]", list2params(params))
|
||||
winset(hclient.client, "browser_[REF(src)]", list2params(params))
|
||||
|
||||
winset(hclient.client, "browser_\ref[src].browser", list2params(list("parent" = "browser_\ref[src]", "type" = "browser", "pos" = "0,0", "size" = "[width]x[height]", "anchor1" = "0,0", "anchor2" = "100,100", "use-title" = "true", "auto-format" = "false")))
|
||||
winset(hclient.client, "browser_[REF(src)].browser", list2params(list("parent" = "browser_[REF(src)]", "type" = "browser", "pos" = "0,0", "size" = "[width]x[height]", "anchor1" = "0,0", "anchor2" = "100,100", "use-title" = "true", "auto-format" = "false")))
|
||||
|
||||
/* * Public API */
|
||||
/datum/html_interface/proc/getTitle()
|
||||
@@ -185,7 +185,7 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
|
||||
if (istype(hclient))
|
||||
if (hclient.is_loaded)
|
||||
hclient.client << output(list2params(list(jscript)), "browser_\ref[src].browser:eval")
|
||||
hclient.client << output(list2params(list(jscript)), "browser_[REF(src)].browser:eval")
|
||||
else
|
||||
for (var/client in src.clients)
|
||||
if(src.clients[client])
|
||||
@@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
|
||||
if (istype(hclient))
|
||||
if (hclient.is_loaded)
|
||||
hclient.client << output(list2params(arguments), "browser_\ref[src].browser:[func]")
|
||||
hclient.client << output(list2params(arguments), "browser_[REF(src)].browser:[func]")
|
||||
else
|
||||
for (var/client in src.clients)
|
||||
if (src.clients[client])
|
||||
@@ -235,15 +235,15 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
if ((type in asset_list) && islist(asset_list[type]))
|
||||
send_asset_list(hclient.client, asset_list[type], TRUE)
|
||||
|
||||
if (!winexists(hclient.client, "browser_\ref[src]"))
|
||||
if (!winexists(hclient.client, "browser_[REF(src)]"))
|
||||
src.createWindow(hclient)
|
||||
//src._renderTitle(hclient, TRUE)
|
||||
//src._renderLayout(hclient)
|
||||
|
||||
hclient.is_loaded = FALSE
|
||||
hclient.client << output(replacetextEx(replacetextEx(file2text('html_interface.html'), "\[hsrc\]", "\ref[src]"), "</head>", "[head]</head>"), "browser_\ref[src].browser")
|
||||
hclient.client << output(replacetextEx(replacetextEx(file2text('html_interface.html'), "\[hsrc\]", "[REF(src)]"), "</head>", "[head]</head>"), "browser_[REF(src)].browser")
|
||||
|
||||
winshow(hclient.client, "browser_\ref[src]", TRUE)
|
||||
winshow(hclient.client, "browser_[REF(src)]", TRUE)
|
||||
|
||||
while (hclient.client && hclient.active && !hclient.is_loaded)
|
||||
sleep(2)
|
||||
@@ -258,10 +258,10 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
if (!src.clients.len)
|
||||
src.clients = null
|
||||
|
||||
hclient.client.hi_last_pos = winget(hclient.client, "browser_\ref[src]" ,"pos")
|
||||
hclient.client.hi_last_pos = winget(hclient.client, "browser_[REF(src)]" ,"pos")
|
||||
|
||||
winshow(hclient.client, "browser_\ref[src]", FALSE)
|
||||
winset(hclient.client, "browser_\ref[src]", "parent=none")
|
||||
winshow(hclient.client, "browser_[REF(src)]", FALSE)
|
||||
winset(hclient.client, "browser_[REF(src)]", "parent=none")
|
||||
|
||||
if (hascall(src.ref, "hiOnHide"))
|
||||
call(src.ref, "hiOnHide")(hclient)
|
||||
@@ -344,7 +344,7 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
|
||||
src.specificRenderTitle(hclient)
|
||||
|
||||
hclient.client << output(list2params(list(title)), "browser_\ref[src].browser:setTitle")
|
||||
hclient.client << output(list2params(list(title)), "browser_[REF(src)].browser:setTitle")
|
||||
|
||||
/datum/html_interface/proc/_renderLayout(datum/html_interface_client/hclient, ignore_loaded = FALSE)
|
||||
if (hclient && (ignore_loaded || hclient.is_loaded))
|
||||
@@ -354,7 +354,7 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
if (html != hclient.layout)
|
||||
hclient.layout = html
|
||||
|
||||
hclient.client << output(list2params(list(html)), "browser_\ref[src].browser:updateLayout")
|
||||
hclient.client << output(list2params(list(html)), "browser_[REF(src)].browser:updateLayout")
|
||||
|
||||
for (var/id in src.content_elements)
|
||||
src._renderContent(id, hclient, ignore_loaded = ignore_loaded)
|
||||
@@ -367,7 +367,7 @@ GLOBAL_LIST_EMPTY(html_interfaces)
|
||||
if (ignore_cache || !(id in hclient.content_elements) || html != hclient.content_elements[id])
|
||||
hclient.content_elements[id] = html
|
||||
|
||||
hclient.client << output(list2params(list(id, html)), "browser_\ref[src].browser:updateContent")
|
||||
hclient.client << output(list2params(list(id, html)), "browser_[REF(src)].browser:updateContent")
|
||||
|
||||
/datum/html_interface/Topic(href, href_list[])
|
||||
var/datum/html_interface_client/hclient = getClient(usr.client)
|
||||
|
||||
Reference in New Issue
Block a user