Skip to content

Commit ff3eec1

Browse files
committed
In draw-screen, always show the status bar.
Previously, the status bar was hidden during targeting. This was a little more efficient of screen real estate, but caused the view to shift as it recentered.
1 parent aed460a commit ff3eec1

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

simalq/commands.hy

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
0
159159
(menu (len stack) :draw (fn []
160160
(print-main-screen :target target
161-
:status-bar F :tile-list 'pickable)))))))
161+
:tile-list 'pickable)))))))
162162
(info-screen (get stack tile-ix)))))
163163

164164
ShiftHistory (do
@@ -336,7 +336,7 @@
336336
(hy.I.simalq/main.io-mode
337337
:draw (fn []
338338
(hy.I.simalq/main.print-main-screen
339-
:target focus :status-bar F :tile-list 'nonpickable))
339+
:target focus :tile-list 'nonpickable))
340340
:on-input (fn [key]
341341
(nonlocal focus)
342342
(setv dir-v (hy.I.simalq/keyboard.read-dir-key key))

simalq/display.hy

+3-5
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ interface elements as lists of `ColorChar`s."
9797
[target None]
9898
; An optional `Pos` to focus the map. Otherwise, we use the
9999
; player's current position.
100-
[status-bar T]
101100
[tile-list None]
102101
; `None`, or the symbols `pickable` or `nonpickable`
103102
[inventory F]
@@ -108,10 +107,9 @@ interface elements as lists of `ColorChar`s."
108107
(setv out [])
109108

110109
; The status bar is drawn first.
111-
(when status-bar
112-
(+= out (lfor
113-
line (draw-status-bar)
114-
(colorstr-to-width line width))))
110+
(+= out (lfor
111+
line (draw-status-bar)
112+
(colorstr-to-width line width)))
115113
(setv status-bar-lines (len out))
116114
; Then the map, including overmarks.
117115
(setv focus (or target G.player.pos))

simalq/util.hy

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
(return))
7575

7676
(print-main-screen
77-
:status-bar T
7877
:messages message-queue
7978
:overmarks (dfor p ps p (lfor i (range 2)
8079
(ColorChar

0 commit comments

Comments
 (0)