The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Leventhan on July 09, 2008, 07:26:13 AM

Title: [Resolved] How to adjust window's opacity?
Post by: Leventhan on July 09, 2008, 07:26:13 AM
Help with this, please?
Title: Re: How to adjust window's opacity?
Post by: ahref on July 09, 2008, 07:28:04 AM
@windowname.back_opacity = number between 0 and 255.

that should do the background of the window.

@windowname.opacity might do the text
Title: Re: How to adjust window's opacity?
Post by: Leventhan on July 09, 2008, 07:43:13 AM
Which part of the script is that?
Window_Message?
Title: Re: How to adjust window's opacity?
Post by: modern algebra on July 09, 2008, 11:37:44 AM
Well, that was inside a scene, but you could just as easily adjust opacity in the window's initialize method with the code:

self.opacity
self.back_opacity

if you didn't want to mess around with scenes.
Title: Re: How to adjust window's opacity?
Post by: Leventhan on July 09, 2008, 02:42:32 PM
I get the command but dunno where to put it ;-;
Title: Re: How to adjust window's opacity?
Post by: modern algebra on July 10, 2008, 12:00:35 AM
Quotewindow's initialize method


class Window_Message (or whatever window)
  def initialize
    # Everything already in the method
    self.back_opacity = xxx
  end
end

Or, as ahref said, in the Scene class you want to modify, right after you make the window, so if in Scene_Menu or something:

def main
  # Bla bla bla
  @menustatus_window = Whatever
  @menustatus_window.opacity = xxx
  # Bla bla bla
end
 
Title: Re: How to adjust window's opacity?
Post by: Leventhan on July 10, 2008, 08:25:20 AM
Quote from: modern algebra II on July 10, 2008, 12:00:35 AM
Quotewindow's initialize method


class Window_Message (or whatever window)
  def initialize
    # Everything already in the method
    self.back_opacity = xxx
  end
end

Or, as ahref said, in the Scene class you want to modify, right after you make the window, so if in Scene_Menu or something:

def main
  # Bla bla bla
  @menustatus_window = Whatever
  @menustatus_window.opacity = xxx
  # Bla bla bla
end
 
;8
I love you guys. [Resolved]