Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions code/modules/RCD/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@
var/dat = ""

dat += {"
<b>Selected:</b> <span id="selectedname"></span>
<h2>Options</h2>
<div id="schematic_options">
</div>
<h2>Available schematics</h2>
Expand Down
33 changes: 19 additions & 14 deletions code/modules/RCD/RPD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,14 @@

/obj/item/device/rcd/rpd/rebuild_ui()
var/dat = ""
var/multitext=""
var/autotext=""

if (has_metal_slime)//build_all
multitext=" <div style='margin-top:1em;'><b>Multilayer Mode: </b><a href='?src=\ref[interface];toggle_multi=1'><span class='[build_all? "schem_selected" : "schem"]'>[build_all ? "On" : "Off"]</span></a></div> "
if (has_yellow_slime)//build_all
autotext=" <div style='margin-top:1em;'><b>Autowrench: </b><a href='?src=\ref[interface];toggle_auto=1'><span class='[autowrench? "schem_selected" : "schem"]'>[autowrench ? "On" : "Off"]</span></a></div> "

//i don't know why i have to add padding to the bottom of the RPD, but it doesn't look right otherwise.
dat += {"
<b>Selected:</b> <span id="selectedname"></span>
<h2>Options</h2>
<div id="schematic_options">
<div style="padding-bottom:1em;" id="schematic_options2">
</div>
<div id="schematic_options1">
</div>
[multitext]
[autotext]

<h2>Available schematics</h2>
<div id='fav_list'></div>
"}
Expand All @@ -155,16 +148,28 @@

/obj/item/device/rcd/rpd/update_options_menu()
if(selected)
var/multitext=""
var/autotext=""

if (has_metal_slime)//build_all
multitext=" <div style='margin-top:1em;'><b>Multilayer Mode: </b><a href='?src=\ref[interface];toggle_multi=1'><span class='[build_all? "schem_selected" : "schem"]'>[build_all ? "On" : "Off"]</span></a></div> "
if (has_yellow_slime)//build_all
autotext=" <div style='margin-top:1em;'><b>Autowrench: </b><a href='?src=\ref[interface];toggle_auto=1'><span class='[autowrench? "schem_selected" : "schem"]'>[autowrench ? "On" : "Off"]</span></a></div> "

for(var/client/client in interface.clients)
selected.send_assets(client)
var/schematichtml=selected.get_HTML(args)
if (build_all)
schematichtml=replacetext(replacetext(schematichtml,"id=\"layer\"","id=\"layer_selected\""),"id=\"layer_center\"","id=\"layer_center_selected\"")
if (autowrench)
schematichtml=replacetext(replacetext(schematichtml,"id=\"layer_selected\"","id=\"layer_selectedauto\""),"id=\"layer_center_selected\"","id=\"layer_center_selectedauto\"")
interface.updateContent("schematic_options", schematichtml )
schematichtml+=multitext
schematichtml+=autotext
interface.updateContent("schematic_options1", schematichtml )
interface.updateContent("schematic_options2", schematichtml )
else
interface.updateContent("schematic_options", " ")
interface.updateContent("schematic_options1", " ")
interface.updateContent("schematic_options2", " ")


/obj/item/device/rcd/rpd/Topic(var/href, var/list/href_list)
Expand Down
22 changes: 22 additions & 0 deletions code/modules/html_interface/RCD/RCD.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/*updated by crazyamphibian*/

body{
background-image:none;
background-color:#272727; /*it's very sensitive to the order of things here, for some reason.*/
line-height:100%
}

Expand Down Expand Up @@ -206,3 +208,23 @@ left:160px;
height:1em;
image-rendering:pixelated;
}

#schematic_options{ /*because we removed the gradient earlier, we have to re-add it back*/
background:linear-gradient(rgb(57,57,57) 0%,rgb(72,72,72) 4% , rgb(39,39,39) 100%);
width:100%;
left:-50px
top:0px;
padding:1em;
margin-top:-7px;
margin-left:-10px;
}
#schematic_options1{ /*this is a really, really awful way to lay things out.*/
visibility: hidden;
}
#schematic_options2{ /*but it's not my fault IE doesn't support sticky positioning.*/
position:fixed;
background:linear-gradient(rgb(57,57,57) 0%,rgb(72,72,72) 4% , rgb(39,39,39) 100%); /*emulating the background of nanotrasen.css. it's an image, but images don't play nice here.*/
width:100%;
left:0px;
top:0em;
}