Tweak dialogue positioning
This commit is contained in:
parent
b4cde1ea16
commit
d7c978dc39
|
@ -275,16 +275,16 @@ and max-row; for use with RENDER-STRING. Like so:
|
||||||
(leftp (not (eq direction '🌍:right)))
|
(leftp (not (eq direction '🌍:right)))
|
||||||
(text (getf dialogue :text))
|
(text (getf dialogue :text))
|
||||||
(coords (🌍:world-coords->screen-coords (🌍:getf-entity-data map speaker-id :coords))))
|
(coords (🌍:world-coords->screen-coords (🌍:getf-entity-data map speaker-id :coords))))
|
||||||
;; Ideally, place text-box behind the speaker; otherwise, place it above (NPC) or below (player).
|
;; Ideally, place text-box above/below (NPC/player); otherwise, place it behind speaker
|
||||||
(or (optimal-text-placement-horizontally text coords :width width :height height
|
(or (optimal-text-placement-vertically text coords :width width :height height
|
||||||
:rightp leftp)
|
:downp playerp)
|
||||||
(optimal-text-placement-vertically text coords :width width :height height
|
|
||||||
:downp playerp)
|
|
||||||
;; … Worst-case scenario, just do whatever’ll fit :w:”
|
|
||||||
(optimal-text-placement-vertically text coords :width width :height height
|
|
||||||
:downp (not playerp))
|
|
||||||
(optimal-text-placement-horizontally text coords :width width :height height
|
(optimal-text-placement-horizontally text coords :width width :height height
|
||||||
:rightp (not leftp)))))
|
:rightp leftp)
|
||||||
|
;; … Worst-case scenario, just do whatever’ll fit :w:”
|
||||||
|
(optimal-text-placement-horizontally text coords :width width :height height
|
||||||
|
:rightp (not leftp))
|
||||||
|
(optimal-text-placement-vertically text coords :width width :height height
|
||||||
|
:downp (not playerp)))))
|
||||||
|
|
||||||
|
|
||||||
(defun render-dialogue-block (matrix map dialogue)
|
(defun render-dialogue-block (matrix map dialogue)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue