Satisfies my morbid autism (#12767)

This commit is contained in:
9600bauds
2016-12-19 21:55:29 +02:00
committed by GitHub
parent edf8fbbc61
commit 7abb46f92a
4 changed files with 83 additions and 50 deletions

View File

@@ -4,7 +4,7 @@ body
background-image: url(uiBg.png);
background-repeat: repeat-x;
background-position: center top;
font-family: verdana,Geneva,sans-serif;
font-size: 12px;
color: #FFFFFF;
@@ -47,8 +47,8 @@ hr
}
a, a:link, a:visited, a:active, .linkOn, .linkOff
{
color: #ffffff;
{
color: #ffffff;
text-decoration: none;
background: #40628a;
border: 1px solid #161616;
@@ -58,8 +58,8 @@ a, a:link, a:visited, a:active, .linkOn, .linkOff
}
a.nobg, a.nobg:link, a.nobg:visited, a.nobg:active
{
color: #ffffff;
{
color: #ffffff;
text-decoration: none;
background: transparent;
border: none;
@@ -68,20 +68,20 @@ a.nobg, a.nobg:link, a.nobg:visited, a.nobg:active
cursor:default;
font-weight:bold;
}
a.nobg:hover
{
a.nobg:hover
{
color:#40628a;
}
a:hover
{
a:hover
{
color: #40628a;
background: #ffffff;
}
a.white, a.white:link, a.white:visited, a.white:active
{
color: #40628a;
{
color: #40628a;
text-decoration: none;
background: #ffffff;
border: 1px solid #161616;
@@ -90,33 +90,43 @@ a.white, a.white:link, a.white:visited, a.white:active
cursor:default;
}
a.white:hover
{
a.white:hover
{
color: #ffffff;
background: #40628a;
}
.linkOn, a.linkOn:link, a.linkOn:visited, a.linkOn:active, a.linkOn:hover
{
color: #ffffff;
{
color: #ffffff;
background: #2f943c;
border-color: #24722e;
}
.linkOnMinimal, a.linkOnMinimal:link, a.linkOnMinimal:visited, a.linkOnMinimal:active, a.linkOnMinimal:hover
{
background: #2f943c;
}
.linkOff, a.linkOff:link, a.linkOff:visited, a.linkOff:active, a.linkOff:hover
{
color: #ffffff;
{
color: #ffffff;
background: #999999;
border-color: #666666;
}
a.icon, .linkOn.icon, .linkOff.icon
.linkOffMinimal, a.linkOffMinimal:link, a.linkOffMinimal:visited, a.linkOffMinimal:active, a.linkOffMinimal:hover
{
background: #999999;
}
a.icon, .linkOn.icon, .linkOnMinimal.icon, .linkOff.icon, .linkOffMinimal.icon
{
position: relative;
padding: 1px 4px 2px 20px;
}
a.icon img, .linkOn.icon img
a.icon img, .linkOn.icon img, .linkOnMinimal.icon img
{
position: absolute;
top: 0;
@@ -143,15 +153,15 @@ li
padding: 0 0 2px 0;
}
img, a img
{
border-style:none;
img, a img
{
border-style:none;
}
h1, h2, h3, h4, h5, h6
{
margin: 0;
padding: 16px 0 8px 0;
padding: 16px 0 8px 0;
color: #517087;
}
@@ -212,7 +222,7 @@ h4
}
.notice.icon
{
{
padding: 2px 4px 0 20px;
}
@@ -353,4 +363,4 @@ input
border-color: #40628a;
border-style: solid;
color: white;
}
}

View File

@@ -1,4 +1,7 @@
#define MAX_PILL_SPRITE 20 //Max icon state of the pill sprites
var/global/list/pillIcon2Name = list("oblong purple-pink", "oblong green-white", "oblong cyan", "oblong darkred", "oblong orange-striped", "oblong lightblue-drab", \
"oblong white", "oblong white-striped", "oblong purple-yellow", "round white", "round lightblue", "round yellow", "round purple", "round lightgreen", "round red", \
"round green-purple", "round yellow-purple", "round red-yellow", "round blue-cyan", "round green")
/obj/machinery/chem_master
name = "\improper ChemMaster 3000"
@@ -296,7 +299,7 @@
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
P.forceMove(loaded_pill_bottle)
if(count == 0) //only do this ONCE
logged_message += "[P.reagents.get_reagent_ids(1)]"
logged_message += "[P.reagents.get_reagent_ids(1)]. Icon: [pillIcon2Name[text2num(pillsprite)]]"
investigation_log(I_CHEMS, logged_message)
@@ -449,9 +452,9 @@
//dat += {"<a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></a><BR>"}
//dat += {"<a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"}
dat += {"<div class="li" style="padding: 0px 0px 4px;"></div>"}
dat += {"<div class="li"></div>"}
for(var/i = 1 to MAX_PILL_SPRITE)
dat += {"<a href="?src=\ref[src]&pill_sprite=[i]" style="display: inline-block; padding:0px 4px 0px 4px; margin:0 2px 2px 0; [i == text2num(pillsprite) ? "background: #2f943c;" : ""]"> <!--Yes we are setting the style here because I suck at CSS and I have no shame-->
dat += {"<a href="?src=\ref[src]&pill_sprite=[i]" class="pillIconWrapper[i == text2num(pillsprite) ? " linkOnMinimal" : ""]">
<div class="pillIcon">
[pill_icon_cache[i]]
</div>
@@ -468,6 +471,7 @@
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
dat = jointext(dat,"")
var/datum/browser/popup = new(user, "[windowtype]", "[name]", 575, 500, src)
popup.add_stylesheet("chemmaster", 'html/browser/chem_master.css')
popup.set_content(dat)
popup.open()
onclose(user, "[windowtype]")

View File

@@ -0,0 +1,27 @@
.li{
padding: 0px 0px 4px;
}
.pillIconWrapper{
display: inline-block;
padding:0px 4px 0px 4px;
margin:0 2px 2px 0;
}
.pillIcon {
/* The pill image will be enlarged to 64x64, the box that contains it will remain 32x32 though. Essentially cropping it out. */
width: 32px;
height: 32px;
/* Since we can't really crop shit we're just hiding the rest */
overflow: hidden;
}
.pillIcon img {
/* Blow it up baby */
width: 64px;
height: 64px;
/* "Center" it, since we can only crop out the top-left */
margin: -16px -16px -16px -16px;
/* Remove antialias to prevent cataracts */
-ms-interpolation-mode: nearest-neighbor;
}

View File

@@ -71,6 +71,11 @@ a.white:hover
border-color: #24722e;
}
.linkOnMinimal, a.linkOnMinimal:link, a.linkOnMinimal:visited, a.linkOnMinimal:active, a.linkOnMinimal:hover
{
background: #2f943c;
}
.linkOff, a.linkOff:link, a.linkOff:visited, a.linkOff:active, a.linkOff:hover
{
color: #ffffff;
@@ -78,13 +83,18 @@ a.white:hover
border-color: #666666;
}
a.icon, .linkOn.icon, .linkOff.icon
.linkOffMinimal, a.linkOffMinimal:link, a.linkOffMinimal:visited, a.linkOffMinimal:active, a.linkOffMinimal:hover
{
background: #999999;
}
a.icon, .linkOn.icon, .linkOnMinimal.icon, .linkOff.icon, .linkOffMinimal.icon
{
position: relative;
padding: 1px 4px 2px 20px;
}
a.icon img, .linkOn.icon img
a.icon img, .linkOn.icon img, .linkOnMinimal.icon img
{
position: absolute;
top: 0;
@@ -323,27 +333,9 @@ div.notice
.charPreview{
-ms-interpolation-mode: nearest-neighbor;
width: 64px;
height:64px;
}
.pillIcon {
/* The pill image will be enlarged to 64x64, the box that contains it will remain 32x32 though. Essentially cropping it out. */
width: 32px;
height: 32px;
/* Since we can't really crop shit we're just hiding the rest */
overflow: hidden;
}
.pillIcon img {
/* Blow it up baby */
width: 64px;
height: 64px;
/* "Center" it, since we can only crop out the top-left */
margin: -16px -16px -16px -16px;
/* Remove antialias to prevent cataracts */
-ms-interpolation-mode: nearest-neighbor;
width: 64px;
height:64px;
}
td.column {