From ba6a01a1905b573d6fb1d1a68e7db709ccc64450 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 24 Feb 2022 18:50:20 +0100 Subject: [PATCH] Make weapon tooltips less view-intrusive. --- language.def_base | 6 +++--- language.es_base | 6 +++--- language.version | 4 ++-- zscript/hud/swwm_hudextra.zsc | 18 ++++++------------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/language.def_base b/language.def_base index 7b0f07c2b..ba575de41 100644 --- a/language.def_base +++ b/language.def_base @@ -773,8 +773,8 @@ TT_EVISCERATOR = "\cfAltfire:\c- Grenade shot.\n" "\cfZoom:\c- Toggle spread."; TT_HELLBLAZER = -"\cfFire:\c- Load rockets, release to shoot.\n" -"\cfAltfire:\c- Load grenades, release to shoot.\n" +"\cfFire:\c- Load / shoot rockets.\n" +"\cfAltfire:\c- Load / shoot grenades.\n" "\cfZoom:\c- Select ammo.\n" "\cfReload:\c- Reload / switch ammo.\n" "\cx(More controls in library)\c-"; @@ -833,7 +833,7 @@ TT_BLACKFIRE = "\cfAltfire:\c- Icicle shot.\n" "\cfReload:\c- Reload canister(s)."; TT_EMPCARBINE = -"\cfFire:\c- Hold to ionize, release to shoot.\n" +"\cfFire:\c- Ionize / shoot.\n" "\cfAltfire:\c- Multi-target ionization.\n" "\cfZoom:\c- Use scope.\n" "\cfReload:\c- Load rods."; diff --git a/language.es_base b/language.es_base index b57addea3..64a88f58e 100644 --- a/language.es_base +++ b/language.es_base @@ -659,8 +659,8 @@ TT_EVISCERATOR = "\cfSecundario:\c- Disparo de granada.\n" "\cfZoom:\c- Alternar dispersión."; TT_HELLBLAZER = -"\cfPrimario:\c- Cargar cohetes, soltar para disparar.\n" -"\cfSecundario:\c- Cargar granadas, soltar para disparar.\n" +"\cfPrimario:\c- Cargar / disparar cohetes.\n" +"\cfSecundario:\c- Cargar / disparar granadas.\n" "\cfZoom:\c- Seleccionar munición.\n" "\cfRecarga:\c- Recargar / cambiar munición.\n" "\cx(Más controles en la biblioteca)\c-"; @@ -719,7 +719,7 @@ TT_BLACKFIRE = "\cfSecundario:\c- Disparo de carámbano.\n" "\cfRecarga:\c- Recargar frasco(s)."; TT_EMPCARBINE = -"\cfPrimario:\c- Mantener para ionizar, soltar para disparar.\n" +"\cfPrimario:\c- Ionizar / disparar.\n" "\cfSecundario:\c- Ionización multi-objetivo.\n" "\cfZoom:\c- Usar mira.\n" "\cfRecarga:\c- Cargar barras."; diff --git a/language.version b/language.version index 433f6a534..286160b12 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r170 \cu(Thu 24 Feb 17:02:16 CET 2022)\c-"; -SWWM_SHORTVER="\cw1.2pre r170 \cu(2022-02-24 17:02:16)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.2pre r171 \cu(Thu 24 Feb 18:50:20 CET 2022)\c-"; +SWWM_SHORTVER="\cw1.2pre r171 \cu(2022-02-24 18:50:20)\c-"; diff --git a/zscript/hud/swwm_hudextra.zsc b/zscript/hud/swwm_hudextra.zsc index 41fd9de0e..96382deb6 100644 --- a/zscript/hud/swwm_hudextra.zsc +++ b/zscript/hud/swwm_hudextra.zsc @@ -237,7 +237,6 @@ Class SWWMSewerCount : HUDMessageBase // weapon tooltips Class SWWMWeaponTooltip : HUDMessageBase { - TextureID icon; String wpn, txt; double tics, holdtics, fadeintics, fadeouttics; transient BrokenLines l; @@ -246,10 +245,9 @@ Class SWWMWeaponTooltip : HUDMessageBase SWWMWeaponTooltip Init( Class weapon ) { let def = GetDefaultByType(weapon); - icon = def.Icon; wpn = def.GetTag(); txt = StringTable.Localize(def.tooltip); - holdtics = 120; + holdtics = 150; fadeintics = 5; fadeouttics = 15; tics = -10; @@ -273,11 +271,7 @@ Class SWWMWeaponTooltip : HUDMessageBase double fractic = SWWMStatusBar(statusbar)?SWWMStatusBar(statusbar).fractic:0; double ftics = tics+fractic; double alpha = (ftics w ) w = lw; } - int cw = int(ceil((max(max(w1,w2),w)+8)/6.))*6; - Screen.Dim("Black",.5*alpha,int((pos.x-(cw+4)/2)*hs),int((pos.y-(h+6))*hs),int((cw+4)*hs),int((8+h+4+smallfont.GetHeight()+8+smallfont2.GetHeight()*l.Count())*hs)); - Screen.DrawTexture(icon,false,pos.x,pos.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_CenterBottomOffset,true); - pos.y += 4; + int cw = int(ceil((max(w1,w)+8)/6.))*6; + int h = smallfont.GetHeight()+8+smallfont2.GetHeight()*l.Count(); + Vector2 pos = (int(ss.x/2),ss.y-(swwm_hudmargin+80+h)); + Screen.Dim("Black",.5*alpha,int((pos.x-(cw+4)/2)*hs),int((pos.y-2)*hs),int((cw+4)*hs),int((h+4)*hs)); Screen.DrawText(smallfont,Font.CR_FIRE,pos.x-w1/2,pos.y,wpn,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alpha); for ( int i=0; i