- Renamed the obj/hud other_update() proc to hidden_inventory_update()

- Renamed the obj/hud show_otherinventory var to inventory_shown
- Added the F12 hotkey which hides most of the UI except for the intent switcher, hands, health indicator, damage indicators and the other pop-in indicators on the right. The proc is called /mob/verb/button_pressed_F12(), the verb abbreviation is "F12" and it's hidden, so it won't show in the info panel. This currently only works for human mobs.

Screenshot:
http://www.kamletos.si/minimal%20UI.png

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3926 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-06-27 08:13:23 +00:00
parent da5bfd3b0f
commit 9f3005255c
8 changed files with 99 additions and 30 deletions
+36 -16
View File
@@ -41,6 +41,7 @@
#define ui_acti "13:26,1:5"
#define ui_movi "12:24,1:5"
#define ui_zonesel "14:28,1:5"
#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_borg_pull "12:24,2:7"
#define ui_borg_module "13:26,2:7"
@@ -110,35 +111,54 @@ obj/hud/New(var/type = 0)
return
/obj/hud/proc/other_update()
/obj/hud/proc/hidden_inventory_update()
if(!mymob) return
if(show_otherinventory)
if(mymob:shoes) mymob:shoes:screen_loc = ui_shoes
if(mymob:gloves) mymob:gloves:screen_loc = ui_gloves
if(mymob:ears) mymob:ears:screen_loc = ui_ears
//if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
if(mymob:head) mymob:head:screen_loc = ui_head
if(inventory_shown && hud_shown)
if(ishuman(mymob))
if(mymob:shoes) mymob:shoes:screen_loc = ui_shoes
if(mymob:gloves) mymob:gloves:screen_loc = ui_gloves
if(mymob:ears) mymob:ears:screen_loc = ui_ears
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
if(mymob:w_uniform) mymob:w_uniform:screen_loc = ui_iclothing
if(mymob:wear_suit) mymob:wear_suit:screen_loc = ui_oclothing
if(mymob:wear_mask) mymob:wear_mask:screen_loc = ui_mask
if(mymob:head) mymob:head:screen_loc = ui_head
else
if(ishuman(mymob))
if(mymob:shoes) mymob:shoes:screen_loc = null
if(mymob:gloves) mymob:gloves:screen_loc = null
if(mymob:ears) mymob:ears:screen_loc = null
//if(mymob:s_store) mymob:s_store:screen_loc = null
if(mymob:glasses) mymob:glasses:screen_loc = null
if(mymob:w_uniform) mymob:w_uniform:screen_loc = null
if(mymob:wear_suit) mymob:wear_suit:screen_loc = null
if(mymob:wear_mask) mymob:wear_mask:screen_loc = null
if(mymob:head) mymob:head:screen_loc = null
/obj/hud/proc/persistant_inventory_update()
if(!mymob) return
if(hud_shown)
if(ishuman(mymob))
if(mymob:s_store) mymob:s_store:screen_loc = ui_sstore1
if(mymob:wear_id) mymob:wear_id:screen_loc = ui_id
if(mymob:belt) mymob:belt:screen_loc = ui_belt
if(mymob:back) mymob:back:screen_loc = ui_back
if(mymob:l_store) mymob:l_store:screen_loc = ui_storage1
if(mymob:r_store) mymob:r_store:screen_loc = ui_storage2
else
if(ishuman(mymob))
if(mymob:s_store) mymob:s_store:screen_loc = null
if(mymob:wear_id) mymob:wear_id:screen_loc = null
if(mymob:belt) mymob:belt:screen_loc = null
if(mymob:back) mymob:back:screen_loc = null
if(mymob:l_store) mymob:l_store:screen_loc = null
if(mymob:r_store) mymob:r_store:screen_loc = null
/obj/hud/var/show_otherinventory = 1
/obj/hud/var/obj/screen/action_intent
/obj/hud/var/obj/screen/move_intent
/obj/hud
var/obj/screen/action_intent
var/obj/screen/move_intent
var/hud_shown = 1 //Used for the HUD toggle (F12)
var/inventory_shown = 1 //the inventory
/obj/hud/proc/instantiate(var/type = 0)
+1 -1
View File
@@ -681,7 +681,7 @@
//, mymob.i_select, mymob.m_select
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
show_otherinventory = 0;
inventory_shown = 0;
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
@@ -588,7 +588,7 @@ Please contact me on #coderbus IRC. ~Carn x
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
if(client)
client.screen |= contents
hud_used.other_update() //Updates the screenloc of the items on the 'other' inventory bar
hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar
/mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1)
-3
View File
@@ -5,9 +5,6 @@
flags = NOREACT
var/datum/mind/mind
//MOB overhaul
//Not in use yet
+47
View File
@@ -268,3 +268,50 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 1
return 0
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12()
set name = "F12"
set hidden = 1
if(hud_used)
if(ishuman(src))
if(!src.client) return
if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
src.client.screen -= src.hud_used.adding
if(src.hud_used.other)
src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons
//Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
src.client.screen += src.hud_used.l_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.r_hand_hud_object //we want the hands to be visible
src.client.screen += src.hud_used.action_intent //we want the intent swticher visible
src.hud_used.action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
//These ones are not a part of 'adding', 'other' or 'hotkeybuttons' but we want them gone.
src.client.screen -= src.zone_sel //zone_sel is a mob variable for some reason.
else
hud_used.hud_shown = 1
if(src.hud_used.adding)
src.client.screen += src.hud_used.adding
if(src.hud_used.other && src.hud_used.inventory_shown)
src.client.screen += src.hud_used.other
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
src.client.screen += src.hud_used.hotkeybuttons
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
src.client.screen += src.zone_sel //This one is a special snowflake
hud_used.hidden_inventory_update()
hud_used.persistant_inventory_update()
else
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
else
usr << "\red This mob type does not use a HUD."
+8 -8
View File
@@ -205,14 +205,14 @@
switch(name)
/*
if("other")
if (usr.hud_used.show_otherinventory)
usr.hud_used.show_otherinventory = 0
if (usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.show_otherinventory = 1
usr.hud_used.inventory_shown = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.other_update()*/
usr.hud_used.hidden_inventory_update()*/
if("act_intent")
if(ishuman(usr) || istype(usr,/mob/living/carbon/alien/humanoid) || islarva(usr))
usr.hud_used.action_intent.icon_state = "intent_[usr.a_intent]"
@@ -234,14 +234,14 @@
usr.clearmap()
if("other")
if (usr.hud_used.show_otherinventory)
usr.hud_used.show_otherinventory = 0
if (usr.hud_used.inventory_shown)
usr.hud_used.inventory_shown = 0
usr.client.screen -= usr.hud_used.other
else
usr.hud_used.show_otherinventory = 1
usr.hud_used.inventory_shown = 1
usr.client.screen += usr.hud_used.other
usr.hud_used.other_update()
usr.hud_used.hidden_inventory_update()
if("equip")
var/obj/item/I = usr.get_active_hand()
+1 -1
View File
@@ -52,10 +52,10 @@ should be listed in the changelog upon commit tho. Thanks. -->
<h3 class="author">Errorage updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fixed the bug which prevented you from editing book's titles and authors with a pen. Also fixed the bug which prevented you from ordering a book by it's SS13ID.</li>
<li class="rscadd"><font color='red'><b>Added the F12 hotkey which hides most of the UI. Currently only works for humans.</b></font></li>
</ul>
</div>
<div class="commit sansserif">
<h2 class="date">Tue 26th June 2012</h2>
<h3 class="author">Errorage updated:</h3>
+5
View File
@@ -91,6 +91,10 @@ macro "macro"
name = "SHIFT+F2+REP"
command = ".screenshot"
is-disabled = false
elem
name = "F12"
command = "F12"
is-disabled = false
macro "tcside"
@@ -1045,6 +1049,7 @@ window "mapwindow"
text-mode = false
on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\""
on-hide = ".winset\"mainwindow.mainvsplit.left=\""
style = ""
window "outputwindow"
elem "outputwindow"