mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
[516] Scaling and TGUI fixes (#28809)
* [516] Scaling and TGUI fixes * fuck it we go with this * ??? * final changes * whoops
This commit is contained in:
@@ -86,6 +86,15 @@
|
||||
for(var/file in scripts)
|
||||
head_content += "<script type='text/javascript' src='[SSassets.transport.get_asset_url(file)]'></script>"
|
||||
|
||||
if(user.client.window_scaling && user.client.window_scaling != 1)
|
||||
head_content += {"
|
||||
<style>
|
||||
body {
|
||||
zoom: [100 / user.client.window_scaling]%;
|
||||
}
|
||||
</style>
|
||||
"}
|
||||
|
||||
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
@@ -122,6 +131,10 @@
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
if(user?.client?.window_scaling)
|
||||
window_size = "size=[width * user.client.window_scaling]x[height * user.client.window_scaling];"
|
||||
else
|
||||
window_size = "size=[width]x[height];"
|
||||
if(include_default_stylesheet)
|
||||
var/datum/asset/simple/common/common_asset = get_asset_datum(/datum/asset/simple/common)
|
||||
common_asset.send(user)
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>[title]</title>
|
||||
<link rel="stylesheet" type="text/css" href="[SSassets.transport.get_asset_url("view_variables.css")]">
|
||||
[window_scaling ? "<style>body {zoom: [100 / window_scaling]%;}</style>" : ""]
|
||||
</head>
|
||||
<body onload='selectTextField(); updateSearch()' onkeydown='return checkreload()' onkeyup='updateSearch()'>
|
||||
<script type="text/javascript">
|
||||
@@ -453,7 +454,9 @@
|
||||
|
||||
if(istype(D, /datum))
|
||||
log_admin("[key_name(usr)] opened VV for [D] ([D.UID()])")
|
||||
usr << browse(html, "window=variables[refid];size=475x650")
|
||||
|
||||
var/size_string = window_scaling ? "size=[475 * window_scaling]x[650 * window_scaling]" : "size=[475]x[650]"
|
||||
usr << browse(html, "window=variables[refid];[size_string]")
|
||||
|
||||
#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing )
|
||||
/proc/debug_variable(name, value, level, datum/owner, sanitize = TRUE)
|
||||
|
||||
Reference in New Issue
Block a user