Ports a toggleable darkmode to the game!

This commit is contained in:
Ghommie
2019-07-05 22:29:50 +02:00
parent a814442fa5
commit 03315d1cbb
23 changed files with 784 additions and 205 deletions
+13
View File
@@ -82,6 +82,12 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
if("setMusicVolume")
data = setMusicVolume(arglist(params))
if("swaptodarkmode")
swaptodarkmode()
if("swaptolightmode")
swaptolightmode()
if(data)
ehjax_send(data = data)
@@ -240,3 +246,10 @@ 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()