From 0eb7cc6d11fb30ab04379d2eedd40e828dc3e4fb Mon Sep 17 00:00:00 2001 From: CrazyAmphibian <0crazyamphibian@gmail.com> Date: Thu, 22 Aug 2024 19:27:05 -0700 Subject: [PATCH 1/3] makes the UI works good. --- code/modules/RCD/RCD.dm | 6 ++++-- code/modules/RCD/RPD.dm | 27 +++++++++++++++---------- code/modules/html_interface/RCD/RCD.css | 13 ++++++++++++ 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/code/modules/RCD/RCD.dm b/code/modules/RCD/RCD.dm index 3e93c8a7e6bc..6a070aa5d1b9 100644 --- a/code/modules/RCD/RCD.dm +++ b/code/modules/RCD/RCD.dm @@ -95,10 +95,10 @@ var/dat = "" dat += {" - Selected: -

Options

+
+

Available schematics

"} @@ -258,8 +258,10 @@ for(var/client/client in interface.clients) selected.send_assets(client) interface.updateContent("schematic_options", selected.get_HTML(args)) + interface.updateContent("schematic_options2", selected.get_HTML(args)) //don't question it, it just works. else interface.updateContent("schematic_options", " ") + interface.updateContent("schematic_options2", " ") // Called by schematics to delay their actions /obj/item/device/rcd/proc/delay(var/mob/user, var/atom/target, var/amount) diff --git a/code/modules/RCD/RPD.dm b/code/modules/RCD/RPD.dm index 63d8fceacee9..ec14052779e8 100644 --- a/code/modules/RCD/RPD.dm +++ b/code/modules/RCD/RPD.dm @@ -115,21 +115,14 @@ /obj/item/device/rcd/rpd/rebuild_ui() var/dat = "" - var/multitext="" - var/autotext="" - - if (has_metal_slime)//build_all - multitext="
Multilayer Mode: [build_all ? "On" : "Off"]
" - if (has_yellow_slime)//build_all - autotext="
Autowrench: [autowrench ? "On" : "Off"]
" + //i don't know why i have to add padding to the bottom of the RPD, but it doesn't look right otherwise. dat += {" - Selected: -

Options

+
+
- [multitext] - [autotext] +

Available schematics

"} @@ -155,6 +148,14 @@ /obj/item/device/rcd/rpd/update_options_menu() if(selected) + var/multitext="" + var/autotext="" + + if (has_metal_slime)//build_all + multitext="
Multilayer Mode: [build_all ? "On" : "Off"]
" + if (has_yellow_slime)//build_all + autotext="
Autowrench: [autowrench ? "On" : "Off"]
" + for(var/client/client in interface.clients) selected.send_assets(client) var/schematichtml=selected.get_HTML(args) @@ -162,9 +163,13 @@ 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\"") + schematichtml+=multitext + schematichtml+=autotext interface.updateContent("schematic_options", schematichtml ) + interface.updateContent("schematic_options2", schematichtml ) else interface.updateContent("schematic_options", " ") + interface.updateContent("schematic_options2", " ") /obj/item/device/rcd/rpd/Topic(var/href, var/list/href_list) diff --git a/code/modules/html_interface/RCD/RCD.css b/code/modules/html_interface/RCD/RCD.css index daf4300998ae..b891143a3049 100644 --- a/code/modules/html_interface/RCD/RCD.css +++ b/code/modules/html_interface/RCD/RCD.css @@ -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% } @@ -206,3 +208,14 @@ left:160px; height:1em; image-rendering:pixelated; } + +#schematic_options{ /*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; +} \ No newline at end of file From d383e083d41cf9df8d3ec8bfc06bf4c17dd260bc Mon Sep 17 00:00:00 2001 From: CrazyAmphibian <0crazyamphibian@gmail.com> Date: Thu, 22 Aug 2024 21:50:47 -0700 Subject: [PATCH 2/3] removed tile painter being affected --- code/modules/RCD/RCD.dm | 4 ---- code/modules/RCD/RPD.dm | 6 +++--- code/modules/html_interface/RCD/RCD.css | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/code/modules/RCD/RCD.dm b/code/modules/RCD/RCD.dm index 6a070aa5d1b9..140fd0b3f192 100644 --- a/code/modules/RCD/RCD.dm +++ b/code/modules/RCD/RCD.dm @@ -97,8 +97,6 @@ dat += {"
-
-

Available schematics

"} @@ -258,10 +256,8 @@ for(var/client/client in interface.clients) selected.send_assets(client) interface.updateContent("schematic_options", selected.get_HTML(args)) - interface.updateContent("schematic_options2", selected.get_HTML(args)) //don't question it, it just works. else interface.updateContent("schematic_options", " ") - interface.updateContent("schematic_options2", " ") // Called by schematics to delay their actions /obj/item/device/rcd/proc/delay(var/mob/user, var/atom/target, var/amount) diff --git a/code/modules/RCD/RPD.dm b/code/modules/RCD/RPD.dm index ec14052779e8..8fee70ce688d 100644 --- a/code/modules/RCD/RPD.dm +++ b/code/modules/RCD/RPD.dm @@ -120,7 +120,7 @@ dat += {"
-
+

Available schematics

@@ -165,10 +165,10 @@ schematichtml=replacetext(replacetext(schematichtml,"id=\"layer_selected\"","id=\"layer_selectedauto\""),"id=\"layer_center_selected\"","id=\"layer_center_selectedauto\"") schematichtml+=multitext schematichtml+=autotext - interface.updateContent("schematic_options", schematichtml ) + interface.updateContent("schematic_options1", schematichtml ) interface.updateContent("schematic_options2", schematichtml ) else - interface.updateContent("schematic_options", " ") + interface.updateContent("schematic_options1", " ") interface.updateContent("schematic_options2", " ") diff --git a/code/modules/html_interface/RCD/RCD.css b/code/modules/html_interface/RCD/RCD.css index b891143a3049..23d2932dbf57 100644 --- a/code/modules/html_interface/RCD/RCD.css +++ b/code/modules/html_interface/RCD/RCD.css @@ -209,7 +209,7 @@ left:160px; image-rendering:pixelated; } -#schematic_options{ /*this is a really, really awful way to lay things out.*/ +#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.*/ From df363508b1d2ae55a17335a3dd808648705528a0 Mon Sep 17 00:00:00 2001 From: CrazyAmphibian <0crazyamphibian@gmail.com> Date: Thu, 22 Aug 2024 22:33:43 -0700 Subject: [PATCH 3/3] made tile painter look better --- code/modules/html_interface/RCD/RCD.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/modules/html_interface/RCD/RCD.css b/code/modules/html_interface/RCD/RCD.css index 23d2932dbf57..ee6744d8fdb9 100644 --- a/code/modules/html_interface/RCD/RCD.css +++ b/code/modules/html_interface/RCD/RCD.css @@ -209,6 +209,15 @@ left:160px; 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; }