diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index e180f2092d6..20eb15d6af0 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -261,4 +261,5 @@ proc/tg_list2text(list/list, glue=",") switch(ui_style) if("old") return 'icons/mob/screen1_old.dmi' if("Orange") return 'icons/mob/screen1_Orange.dmi' - else return 'icons/mob/screen1_Midnight.dmi' + if("Midnight") return 'icons/mob/screen1_Midnight.dmi' + else return 'icons/mob/screen1_White.dmi' diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 618858d5438..88ac1b70e2c 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -166,9 +166,11 @@ datum/hud/New(mob/owner) if(!ismob(mymob)) return 0 if(!mymob.client) return 0 var/ui_style = ui_style2icon(mymob.client.prefs.UI_style) + var/ui_color = mymob.client.prefs.UI_style_color + var/ui_alpha = mymob.client.prefs.UI_style_alpha if(ishuman(mymob)) - human_hud(ui_style) // Pass the player the UI style chosen in preferences + human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences else if(ismonkey(mymob)) monkey_hud(ui_style) else if(isbrain(mymob)) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 32e9e1046ec..da6b76ec9ac 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -1,4 +1,4 @@ -/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi') +/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255) src.adding = list() src.other = list() @@ -73,6 +73,8 @@ using.icon_state = (mymob.m_intent == "run" ? "running" : "walking") using.screen_loc = ui_movi using.layer = 20 + using.color = ui_color + using.alpha = ui_alpha src.adding += using move_intent = using @@ -82,6 +84,8 @@ using.icon_state = "act_drop" using.screen_loc = ui_drop_throw using.layer = 19 + using.color = ui_color + using.alpha = ui_alpha src.hotkeybuttons += using inv_box = new /obj/screen/inventory() @@ -92,6 +96,8 @@ inv_box.icon_state = "center" inv_box.screen_loc = ui_iclothing inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -102,6 +108,8 @@ inv_box.icon_state = "equip" inv_box.screen_loc = ui_oclothing inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -114,6 +122,9 @@ inv_box.screen_loc = ui_rhand inv_box.slot_id = slot_r_hand inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha + src.r_hand_hud_object = inv_box src.adding += inv_box @@ -127,6 +138,8 @@ inv_box.screen_loc = ui_lhand inv_box.slot_id = slot_l_hand inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.l_hand_hud_object = inv_box src.adding += inv_box @@ -137,6 +150,8 @@ using.icon_state = "hand1" using.screen_loc = ui_swaphand1 using.layer = 19 + using.color = ui_color + using.alpha = ui_alpha src.adding += using using = new /obj/screen/inventory() @@ -146,6 +161,8 @@ using.icon_state = "hand2" using.screen_loc = ui_swaphand2 using.layer = 19 + using.color = ui_color + using.alpha = ui_alpha src.adding += using inv_box = new /obj/screen/inventory() @@ -156,6 +173,8 @@ inv_box.screen_loc = ui_id inv_box.slot_id = slot_wear_id inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box inv_box = new /obj/screen/inventory() @@ -166,6 +185,8 @@ inv_box.screen_loc = ui_mask inv_box.slot_id = slot_wear_mask inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -176,6 +197,8 @@ inv_box.screen_loc = ui_back inv_box.slot_id = slot_back inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box inv_box = new /obj/screen/inventory() @@ -185,6 +208,8 @@ inv_box.screen_loc = ui_storage1 inv_box.slot_id = slot_l_store inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box inv_box = new /obj/screen/inventory() @@ -194,6 +219,8 @@ inv_box.screen_loc = ui_storage2 inv_box.slot_id = slot_r_store inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box inv_box = new /obj/screen/inventory() @@ -204,6 +231,8 @@ inv_box.screen_loc = ui_sstore1 inv_box.slot_id = slot_s_store inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box using = new /obj/screen() @@ -212,6 +241,8 @@ using.icon_state = "act_resist" using.screen_loc = ui_pull_resist using.layer = 19 + using.color = ui_color + using.alpha = ui_alpha src.hotkeybuttons += using using = new /obj/screen() @@ -220,6 +251,8 @@ using.icon_state = "other" using.screen_loc = ui_inventory using.layer = 20 + using.color = ui_color + using.alpha = ui_alpha src.adding += using using = new /obj/screen() @@ -228,6 +261,8 @@ using.icon_state = "act_equip" using.screen_loc = ui_equip using.layer = 20 + using.color = ui_color + using.alpha = ui_alpha src.adding += using inv_box = new /obj/screen/inventory() @@ -237,6 +272,8 @@ inv_box.screen_loc = ui_gloves inv_box.slot_id = slot_gloves inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -246,6 +283,8 @@ inv_box.screen_loc = ui_glasses inv_box.slot_id = slot_glasses inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -255,6 +294,8 @@ inv_box.screen_loc = ui_l_ear inv_box.slot_id = slot_l_ear inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -264,6 +305,8 @@ inv_box.screen_loc = ui_r_ear inv_box.slot_id = slot_r_ear inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -273,6 +316,8 @@ inv_box.screen_loc = ui_head inv_box.slot_id = slot_head inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -282,6 +327,8 @@ inv_box.screen_loc = ui_shoes inv_box.slot_id = slot_shoes inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.other += inv_box inv_box = new /obj/screen/inventory() @@ -291,6 +338,8 @@ inv_box.screen_loc = ui_belt inv_box.slot_id = slot_belt inv_box.layer = 19 + inv_box.color = ui_color + inv_box.alpha = ui_alpha src.adding += inv_box mymob.throw_icon = new /obj/screen() @@ -298,6 +347,8 @@ mymob.throw_icon.icon_state = "act_throw_off" mymob.throw_icon.name = "throw" mymob.throw_icon.screen_loc = ui_drop_throw + mymob.throw_icon.color = ui_color + mymob.throw_icon.alpha = ui_alpha src.hotkeybuttons += mymob.throw_icon mymob.oxygen = new /obj/screen() @@ -382,6 +433,8 @@ mymob.zone_sel = new /obj/screen/zone_sel( null ) mymob.zone_sel.icon = ui_style + mymob.zone_sel.color = ui_color + mymob.zone_sel.alpha = ui_alpha mymob.zone_sel.overlays.Cut() mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]") diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 51d8bb92da0..153451431c7 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -44,6 +44,8 @@ datum/preferences var/be_special = 0 //Special role selection var/UI_style = "Midnight" var/toggles = TOGGLES_DEFAULT + var/UI_style_color = "#ffffff" + var/UI_style_alpha = 255 //character preferences var/real_name //our character's name @@ -241,6 +243,9 @@ datum/preferences dat += "
" dat += "UI Style: [UI_style]
" + dat += "Custom UI(recommended for White UI):
" + dat += "-Color: [UI_style_color]
__

