Commit 1 (For debug)

This commit is contained in:
AffectedArc07
2018-12-30 09:39:51 +00:00
parent 12c7c0c959
commit 29b1fa7bf9
6 changed files with 85 additions and 18 deletions
+1
View File
@@ -25,6 +25,7 @@
#define CHAT_NO_ADMINLOGS 16384
#define DONATOR_PUBLIC 32768
#define CHAT_NO_TICKETLOGS 65536
#define UI_DARKMODE 131072
#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC)
+55 -1
View File
@@ -366,9 +366,16 @@
send_resources()
if(prefs.toggles & UI_DARKMODE) // activates dark mode if its flagged. -AA07
if(establish_db_connection())
activate_darkmode()
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. -CP
if(establish_db_connection())
winset(src, "rpane.changelog", "background-color=#f4aa94;font-style=bold")
if(prefs.toggles & UI_DARKMODE)
winset(src, "rpane.changelog", "background-color=#bb7700;font-style=bold")
else
winset(src, "rpane.changelog", "background-color=#f4aa94;text-color=#FFFFFF;font-style=bold")
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
if(!void)
@@ -660,3 +667,50 @@
/client/proc/on_varedit()
var_edited = TRUE
/////////////////
// DARKMODE UI //
/////////////////
// IF YOU CHANGE ANYTHING IN ACTIVATE, MAKE SURE IT HAS A DEACTIVATE METHOD, -AA07
/client/proc/activate_darkmode()
///// BUTTONS /////
/* Rpane */
winset(src, "rpane.textb", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.infob", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.wikib", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.forumb", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.rulesb", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.githubb", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
/* Mainwindow */
winset(src, "mainwindow.saybutton", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "mainwindow.mebutton", "background-color=#40628a;text-color=#FFFFFF")
winset(src, "mainwindow.hotkey_toggle", "background-color=#40628a;text-color=#FFFFFF")
///// UI ELEMENTS /////
/* Mainwindow */
winset(src, "mainwindow.mainwindow", "background-color=#272727")
winset(src, "mainwindow.asset_cache_browser", "background-color=#272727")
winset(src, "mainwindow.mainvsplit", "background-color=#272727")
winset(src, "mainwindow.tooltip", "background-color=#272727")
/* Mapwindow */
winset(src, "mapwindow.mapwindow", "background-color=#272727")
winset(src, "mapwindow.map", "background-color=#272727")
/* Outputwindow */
winset(src, "outputwindow.outputwindow", "background-color=#272727")
winset(src, "outputwindow.browseroutput", "background-color=#272727")
/* Rpane */
winset(src, "rpane.rpane", "background-color=#272727")
winset(src, "rpane.rpanewindow", "background-color=#272727")
/* Browserwindow */
winset(src, "browserwindow.browserwindow", "background-color=#272727")
winset(src, "browserwindow.browser", "background-color=#272727")
/* Infowindow */
winset(src, "infowindow.infowindow", "background-color=#272727;text-color=#FFFFFF")
winset(src, "infowindow.info", "background-color=#272727;text-color=#FFFFFF;highlight-color=#009900;tab-text-color=#FFFFFF;tab-background-color=#272727")
// NOTIFY USER
to_chat(src, "<span class='notice'>Darkmode Enabled</span>")
/client/proc/deactivate_darkmode()
///// BUTTONS /////
///// NOTIFY USER /////
to_chat(src, "<span class='notice'>Darkmode Disabled</span>") // what a sick fuck
@@ -55,7 +55,7 @@
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style))
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
toggles = sanitize_integer(toggles, 0, 262143, initial(toggles))
sound = sanitize_integer(sound, 0, 65535, initial(sound))
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
@@ -195,4 +195,16 @@
set category = "Preferences"
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
prefs.current_tab = 1
prefs.ShowChoices(usr)
prefs.ShowChoices(usr)
/client/verb/toggle_darkmode()
set name = "Toggle Darkmode"
set category = "Preferences"
set desc = "Toggles UI style between dark and light"
prefs.toggles ^= UI_DARKMODE
prefs.save_preferences(src)
if(prefs.toggles & UI_DARKMODE)
activate_darkmode()
else
deactivate_darkmode()
feedback_add_details("admin_verb","TDarkmode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

+15 -15
View File
@@ -1523,7 +1523,7 @@ window "mainwindow"
is-default = true
is-maximized = true
title = "Paradise Station 13"
icon = 'icons\\ss13_64.png'
icon = 'icons\\paradise.png'
menu = "menu"
macro = "macro"
saved-params = "pos;size;is-minimized;is-maximized"
@@ -1658,7 +1658,7 @@ window "rpane"
show-splitter = true
elem "textb"
type = BUTTON
pos = 0,0
pos = 0,7
size = 60x16
is-visible = false
saved-params = "is-checked"
@@ -1669,7 +1669,7 @@ window "rpane"
button-type = pushbox
elem "infob"
type = BUTTON
pos = 64,0
pos = 64,7
size = 60x16
is-visible = false
saved-params = "is-checked"
@@ -1679,37 +1679,37 @@ window "rpane"
button-type = pushbox
elem "wikib"
type = BUTTON
pos = 155,0
pos = 155,7
size = 60x16
text = "Wiki"
command = "wiki"
elem "forumb"
type = BUTTON
pos = 220,0
pos = 220,7
size = 60x16
text = "Forum"
command = "forum"
elem "rulesb"
type = BUTTON
pos = 285,0
pos = 285,7
size = 60x16
text = "Rules"
command = "rules"
elem "githubb"
type = BUTTON
pos = 350,0
pos = 350,7
size = 60x16
text = "GitHub"
command = "github"
elem "changelog"
type = BUTTON
pos = 415,0
pos = 415,7
size = 67x16
text = "Changelog"
command = "Changelog"
elem "discordb"
type = BUTTON
pos = 487,0
pos = 487,7
size = 60x16
background-color = #7289DA
text-color = #FFFFFF
@@ -1718,7 +1718,7 @@ window "rpane"
command = "discord"
elem "karma"
type = BUTTON
pos = 552,0
pos = 552,7
size = 60x16
background-color = #FF4500
text-color = #FFFFFF
@@ -1727,7 +1727,7 @@ window "rpane"
command = "karmashop"
elem "donate"
type = BUTTON
pos = 617,0
pos = 617,7
size = 60x16
background-color = #008000
text-color = #FFFFFF
@@ -1736,7 +1736,7 @@ window "rpane"
command = "Donate"
elem "browseb"
type = BUTTON
pos = 561,0
pos = 561,7
size = 60x16
is-visible = false
saved-params = "is-checked"
@@ -1758,8 +1758,8 @@ window "browserwindow"
anchor1 = 0,0
anchor2 = 100,100
is-default = true
on-show = ".winset\"rpane.infob.is-visible=true?rpane.infob.pos=130,0;rpane.textb.is-visible=true;rpane.browseb.is-visible=true;rpane.browseb.is-checked=true;rpane.rpanewindow.pos=0,30;rpane.rpanewindow.size=0x0;rpane.rpanewindow.left=browserwindow\""
on-hide = ".winset\"rpane.infob.is-visible=true?rpane.infob.is-checked=true rpane.infob.pos=65,0 rpane.rpanewindow.left=infowindow:rpane.rpanewindow.left=textwindow rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0\""
on-show = ".winset\"rpane.infob.is-visible=true?rpane.infob.pos=130,7;rpane.textb.is-visible=true;rpane.browseb.is-visible=true;rpane.browseb.is-checked=true;rpane.rpanewindow.pos=0,30;rpane.rpanewindow.size=0x0;rpane.rpanewindow.left=browserwindow\""
on-hide = ".winset\"rpane.infob.is-visible=true?rpane.infob.is-checked=true rpane.infob.pos=65,7 rpane.rpanewindow.left=infowindow:rpane.rpanewindow.left=textwindow rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0\""
window "infowindow"
elem "infowindow"
@@ -1778,5 +1778,5 @@ window "infowindow"
tab-text-color = #000000
allow-html = true
multi-line = true
on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\""
on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,7:rpane.infob.pos=65,7 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\""
on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\""