Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

windowskin script

Hello

I was working on a project and I had the Idea to have a different windowskin in the load and save screen, but I can't find out how to change the windowskin in a script.

All I need is the part in the script which changes the windowskin, could anyone help me with this one?

mebardo
 

OS

Sponsor

Go into Scene_File, and add this method:

Code:
#--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    @savefile_windows.each {|w| w.windowskin = skin}
  end

Then, go into Scene_Save, and add this method:

Code:
#--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    super(RPG::Cache.windowskin("Save"))
  end

And lastly, go into Scene_Load, and add this method.

Code:
#--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    super(RPG::Cache.windowskin("Load"))
  end

Just add your new windowskins, named Save and Load.

I tested this, and it works fin for me. Let me know if you have any problems.
 
I can't get it work, I don't know why.

Do these methods have to be on a certain place in these scripts?

And where do you axactly put the name of the windowskin you need? (I replaced the word skin in: @savefile_windows.each {|w| w.windowskin = skin} with the name of the windowskin.
 
Add them to the bottom of each class, right before the final 'end' statement.

You could also combine them into one script, and add it above 'main'
Code:
class Scene_File
  #--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    @savefile_windows.each {|w| w.windowskin = skin}
  end
end

class Scene_Save
  #--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    super(RPG::Cache.windowskin("Save"))
  end
end

class Scene_Load
  #--------------------------------------------------------------------------
  # * Change Windowskin
  #--------------------------------------------------------------------------
  def change_windowskin(skin)
    super(RPG::Cache.windowskin("Load"))
  end
end

Then just create 2 windowskins named, "Save.png", and "Load.png" in the windowskins folder

If you want to change the name of the graphics file you use, change the "Load" and "Save" words in the lines:

super(RPG::Cache.windowskin("Save"))

super(RPG::Cache.windowskin("Load"))


Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top