You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(hud): HP ゲージを上に、体温ゲージを下に置き、体温の変化の矢印をゲージの右に出し、変化が無ければ出さない - #1024
var dir hud.TempDirection と default: return の組み合わせ。hud_extractor.go:478
動作は正しいです。ただ dir は switch のあとで必ず Up か Down なのに、宣言の時点ではゼロ値の "" を持ちます。1 で挙げた関数に切り出すか、各 case の中で直接 return すると、ゼロ値が残る経路が消えます。好みの範囲です。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
左上のゲージの並びを変える。HP のゲージを上に、体温のゲージを下に置き、体温の変化の矢印を体温ゲージの右に出す。
左の矢印の欄が無くなるので、ゲージは 26px 左の画面の端寄りに詰まる。
あわせて、体温がほぼ変わらないときは矢印を出さない。前は黄色の右向きの矢印を常に出していた。温まるときの赤い上向きと、冷えるときの青い下向きはこれまでどおり出す。
並びと位置だけの変更で、処理の流れも型の関係も変わらないので、図の節は省く。
変更点
internal/widgets/hud/game_info.godrawGaugesで HP の行を上、体温の行を下にし、行の中をゲージ・矢印の順にする。矢印は欄の中央に寄せ、ゲージとのあいだを空けるinternal/widgets/hud/data.gointernal/systems/hud_extractor.gotemperatureSteadyThreshold以下なら矢印を出さない。黄色の色の分岐を消すinternal/widgets/hud/game_info.goTempDirectionSteadyと右向きの字の分岐を消すinternal/systems/hud_extractor_test.go・internal/widgets/hud/game_info_draw_test.gointernal/widgets/hud/story_golden_test.gointernal/widgets/hud/testdata/・internal/states/testdata/なぜこの形か
uicore.RowとFlexColumnに任せる: 行の幅の並びと、行を積む順を入れ替えるだけで済む。座標の手計算を足さない。採用しなかった代替
検証
make checkが rc=0。LookAround_Awayは許容範囲に隠れて落ちていなかったが、同じ変化があったので撮り直した。リスク・影響範囲
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vr2J9Jq6yxRKADVAK7w1f8