" + dat += "-Alpha(transparence): [UI_style_alpha]
" dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
" @@ -1120,6 +1125,16 @@ datum/preferences else UI_style = "Midnight" + if("UIcolor") + var/UI_style_color_new = input(user, "Choose your UI color, dark colors are not recommended!") as color|null + if(!UI_style_color_new) return + UI_style_color = UI_style_color_new + + if("UIalpha") + var/UI_style_alpha_new = input(user, "Select a new alpha(transparence) parametr for UI, between 50 and 255") as num + if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return + UI_style_alpha = UI_style_alpha_new + if("be_special") var/num = text2num(href_list["num"]) be_special ^= (1<> be_special S["default_slot"] >> default_slot S["toggles"] >> toggles + S["UI_style_color"] >> UI_style_color + S["UI_style_alpha"] >> UI_style_alpha //Sanitize ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor)) lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog)) - UI_style = sanitize_inlist(UI_style, list("Midnight","Orange","old"), initial(UI_style)) + UI_style = sanitize_inlist(UI_style, list("White", "Midnight","Orange","old"), initial(UI_style)) be_special = sanitize_integer(be_special, 0, 65535, initial(be_special)) default_slot = sanitize_integer(default_slot, 1, MAX_SAVE_SLOTS, initial(default_slot)) toggles = sanitize_integer(toggles, 0, 65535, initial(toggles)) + 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)) return 1 @@ -80,6 +84,8 @@ S["be_special"] << be_special S["default_slot"] << default_slot S["toggles"] << toggles + S["UI_style_color"] << UI_style_color + S["UI_style_alpha"] << UI_style_alpha return 1 diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index e59546a470f..c1628c1f3fe 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -107,10 +107,12 @@ set desc = "Toggles seeing Local OutOfCharacter chat" prefs.toggles ^= CHAT_LOOC prefs.save_preferences() + src << "You will [(prefs.toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel." feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful set name = "Hear/Silence Ambience" set category = "Preferences" @@ -135,4 +137,42 @@ prefs.be_special ^= role_flag prefs.save_preferences() src << "You will [(prefs.be_special & role_flag) ? "now" : "no longer"] be considered for [role] events (where possible)." - feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file + feedback_add_details("admin_verb","TBeSpecial") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +/client/verb/change_ui() + set name = "Change UI" + set category = "Preferences" + set desc = "Configure your user interface" + + if(!ishuman(usr)) + usr << "This only for human" + return + + var/UI_style_new = input(usr, "Select a style, we recommend White for customization") in list("White", "Midnight", "Orange", "old") + if(!UI_style_new) return + + var/UI_style_alpha_new = input(usr, "Select a new alpha(transparence) parametr for UI, between 50 and 255") as num + if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return + + var/UI_style_color_new = input(usr, "Choose your UI color, dark colors are not recommended!") as color|null + if(!UI_style_color_new) return + + //update UI + var/list/icons = usr.hud_used.adding + usr.hud_used.other +usr.hud_used.hotkeybuttons + icons.Add(usr.zone_sel) + + for(var/obj/screen/I in icons) + if(I.color && I.alpha) + I.icon = ui_style2icon(UI_style_new) + I.color = UI_style_color_new + I.alpha = UI_style_alpha_new + + + + if(alert("Like it? Save changes?",,"Yes", "No") == "Yes") + prefs.UI_style = UI_style_new + prefs.UI_style_alpha = UI_style_alpha_new + prefs.UI_style_color = UI_style_color_new + prefs.save_preferences() + usr << "UI was saved" \ No newline at end of file diff --git a/icons/mob/screen1_White.dmi b/icons/mob/screen1_White.dmi new file mode 100644 index 00000000000..0472e1a0b74 Binary files /dev/null and b/icons/mob/screen1_White.dmi differ