                                   (if (= cur-vals saved-vals) :clear :save)
                                   (when (not= cur-vals (:starting-vars info))
                                     :save)))]
-              (write-display-cell controller 0 x (cue-variable-names controller cue (:id info)))
+              (draw-cue-variable-names controller x cue (:id info))
               (write-display-cell controller 1 x (cue-variable-values controller cue (:id info)))
               (set-graphics-color graphics color)
               (.fillRect graphics (+ left (/ button-cell-margin 2.0)) (- Wayang/DISPLAY_HEIGHT 38)

    1 (vec (repeat 2 (first cue-vars)))
    (vec (take 2 (drop var-offset (apply concat (repeat cue-vars)))))))

(defn- fit-cue-variable-name
  "Picks the best version of a cue variable name to fit in the specified
  number of characters, then truncates it if necessary."
  [v len]
  (let [longer (or (:name v) (name (:key v)))
        shorter (or (:short-name v) longer)
        padding (clojure.string/join (repeat len " "))]
    (if (<= (count longer) len)
      (clojure.string/join (take len (str longer padding)))
      (clojure.string/join (take len (str shorter padding))))))

(defn- cue-variable-names
  "Determines the names of adjustable variables to display under an
  active cue."
  [controller cue effect-id]
  (let [cue-vars (cue-vars-for-encoders (:variables cue) (get @(:cue-var-offsets controller) effect-id 0))]
    (if (seq cue-vars)
      (if (= (count (:variables cue)) 1)
        (fit-cue-variable-name (first cue-vars) 17)
        (str (fit-cue-variable-name (first cue-vars) 8) " "
             (fit-cue-variable-name (second cue-vars) 8)))
      "")))

(defn- fit-cue-variable-value
  "Truncates the current value of a cue variable to fit available

                         arrow-pos (if (in-mode? controller :shift)
                                     (dec (.indexOf marker "." (inc (.indexOf marker "."))))
                                     (dec (count marker)))]
    #_(aset (get (:next-display controller) 2) arrow-pos 0))
  true)

(defn- adjust-beat-from-encoder
  "Adjust the current beat based on how the encoder was twisted."
