From beee32f2376e9e1128fefefed02820571d4451b3 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Fri, 20 May 2016 16:17:40 +0100 Subject: [PATCH 1/2] Allow disabling styling of fake nanoui windows --- code/datums/browser.dm | 5 ++++- .../client/preference_setup/global/setting_datums.dm | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index f5549fa1a8d..577698532e2 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -28,6 +28,9 @@ height = nheight if (nref) ref = nref + // If a client exists, but they have disabled fancy windowing, disable it! + if(user && user.client && !user.client.is_preference_enabled(/datum/client_preference/browser_style)) + return add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs /datum/browser/proc/set_title(ntitle) @@ -178,4 +181,4 @@ if(src && src.mob) //world << "[src] was [src.mob.machine], setting to null" src.mob.unset_machine() - return \ No newline at end of file + return diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index e5d408c477e..2d4bfc8ab2b 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -137,6 +137,13 @@ var/list/_client_preferences_by_type key = "SAFE_FIRING" enabled_description = "Safe" disabled_description = "Dangerous" + +/datum/client_preference/browser_style + description = "Fake NanoUI Browser Style" + key = "BROWSER_STYLED" + enabled_description = "Fancy" + disabled_description = "Plain" + /******************** * Staff Preferences * ********************/ From e4382def1692c7b47242fc9051ce3a23879f99f3 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Thu, 26 May 2016 18:10:17 +0100 Subject: [PATCH 2/2] Adds changelog --- html/changelogs/Yoshax - disablefaux.txt | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 html/changelogs/Yoshax - disablefaux.txt diff --git a/html/changelogs/Yoshax - disablefaux.txt b/html/changelogs/Yoshax - disablefaux.txt new file mode 100644 index 00000000000..fd022eeeb69 --- /dev/null +++ b/html/changelogs/Yoshax - disablefaux.txt @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Yoshax + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a new preference that allows you to disable fake nanoui styling on relevant windows. However, if it is your first time loading with this new preference you will need to save your character slot, as there is a problem with satanisiation and it believes the preference is set to disable the nanoui styling."