FoodとWaterの常時表示
コメントネタより。α16.1(b1)現在、飢えと渇きはステータス画面を開かなければ確認できない。これを常時表示してみる。
XUi/windows.xmlの<window name="HUDLeftStatBars">が左下でHPやStaminaを表示している枠である。
まず<grid name="hud" ~ controller="InGameHUD"~>のpos="9,98"をpos="9,196"へ、rows="2"をrows="4"に。
次に<rect ~ stat_type="Stamina" ~>から</rect>となっている塊を丸ごとコピーし、grid内の任意の位置に二個ペースとする。
ペーストして増やしたrectのstat_typeを"Water"と"Food"にすれば表示されるようになるが、ゲージの表示が怪しいので、増やしたrectの<sprite depth="3"の行はコメントアウトしておいてもよい。(行の頭に<!--、最後に-->)
最期に<rect name="hud" ~ controller="BuffPopoutList"~>のposを"93,220"に書き換えてポップアップの位置を上にあげれば完了だ。
本項目作成者の実際のxml(2017/08/07更新 α16.1(b1)にて動作確認済み)
3行化やXX/100でなく%表示にするなど、上記説明より手が入っている。
<?xml version="1.0" encoding="utf-8"?>
<window name="HUDLeftStatBars">
<grid name="hud" pos="9,98" rows="2" cols="1" width="168" cell_width="168" cell_height="46" repeat_content="false" side="left">
<rect width="168" height="43" controller="HUDStatBar" stat_type="Stamina" visible="{statvisible}">
<sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced"/>
<sprite depth="2" pos="3,-3" name="background" height="37" width="162" color="64,64,64,100" type="sliced" />
<sprite depth="3" pos="3,-3" name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="162" fill="0"/>
<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/>
<label depth="6" name="TextContent" pos="0,-8" font_size="28" color="[white]" justify="center" pivot="topleft" text="{statcurrentwithmax}" height="30"/>
</rect>
<rect width="168" height="43" controller="HUDStatBar" stat_type="Health" visible="{statvisible}">
<sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced" />
<sprite depth="2" pos="3,-3" name="background" height="37" width="162" color="64,64,64,100" type="sliced" />
<sprite depth="3" pos="3,-3" name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="162" fill="0" />
<sprite depth="4" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" pos="8,-6" foregroundlayer="true"/>
<label depth="6" name="TextContent" pos="0,-8" font_size="28" color="[white]" justify="center" pivot="topleft" text="{statcurrentwithmax}" height="30"/>
</rect>
</grid>
<grid name="hud" pos="9,147" rows="1" cols="2" width="84" cell_width="84" cell_height="46" repeat_content="false" side="left" >
<rect width="81" height="43" controller="HUDStatBar" stat_type="water" visible="{statvisible}">
<sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced"/>
<sprite depth="2" pos="3,-3" name="background" height="37" width="78" color="64,64,64,100" type="sliced" />
<sprite depth="3" pos="3,-3" name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="74" fill="0" />
<sprite depth="4" pos="3,-6" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" foregroundlayer="true"/>
<label depth="6" pos="-5,-15" name="TextContent" font_size="20" color="[white]" justify="right" pivot="topleft" text="{statcurrent}%" height="30"/>
</rect>
<rect width="81" height="43" controller="HUDStatBar" stat_type="food" visible="{statvisible}">
<sprite depth="1" name="border" color="0,0,0,100" height="43" type="sliced"/>
<sprite depth="2" pos="3,-3" name="background" height="37" width="78" color="64,64,64,100" type="sliced" />
<sprite depth="3" pos="3,-3" name="BarContent" sprite="{statimage|once}" type="filled" height="37" width="74" fill="0" />
<sprite depth="4" pos="3,-6" name="Icon" atlas="{staticonatlas|once}" sprite="{staticon|once}" size="32,32" foregroundlayer="true"/>
<label depth="6" pos="-5,-15" name="TextContent" font_size="20" color="[white]" justify="right" pivot="topleft" text="{statcurrent}%" height="30"/>
</rect>
</grid>
<rect name="hud" pos="93,177" side="left" controller="BuffPopoutList" pivot="BottomLeft">
<panel width="168" height="43" name="item" visible="false" pivot="right" disableautobackground="true" pos="70, 0">
<sprite depth="3" pos="0,0" name="Background" sprite="ui_game_popup" height="43" width="162" pivot="center" flip="Horizontally" color="[transparent]"/>
<sprite depth="4" name="Icon" size="36,32" pos="-58,0" pivot="center" color="[transparent]"/>
<label depth="6" name="TextContent" pos="0,0" font_size="28" color="[white]" justify="center" height="30" pivot="center"/>
</panel>
</rect>
</window>