[MIRROR] Hovering your mouse over things now shows their name on the top of the screen (#3446)

* Hovering your mouse over things now shows their name on the top of the screen (#56729)

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

* Hovering your mouse over things now shows their name on the top of the screen

* a

* Update preferences_savefile.dm

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-02-17 15:16:29 +01:00
committed by GitHub
parent 02a0c66241
commit b8be84f61e
14 changed files with 97 additions and 3 deletions
+1
View File
@@ -1002,6 +1002,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
CRASH("change_view called without argument.")
view = new_size
mob.hud_used.screentip_text.update_view()
apply_clickcatcher()
mob.reload_fullscreen()
if (isliving(mob))
+17
View File
@@ -110,6 +110,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/parallax
///Do we show screentips, if so, how big?
var/screentip_pref = TRUE
///Color of screentips at top of screen
var/screentip_color = "#ffd391"
var/ambientocclusion = TRUE
///Should we automatically fit the viewport?
var/auto_fit_viewport = FALSE
@@ -637,6 +642,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "High"
dat += "</a><br>"
dat += "<b>Set screentip mode:</b> <a href='?_src_=prefs;preference=screentipmode'>[screentip_pref ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Screentip color:</b><span style='border: 1px solid #161616; background-color: [screentip_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=screentipcolor'>Change</a><BR>"
dat += "<b>Ambient Occlusion:</b> <a href='?_src_=prefs;preference=ambientocclusion'>[ambientocclusion ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Fit Viewport:</b> <a href='?_src_=prefs;preference=auto_fit_viewport'>[auto_fit_viewport ? "Auto" : "Manual"]</a><br>"
if (CONFIG_GET(string/default_view) != CONFIG_GET(string/default_view_square))
@@ -1828,6 +1837,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_parallax_pref(parent.mob)
if("screentipmode")
screentip_pref = !screentip_pref
if("screentipcolor")
var/new_screentipcolor = input(user, "Choose your screentip color:", "Character Preference", screentip_color) as color|null
if(new_screentipcolor)
screentip_color = sanitize_ooccolor(new_screentipcolor)
if("ambientocclusion")
ambientocclusion = !ambientocclusion
if(parent?.screen && parent.screen.len)
+8 -2
View File
@@ -163,6 +163,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
READ_FILE(S["asaycolor"], asaycolor)
READ_FILE(S["brief_outfit"], brief_outfit)
READ_FILE(S["ooccolor"], ooccolor)
READ_FILE(S["screentip_color"], screentip_color)
READ_FILE(S["lastchangelog"], lastchangelog)
READ_FILE(S["UI_style"], UI_style)
READ_FILE(S["hotkeys"], hotkeys)
@@ -194,6 +195,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
READ_FILE(S["clientfps"], clientfps)
READ_FILE(S["parallax"], parallax)
READ_FILE(S["ambientocclusion"], ambientocclusion)
READ_FILE(S["screentip_pref"], screentip_pref)
READ_FILE(S["auto_fit_viewport"], auto_fit_viewport)
READ_FILE(S["widescreenpref"], widescreenpref)
READ_FILE(S["pixel_size"], pixel_size)
@@ -225,6 +227,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Sanitize
asaycolor = sanitize_ooccolor(sanitize_hexcolor(asaycolor, 6, 1, initial(asaycolor)))
ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor)))
screentip_color = sanitize_ooccolor(sanitize_hexcolor(screentip_color, 6, 1, initial(screentip_color)))
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
UI_style = sanitize_inlist(UI_style, GLOB.available_ui_styles, GLOB.available_ui_styles[1])
hotkeys = sanitize_integer(hotkeys, FALSE, TRUE, initial(hotkeys))
@@ -241,8 +244,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
toggles = sanitize_integer(toggles, 0, (2**24)-1, initial(toggles))
clientfps = sanitize_integer(clientfps, -1, 1000, 0)
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
ambientocclusion = sanitize_integer(ambientocclusion, FALSE, TRUE, initial(ambientocclusion))
auto_fit_viewport = sanitize_integer(auto_fit_viewport, FALSE, TRUE, initial(auto_fit_viewport))
ambientocclusion = sanitize_integer(ambientocclusion, FALSE, TRUE, initial(ambientocclusion))
screentip_pref = sanitize_integer(screentip_pref, FALSE, TRUE, initial(screentip_pref))
auto_fit_viewport = sanitize_integer(auto_fit_viewport, FALSE, TRUE, initial(auto_fit_viewport))
widescreenpref = sanitize_integer(widescreenpref, FALSE, TRUE, initial(widescreenpref))
pixel_size = sanitize_float(pixel_size, PIXEL_SCALING_AUTO, PIXEL_SCALING_3X, 0.5, initial(pixel_size))
scaling_method = sanitize_text(scaling_method, initial(scaling_method))
@@ -291,6 +295,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["asaycolor"], asaycolor)
WRITE_FILE(S["brief_outfit"], brief_outfit)
WRITE_FILE(S["ooccolor"], ooccolor)
WRITE_FILE(S["screentip_color"], screentip_color)
WRITE_FILE(S["lastchangelog"], lastchangelog)
WRITE_FILE(S["UI_style"], UI_style)
WRITE_FILE(S["hotkeys"], hotkeys)
@@ -319,6 +324,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["clientfps"], clientfps)
WRITE_FILE(S["parallax"], parallax)
WRITE_FILE(S["ambientocclusion"], ambientocclusion)
WRITE_FILE(S["screentip_pref"], screentip_pref)
WRITE_FILE(S["auto_fit_viewport"], auto_fit_viewport)
WRITE_FILE(S["widescreenpref"], widescreenpref)
WRITE_FILE(S["pixel_size"], pixel_size)