Fixing and testing themes.

This commit is contained in:
Ghommie
2019-09-11 23:30:04 +02:00
parent 47b673a249
commit cbf041663f
10 changed files with 406 additions and 415 deletions
+6 -11
View File
@@ -82,11 +82,13 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
if("setMusicVolume")
data = setMusicVolume(arglist(params))
if("swaptodarkmode")
swaptodarkmode()
if("colorPresetPost") //User just swapped color presets in their goonchat preferences. Do we do anything else?
switch(href_list["preset"])
if("light")
owner.force_white_theme()
if("dark" || "normal")
owner.force_dark_theme()
if("swaptolightmode")
swaptolightmode()
if(data)
ehjax_send(data = data)
@@ -246,10 +248,3 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
// url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
C << output(url_encode(url_encode(message)), "browseroutput:output")
/datum/chatOutput/proc/swaptolightmode() //Dark mode light mode stuff. Yell at KMC if this breaks! (See darkmode.dm for documentation)
owner.force_white_theme()
/datum/chatOutput/proc/swaptodarkmode()
owner.force_dark_theme()