mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
RCD Rework.
RCDs now work on a system of schematics, with an RPD style UI. RPD, RCD, RSF and tile painters all implemented into this new system. (reverted from commitccb9ceb811) (reverted from commit1d9a328ba6)
This commit is contained in:
28
code/modules/html_interface/RCD/RCD.css
Normal file
28
code/modules/html_interface/RCD/RCD.css
Normal file
@@ -0,0 +1,28 @@
|
||||
/*Made by N3X15*/
|
||||
|
||||
html {
|
||||
font-family:sans-serif;
|
||||
font-size:small;
|
||||
}
|
||||
a{
|
||||
color:#0066cc;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a img {
|
||||
border:1px solid #0066cc;
|
||||
background:#dfdfdf;
|
||||
}
|
||||
|
||||
a.color {
|
||||
padding: 5px 10px;
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
border:1px solid white;
|
||||
}
|
||||
|
||||
a.selected img,
|
||||
a:hover {
|
||||
background: #0066cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
21
code/modules/html_interface/RCD/RCD.dm
Normal file
21
code/modules/html_interface/RCD/RCD.dm
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
RCD UI style.
|
||||
N3X15 wrote the stylesheet (originally RPD stylesheet)
|
||||
Made into a htmli datum by PJB3005
|
||||
*/
|
||||
|
||||
/datum/html_interface/rcd
|
||||
default_html_file = 'html_interface_no_bootstrap.html'
|
||||
|
||||
/datum/html_interface/rcd/New()
|
||||
. = ..()
|
||||
head += "<link rel='stylesheet' type='text/css' href='RCD.css'>"
|
||||
|
||||
/datum/html_interface/rcd/sendResources(var/client/client)
|
||||
. = ..()
|
||||
client << browse_rsc('RCD.css')
|
||||
|
||||
//Send the icons.
|
||||
for(var/path in typesof(/datum/rcd_schematic) - /datum/rcd_schematic)
|
||||
var/datum/rcd_schematic/C = new path()
|
||||
C.send_icons(client)
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="html_interface.css"/>
|
||||
<script type="text/javascript">var hSrc = "[hsrc]";</script>
|
||||
<script type="text/javascript" src="jquery.min.js"></script>
|
||||
<script type="text/javascript" src="html_interface.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -105,6 +105,9 @@ mob/verb/test()
|
||||
// The initial height of the browser control, used when the window is first shown to a client.
|
||||
var/height
|
||||
|
||||
// File which the HTML is copied from onto the browser window on the client.
|
||||
var/default_html_file = 'html_interface.html'
|
||||
|
||||
/datum/html_interface/New(atom/ref, title, width = 700, height = 480, head = "")
|
||||
html_interfaces.Add(src)
|
||||
|
||||
@@ -232,7 +235,7 @@ mob/verb/test()
|
||||
else
|
||||
src.createWindow(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(default_html_file), "\[hsrc\]", "\ref[src]"), "</head>", "[head]</head>"), "browser_\ref[src].browser")
|
||||
winshow(hclient.client, "browser_\ref[src]", TRUE)
|
||||
if(oldwindow && winexists(hclient.client, "browser_\ref[oldwindow]"))
|
||||
winshow(hclient.client, "browser_\ref[oldwindow]", FALSE)
|
||||
|
||||
Reference in New Issue
Block a user