mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Styles basic HTML UIs (#7001)
This commit is contained in:
@@ -134,12 +134,12 @@ var/list/gear_datums = list()
|
||||
. += " [category] "
|
||||
else
|
||||
var/datum/loadout_category/LC = loadout_categories[category]
|
||||
var/tcolor = "#3366CC"
|
||||
var/style = ""
|
||||
for(var/thing in LC.gear)
|
||||
if(thing in pref.gear)
|
||||
tcolor = "#E67300"
|
||||
style = "style='color: #FF8000;'"
|
||||
break
|
||||
. += " <a href='?src=\ref[src];select_category=[category]'><font color = '[tcolor]'>[category]</font></a> "
|
||||
. += " <a href='?src=\ref[src];select_category=[category]'><font [style]>[category]</font></a> "
|
||||
. += "</b></center></td></tr>"
|
||||
|
||||
var/datum/loadout_category/LC = loadout_categories[current_tab]
|
||||
@@ -151,7 +151,10 @@ var/list/gear_datums = list()
|
||||
continue
|
||||
var/datum/gear/G = LC.gear[gear_name]
|
||||
var/ticked = (G.display_name in pref.gear)
|
||||
. += "<tr style='vertical-align:top'><td width=25%><a href='?src=\ref[src];toggle_gear=[G.display_name]'><font color='[ticked ? "#E67300" : "#3366CC"]'>[G.display_name]</font></a></td>"
|
||||
var/style = ""
|
||||
if(ticked)
|
||||
style = "style='color: #FF8000;'"
|
||||
. += "<tr style='vertical-align:top'><td width=25%><a href='?src=\ref[src];toggle_gear=[G.display_name]'><font [style]>[G.display_name]</font></a></td>"
|
||||
. += "<td width = 10% style='vertical-align:top'>[G.cost]</td>"
|
||||
. += "<td><font size=2><i>[G.description]</i></font></td></tr>"
|
||||
if(ticked)
|
||||
|
||||
@@ -165,15 +165,10 @@
|
||||
for(var/datum/job/job in faction.get_occupations())
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
dat += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'><a> </a></td><td><a> </a></td></tr>"
|
||||
dat += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
dat += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
dat += "<tr style='background-color: [hex2cssrgba(job.selection_color, 0.4)];'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
var/ban_reason = jobban_isbanned(user, rank)
|
||||
@@ -205,7 +200,7 @@
|
||||
else
|
||||
dat += " <font color=red>\[No]</font>"
|
||||
if(job.alt_titles) //Blatantly cloned from a few lines down.
|
||||
dat += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr><tr style='background-color: [hex2cssrgba(lastJob.selection_color, 0.4)];'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
@@ -218,7 +213,7 @@
|
||||
else
|
||||
dat += " <font color=red>\[NEVER]</font>"
|
||||
if(job.alt_titles)
|
||||
dat += "</a></td></tr><tr bgcolor='[lastJob.selection_color]'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr><tr style='background-color: [hex2cssrgba(lastJob.selection_color, 0.4)];'><td width='60%' align='center'> </td><td><a href='?src=\ref[src];select_alt_title=\ref[job]'>\[[pref.GetPlayerAltTitle(job)]\]</a></td></tr>"
|
||||
dat += "</a></td></tr>"
|
||||
|
||||
dat += "</td'></tr></table>"
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
var/level = pref.skills[S.ID]
|
||||
dat += "<tr style='text-align:left;'>"
|
||||
dat += "<th><a href='?src=\ref[src];skillinfo=\ref[S]'>[S.name]</a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_NONE]'><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[Untrained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_NONE]'><font color=[(level == SKILL_NONE) ? "red" : ""]>\[Untrained\]</font></a></th>"
|
||||
// secondary skills don't have an amateur level
|
||||
if(S.secondary)
|
||||
dat += "<th></th>"
|
||||
else
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_BASIC]'><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Amateur\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_ADEPT]'><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Trained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_EXPERT]'><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Professional\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_BASIC]'><font color=[(level == SKILL_BASIC) ? "red" : ""]>\[Amateur\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_ADEPT]'><font color=[(level == SKILL_ADEPT) ? "red" : ""]>\[Trained\]</font></a></th>"
|
||||
dat += "<th><a href='?src=\ref[src];setskill=\ref[S];newvalue=[SKILL_EXPERT]'><font color=[(level == SKILL_EXPERT) ? "red" : ""]>\[Professional\]</font></a></th>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
. = dat.Join()
|
||||
|
||||
Reference in New Issue
Block a user