CREDITS
ANLEITUNG
Einen neuen Ordner erstellen in Graphics und ihn Icons nennen.
Dann in den Notes bei denjenigen Item, Rüstung oder Waffe schreiben:
<ICON Dateiname>
Falls das nicht geschehen ist wird das Icon aus dem IconSet genommen, das bei Grafik eingestellt wurde.
Die Größe eines einzelnen Icons beträgt wie bei dem Iconset 24x24 px.
SKRIPT
class Window_Base
def draw_icon2(icon_file, x, y, enabled = true)
bitmap = Cache.load_bitmap("Graphics/Icons/", icon_file)
rect = Rect.new(0, 0, 24, 24)
self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
end
def draw_item_name(item, x, y, enabled = true)
if item != nil
if item.get_icon
draw_icon2(item.get_icon.to_s, x, y, enabled)
else
draw_icon(item.icon_index, x, y, enabled)
end
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
end
end
end
module Item
ICON = /<ICON*(.*)>/i
end
class RPG::BaseItem
def get_icon
self.note.split(/[\r\n]+/).each { |line|
if line =~ Item::ICON
a = line.split(/ /)[1]
d = ""
while ((c = a.slice!(/./m)) != nil)
d += c if c != ">"
end
return d
end
}
return nil
end
end
LINKS
- als Textdatei downloaden oder öffnen (http://rpgvx.bplaced.net/scripts/SingleIcon.txt)
- RPG RPG Revolution (Quelle) (http://www.rpgrevolution.com/forums/?showtopic=10038)