Files
Bubberstation/code/modules/client/preferences/screentips.dm
SkyratBot 6fb6f553bb [MIRROR] Screentip images [MDB IGNORE] (#22899)
* Screentip images (#76889)

## About The Pull Request
Adds some nice little mouse button indicators (optional), this is a port
of my version at
[Citadel-Station-13/15973](https://github.com/Citadel-Station-13/Citadel-Station-13/pull/15973).

**There is no more intent coloring**

## Why It's Good For The Game
Quick identification of what to do. Eh, i dunno if it's getting
accepted, mothblocks asked me to port it over.
## Changelog
🆑
image: Changed screentips icons to something a lot fancier unified with
the LMB / RMB text.
qol: There are accessibility preferences to disable this! Look for
"Screentip context with images" beside the other screentip preferences.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>

* Screentip images

---------

Co-authored-by: SandPoot <43283559+SandPoot@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@ users.noreply.github.com>
2023-08-06 02:58:10 -04:00

47 lines
1.9 KiB
Plaintext

/datum/preference/choiced/enable_screentips
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "screentip_pref"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/enable_screentips/init_possible_values()
return list(SCREENTIP_PREFERENCE_ENABLED, SCREENTIP_PREFERENCE_CONTEXT_ONLY, SCREENTIP_PREFERENCE_DISABLED)
/datum/preference/choiced/enable_screentips/create_default_value()
return SCREENTIP_PREFERENCE_ENABLED
/datum/preference/choiced/enable_screentips/apply_to_client(client/client, value)
client.mob?.hud_used?.screentips_enabled = value
/datum/preference/choiced/enable_screentips/deserialize(input, datum/preferences/preferences)
// Migrate old always disabled screentips to context only.
// Screentips were always meant to have context, though were initially merged without it.
// This accepts that those users found screentips distracting, but gives a second chance now that
// they provide a more obvious helping hand.
// If they are still too distracting, there's nothing stopping them from disabling it again for good.
if (input == FALSE)
return ..(SCREENTIP_PREFERENCE_CONTEXT_ONLY, preferences)
if (input == TRUE)
return ..(SCREENTIP_PREFERENCE_ENABLED, preferences)
return ..(input, preferences)
/datum/preference/color/screentip_color
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "screentip_color"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/color/screentip_color/apply_to_client(client/client, value)
client.mob?.hud_used?.screentip_color = value
/datum/preference/color/screentip_color/create_default_value()
return LIGHT_COLOR_FAINT_BLUE
/datum/preference/toggle/screentip_images
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "screentip_images"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/screentip_images/apply_to_client(client/client, value)
client.mob?.hud_used?.screentip_images = value