From 482e61a57e141ae2e74c1220b74611ed24ed3cf7 Mon Sep 17 00:00:00 2001 From: AlecW <32695675+epochayur@users.noreply.github.com> Date: Fri, 13 Oct 2017 14:51:17 -0700 Subject: [PATCH 1/2] Adds Toggle Underline button to PDA menu (#31604) * Add Toggle Underline button to PDA.dm -Adds Toggle Underline button to PDA menu that, when pressed, applies underline styling to all elements. * Changed 1/0 to bools Now using TRUE and FALSE, also cleaned some HTML I missed the first time --- code/game/objects/items/devices/PDA/PDA.dm | 85 +++++++++++++--------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index a5ed03919a..6085319aab 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(PDAs) var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again. var/font_mode = "font-family:monospace;" //The currently selected font. var/background_color = "#808000" //The currently selected background color. - + #define FONT_MONO "font-family:monospace;" #define FONT_SHARE "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;" #define FONT_ORBITRON "font-family:\"Orbitron\", monospace;letter-spacing:0px; font-size:15px" @@ -71,6 +71,8 @@ GLOBAL_LIST_EMPTY(PDAs) var/obj/item/inserted_item //Used for pen, crayon, and lipstick insertion or removal. Same as above. var/overlays_x_offset = 0 //x offset to use for certain overlays + var/underline_flag = TRUE //flag for underline + /obj/item/device/pda/examine(mob/user) ..() if(!id && !inserted_item) @@ -162,34 +164,36 @@ GLOBAL_LIST_EMPTY(PDAs) hidden_uplink.interact(user) return - var/dat = "Personal Data Assistant" + var/dat = "Personal Data Assistant" - dat += " Refresh" + dat += "Refresh" if ((!isnull(cartridge)) && (mode == 0)) - dat += " | Eject [cartridge]" + dat += " | Eject [cartridge]" if (mode) - dat += " | Return" + dat += " | Return" if (mode == 0) dat += "
" dat += "
Toggle Font" dat += " | Change Color" + dat += " | Toggle Underline" //underline button + dat += "
" dat += "
" if (!owner) dat += "Warning: No owner information entered. Please swipe card.

" - dat += " Retry" + dat += "Retry" else switch (mode) if (0) dat += "

PERSONAL DATA ASSISTANT v.1.2

" dat += "Owner: [owner], [ownjob]
" - dat += text("ID: [id ? "[id.registered_name], [id.assignment]" : "----------"]") - dat += text("
[id ? "Update PDA Info" : ""]

") + dat += text("ID: [id ? "[id.registered_name], [id.assignment]" : "----------"]") + dat += text("
[id ? "Update PDA Info" : ""]

") dat += "[worldtime2text()]
" //:[world.time / 100 % 6][world.time / 100 % 10]" dat += "[time2text(world.realtime, "MMM DD")] [GLOB.year_integer+540]" @@ -198,38 +202,38 @@ GLOBAL_LIST_EMPTY(PDAs) dat += "

General Functions

" dat += "" if (cartridge.access & CART_ENGINE) dat += "

Engineering Functions

" dat += "" if (cartridge.access & CART_MEDICAL) dat += "

Medical Functions

" dat += "" if (cartridge.access & CART_SECURITY) dat += "

Security Functions

" dat += "" if(cartridge.access & CART_QUARTERMASTER) dat += "

Quartermaster Functions:

" dat += "" dat += "" @@ -237,25 +241,25 @@ GLOBAL_LIST_EMPTY(PDAs) dat += "