diff --git a/doomsday/plugins/jdoom/defs/values.ded b/doomsday/plugins/jdoom/defs/values.ded index 158290f1ea..c00630f211 100644 --- a/doomsday/plugins/jdoom/defs/values.ded +++ b/doomsday/plugins/jdoom/defs/values.ded @@ -248,5 +248,27 @@ Values { WIBP2 = "{tracking=2}P2"; WIBP3 = "{tracking=2}P3"; WIBP4 = "{tracking=2}P4"; + + STGNUM0 = "{font=game:index,r=0.5,g=0.5,b=0.5}0"; + STGNUM1 = "{font=game:index,r=0.5,g=0.5,b=0.5}1"; + STGNUM2 = "{font=game:index,r=0.5,g=0.5,b=0.5}2"; + STGNUM3 = "{font=game:index,r=0.5,g=0.5,b=0.5}3"; + STGNUM4 = "{font=game:index,r=0.5,g=0.5,b=0.5}4"; + STGNUM5 = "{font=game:index,r=0.5,g=0.5,b=0.5}5"; + STGNUM6 = "{font=game:index,r=0.5,g=0.5,b=0.5}6"; + STGNUM7 = "{font=game:index,r=0.5,g=0.5,b=0.5}7"; + STGNUM8 = "{font=game:index,r=0.5,g=0.5,b=0.5}8"; + STGNUM9 = "{font=game:index,r=0.5,g=0.5,b=0.5}9"; + + STYSNUM0 = "{font=game:index,r=1,g=0.9,b=0.4}0"; + STYSNUM1 = "{font=game:index,r=1,g=0.9,b=0.4}1"; + STYSNUM2 = "{font=game:index,r=1,g=0.9,b=0.4}2"; + STYSNUM3 = "{font=game:index,r=1,g=0.9,b=0.4}3"; + STYSNUM4 = "{font=game:index,r=1,g=0.9,b=0.4}4"; + STYSNUM5 = "{font=game:index,r=1,g=0.9,b=0.4}5"; + STYSNUM6 = "{font=game:index,r=1,g=0.9,b=0.4}6"; + STYSNUM7 = "{font=game:index,r=1,g=0.9,b=0.4}7"; + STYSNUM8 = "{font=game:index,r=1,g=0.9,b=0.4}8"; + STYSNUM9 = "{font=game:index,r=1,g=0.9,b=0.4}9"; }; } diff --git a/doomsday/plugins/jdoom/src/st_stuff.c b/doomsday/plugins/jdoom/src/st_stuff.c index c30e49c61b..fd1984b584 100644 --- a/doomsday/plugins/jdoom/src/st_stuff.c +++ b/doomsday/plugins/jdoom/src/st_stuff.c @@ -1496,7 +1496,11 @@ void WeaponSlot_Drawer(uiwidget_t* obj, const Point2Raw* offset) DGL_Enable(DGL_TEXTURE_2D); DGL_Color4f(1, 1, 1, textAlpha); - GL_DrawPatch(wpns->patchId, element); + FR_SetFont(obj->font); + FR_SetColorAndAlpha(defFontRGB2[CR], defFontRGB2[CG], defFontRGB2[CB], textAlpha); + + WI_DrawPatch3(wpns->patchId, Hu_ChoosePatchReplacement(cfg.hudPatchReplaceMode, wpns->patchId), + element, ALIGN_TOPLEFT, 0, DTF_NO_EFFECTS); DGL_Disable(DGL_TEXTURE_2D); DGL_MatrixMode(DGL_MODELVIEW); @@ -1509,6 +1513,7 @@ void WeaponSlot_Drawer(uiwidget_t* obj, const Point2Raw* offset) void WeaponSlot_UpdateGeometry(uiwidget_t* obj) { guidata_weaponslot_t* wpns = (guidata_weaponslot_t*)obj->typedata; + const char* text = Hu_ChoosePatchReplacement(cfg.hudPatchReplaceMode, wpns->patchId); patchinfo_t info; Rect_SetWidthHeight(obj->geometry, 0, 0); @@ -1516,8 +1521,19 @@ void WeaponSlot_UpdateGeometry(uiwidget_t* obj) if(deathmatch) return; if(ST_AutomapIsActive(obj->player) && cfg.automapHudDisplay == 0) return; if(P_MobjIsCamera(players[obj->player].plr->mo) && Get(DD_PLAYBACK)) return; - if(!R_GetPatchInfo(wpns->patchId, &info)) return; + if(!text && !R_GetPatchInfo(wpns->patchId, &info)) return; + + if(text) + { + Size2Raw textSize; + FR_SetFont(obj->font); + FR_TextSize(&textSize, text); + Rect_SetWidthHeight(obj->geometry, textSize.width * cfg.statusbarScale, + textSize.height * cfg.statusbarScale); + return; + } + R_GetPatchInfo(wpns->patchId, &info); Rect_SetWidthHeight(obj->geometry, info.geometry.size.width * cfg.statusbarScale, info.geometry.size.height * cfg.statusbarScale); }