From d7c978dc39b60b0cccc688278c0ceb3d283fe542 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Sat, 24 Jun 2023 16:12:05 -0500 Subject: [PATCH] Tweak dialogue positioning --- dialogue.lisp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dialogue.lisp b/dialogue.lisp index aa2f807..eff92f8 100644 --- a/dialogue.lisp +++ b/dialogue.lisp @@ -275,16 +275,16 @@ and max-row; for use with RENDER-STRING. Like so: (leftp (not (eq direction '🌍:right))) (text (getf dialogue :text)) (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). - (or (optimal-text-placement-horizontally text coords :width width :height height - :rightp leftp) - (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)) + ;; Ideally, place text-box above/below (NPC/player); otherwise, place it behind speaker + (or (optimal-text-placement-vertically text coords :width width :height height + :downp playerp) (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)