mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
VueUI Vending Machines III: Revenge of the Spritesheets (#10311)
It's #10197 and #10240 again, except this time using spritesheets from #10272. Also fixes issues with coin interactions / premium items, and some other minor tweaks.
This commit is contained in:
@@ -71,7 +71,7 @@ main ui datum.
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/vueui/proc/open()
|
||||
/datum/vueui/proc/open(var/datum/asset/spritesheet/load_asset)
|
||||
if(QDELETED(object))
|
||||
return
|
||||
if(!user.client)
|
||||
@@ -86,8 +86,8 @@ main ui datum.
|
||||
var/params = "window=[windowid];file=[windowid];"
|
||||
if(width && height)
|
||||
params += "size=[width]x[height];"
|
||||
send_resources_and_assets(user.client)
|
||||
user << browse(generate_html(), params)
|
||||
send_resources_and_assets(user.client, load_asset)
|
||||
user << browse(generate_html(load_asset?.css_tag()), params)
|
||||
winset(user, "mapwindow.map", "focus=true")
|
||||
addtimer(CALLBACK(src, /datum/vueui/proc/setclose), 1)
|
||||
|
||||
@@ -123,7 +123,7 @@ main ui datum.
|
||||
*
|
||||
* @return html code - text
|
||||
*/
|
||||
/datum/vueui/proc/generate_html()
|
||||
/datum/vueui/proc/generate_html(var/css_tag)
|
||||
#ifdef UIDEBUG
|
||||
var/debugtxt = "<div id=\"dapp\"></div>"
|
||||
#else
|
||||
@@ -136,6 +136,7 @@ main ui datum.
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="vueui.css">
|
||||
[css_tag]
|
||||
</head>
|
||||
<body class="[get_theme_class()]">
|
||||
<div id="header">
|
||||
@@ -186,8 +187,10 @@ main ui datum.
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
/datum/vueui/proc/send_resources_and_assets(var/client/cl)
|
||||
/datum/vueui/proc/send_resources_and_assets(var/client/cl, var/datum/asset/load_asset)
|
||||
send_theme_resources(cl)
|
||||
if(istype(load_asset))
|
||||
load_asset.send(cl)
|
||||
for(var/asset_name in assets)
|
||||
var/asset = assets[asset_name]
|
||||
var/image/I = asset["img"]
|
||||
|
||||
Reference in New Issue
Block a user