Tweak dialogue positioning

This commit is contained in:
Jaidyn Ann 2023-06-24 16:12:05 -05:00
parent b4cde1ea16
commit d7c978dc39

View File

@ -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)
(optimal-text-placement-vertically text coords :width width :height height
:downp playerp) :downp playerp)
;; … Worst-case scenario, just do whateverll 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 whateverll 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)