Skip to content

Commit

Permalink
tweak scoreboard padding and highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Jul 1, 2024
1 parent 3cebbc5 commit e93e8ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/ui/scoreboard.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ UI_sbheader = [

printplayericon = [
if ( = (getclientcombatclass $arg1) 0) [
uiimage "media/interface/classes/soldier.png" 0.03 0.03
uiimage "media/interface/classes/soldier.png" $printplayericonsize $printplayericonsize
]
if ( = (getclientcombatclass $arg1) 1) [
uiimage "media/interface/classes/demo.png" 0.03 0.03
uiimage "media/interface/classes/demo.png" $printplayericonsize $printplayericonsize
]
if ( = (getclientcombatclass $arg1) 2) [
uiimage "media/interface/classes/engineer.png" 0.03 0.03
uiimage "media/interface/classes/engineer.png" $printplayericonsize $printplayericonsize
]
if ( = (getclientcombatclass $arg1) 3) [
uiimage "media/interface/classes/shotgun.png" 0.03 0.03
uiimage "media/interface/classes/shotgun.png" $printplayericonsize $printplayericonsize
]
]

Expand Down Expand Up @@ -124,11 +124,11 @@ UI_playertableteam = [
if $showkills [uifill $sbcolumnwidth $rowheight [uicolortext (getclientfrags $cn) $sbkills $sbmidtext ; uialign- -1]]
if $showscore [uifill $sbcolumnwidth $rowheight [uicolortext (getclientscore $cn) $sbscore $sbmidtext ; uialign- -1]]
uifill (sbnamecolwidth) $rowheight [uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) $sbbigtext ; uialign- 1]
printplayericon $cn
uifill $sbpadhorizontal
printplayericon $cn
] [
uicolor (? $UI_sbtc $sbtablerow1 $sbtablerow2) 0 0 [uiclamp 1 1 1 1]
pushif highlight (scoreboardhighlight $cn) [uioutline $color_mid_gray (-f (*f $sbwidth 0.5) $playeroutlinewidth) (-f $rowheight $playeroutlinewidth)]
pushif highlight (scoreboardhighlight $cn) [uioutline $color_mid_gray (-f (*f $sbwidth (+f 0.5 $printplayericonsize)) $playeroutlinewidth) (-f $rowheight $playeroutlinewidth)]
]
]
]
Expand All @@ -153,7 +153,7 @@ UI_playertableteam = [
UI_sbtc = (! $UI_sbtc)
uitablerow [
uifill $sbpadhorizontal
uihlist 0 [
uihlist $pad_thin [
printplayericon $cn
uifill (sbnamecolwidth) $rowheight [uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) $sbbigtext ; uialign- -1]
]
Expand All @@ -168,7 +168,7 @@ UI_playertableteam = [
uifill $sbpadhorizontal
] [
uicolor (? $UI_sbtc $sbtablerow1 $sbtablerow2) 0 0 [uiclamp 1 1 1 1]
pushif highlight (scoreboardhighlight $cn) [uioutline $color_mid_gray (-f (*f $sbwidth 0.5) $playeroutlinewidth) (-f $rowheight $playeroutlinewidth)]
pushif highlight (scoreboardhighlight $cn) [uioutline $color_mid_gray (-f (*f $sbwidth (+f 0.5 $printplayericonsize)) $playeroutlinewidth) (-f $rowheight $playeroutlinewidth)]
]
]
]
Expand Down
1 change: 1 addition & 0 deletions config/ui/style.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ sbnetstat = 0x77A1D9
sbwidth = 1.18
sbcolumnwidth = 0.05
// changes scoreboard size depending on what features are enabled (doesn't seem to work?)
printplayericonsize = 0.025
sbnamecolwidth = [-f (*f $sbwidth 0.5) (? $showscore $sbcolumnwidth) (? $showkills $sbcolumnwidth) (? $showdeaths $sbcolumnwidth) (? $scoreboardmultiplayer (? $showpj $sbcolumnwidth)) (? $scoreboardmultiplayer (? $showping $sbcolumnwidth)) (? $scoreboardmultiplayer (? $showclientnum $sbcolumnwidth)) 0.03]
sbtableheaderheight = 0.042
playeroutlinewidth = 0.002
Expand Down

0 comments on commit e93e8ed

Please sign in to comment.