[RMVX ACE] HOW TO ADD BORDERS TO BATTLE LOG?

Posts

Pages: 1
Hey folks! Got another question.

By default, the Battle Log window is borderless. I'd like to restore its border so it looks the same as any other window. Searching the Script Editor didn't yield anything I thought looked relevant, so I don't know where to start tinkering. I was hoping someone could point me in the right direction.

Thanks for reading, as always! :D
Marrend
Guardian of the Description Thread
21806
This is a bit weird. Window_BattleLog apparently uses a separate background sprite that has nothing to do with the windowskin. Though, if the intent is for it to look like any other window, I suppose something like...

class Window_BattleLog < Window_Selectable
  def initialize
    super(0, 0, window_width, window_height)
    self.z = 200
    self.opacity = 0
    @lines = []
    @num_wait = 0
    #create_back_bitmap
    #create_back_sprite
    refresh
  end

  def update_tone
    self.tone.set(0,0,0)
  end
  
  def dispose
    super
    #dispose_back_bitmap
    #dispose_back_sprite
  end
  
  def refresh
    if @lines.size > 0
      height = line_number * line_height + padding * 2
      move(0,0,window_width,height)
      self.opacity = 255
    else
      self.opacity = 0
    end
    contents.clear
    @lines.size.times {|i| draw_line(i) }
  end
end

...this works? The size of the log-window would not be dynamic, though.

*Edit: Code updated so that the window's size is dynamic, and set the window tone to be gray.
You've done it again, haha!

I really appreciate all the quick, helpful responses. In 999 years, when I'm close to finishing this game, I'll gladly give you credit!
Pages: 1