Grandes icons
RPG Maker universe :: RPG Maker VX :: Scripts :: Autres
Page 1 sur 1
Grandes icons
Ce script de miget man12 permet d'avoir 2 iconset, le normal et un plus grand de 24*24.
Cet iconset de 24*24 doit s'apeller Iconset(bigger) dans system
Un petit exemple :
Cet iconset de 24*24 doit s'apeller Iconset(bigger) dans system
Un petit exemple :
- Code:
#==============================================================================
# Different size Icons
# NOTE: This might not work with lots of things. It's a good idea to use a
# different filename for the bigger iconset so that things that make a new
# method won't use the bigger icon graphic and crop 24x24 icons out of it.
#==============================================================================
$imported={}if$imported.nil?
$imported["Mm12BigIcons"]
class Window_Base
# The Iconset Graphic will need to have icons that are bigger, and be as
# wide as 16 x icon width.
# I recommend having 2 iconset pictures: one called "IconSet" with icons
# that are 24x24, and one called something slightly different with icons
# that are bigger, then have the ICONSET_NAME constant set to the one with
# the bigger icons. This will make the icons appear 24x24 in the database,
# but bigger in the game.
ICONSET_NAME = "Iconset(bigger)"
# Have icons centered (it's a good idea...)
CENTER_ICONS = true
# It's a good idea to have width $ height the same; it looks better.
# Icon Width
ICON_WIDTH = 32#Changer la taille(Largeur), tout en gardant en tête que c'est à l'icône seule que sa s'affecte.
# Icon Height
ICON_HEIGHT = 32 #Changer la taille(Hauteur), tout en gardant en tête que c'est à l'icône seule que sa s'affecte.
def draw_icon(icon_index, x, y, enabled = true)
bitmap = Cache.system(ICONSET_NAME)
rect=Rect.new(icon_index%16*ICON_WIDTH,icon_index/16*ICON_HEIGHT,ICON_WIDTH,ICON_HEIGHT)
x-=4 if CENTER_ICONS
y-=4 if CENTER_ICONS
self.contents.blt(x,y,bitmap,rect,enabled ? 255: 128)
end
end
RPG Maker universe :: RPG Maker VX :: Scripts :: Autres
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|