Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Fantasist on November 10, 2008, 08:55:01 am

Title: [XP] Tiling wallpapers for windows
Post by: Fantasist on November 10, 2008, 08:55:01 am
Tiling wallpapers for windows
Authors: Fantasist
Version: 1.1
Type: Graphic Modification
Key Term: Misc Add-on



Introduction

The window background can be tiled in RMXP, but it's normally stretched. This small scriptlet reads the filename of the skin for a tile flag and decides whether to tile or stretch the wallpaper.


Features




Screenshots

Name of the windowskin file is "Clipboard1":
(http://img389.imageshack.us/img389/859/untiledod3.th.jpg) (http://img389.imageshack.us/my.php?image=untiledod3.jpg)(http://img389.imageshack.us/images/thpix.gif) (http://g.imageshack.us/thpix.php)

Name of the windowskin file is "Clipboard1 [TILE]:
(http://img530.imageshack.us/img530/2615/tiledoc8.th.jpg) (http://img530.imageshack.us/my.php?image=tiledoc8.jpg)(http://img530.imageshack.us/images/thpix.gif) (http://g.imageshack.us/thpix.php)

Don't blame me for the horrible example please ^_^'


Demo

Come on, tell me you aren't that lazy :P


Script

Paste this script above "Main" and below "Window_Base". Paste this BELOW any default scripts you're using any.
Spoiler: ShowHide

class Window_Base
 
  TILE_FLAG = "[TILE]"
  # Wallpaper will be tiled if this word is found
  # in the windowskin's filename.
 
  alias fts_tilebgm_skin windowskin=
  def windowskin=(bmp)
    fts_tilebgm_skin(bmp)
    if @windowskin_name
      self.stretch = !@windowskin_name.downcase.include?(TILE_FLAG.downcase)
    end
  end
 
end



Instructions

You can set the TILE_FLAG to any word you want. The wallpaper will be tiled if this word is found in the windowskin filename. The default is "[TILE]", so here are some examples:

Skin1 [TILE]
Skin1[TILE]
Skin[tile]1
[tIlE]Skin1
asdsd[tiLE]asdjfc

Remember that the alphabets are not case-sensitive, meaning [tile], [TILE], [TIle], all of them will work.


Compatibility

Should be compatible with almost everything :)


Credits and Thanks




Author's Notes

This isn't much of a script. This whole "script", is in essence the "stretch" property of the in-built "Window" class. Here's a quote from the RMXP help file:
Quotestretch
The wallpaper display method. If TRUE, stretches the wallpaper graphic; if FALSE, tiles it. The default value is TRUE.

Title: Re: [XP] Tiling wallpapers for windows
Post by: Satoh on November 13, 2008, 08:51:15 am
Mm... actually I'm having difficulty with this script...

It seems to be ignoring the flag in my filenames....
Title: Re: [XP] Tiling wallpapers for windows
Post by: Fantasist on November 13, 2008, 09:24:51 am
That's b/c of a stupid mistake on my part... sorry ^_^' I'll put up the next version.

EDIT: Done, should work now :)
Title: Re: [XP] Tiling wallpapers for windows
Post by: Satoh on November 13, 2008, 10:13:04 am
ありがとうございます。

Thank you very much.

It does in fact work now.
Title: Re: [XP] Tiling wallpapers for windows
Post by: Reno-s--Joker on March 13, 2009, 05:53:23 am
Awesome stuff - I'll definitely be using this. :D

*powers up*