RPG Maker universe
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Le Deal du moment : -39%
Pack Home Cinéma Magnat Monitor : Ampli DENON ...
Voir le deal
1190 €

Grandes icons

Aller en bas

Grandes icons Empty Grandes icons

Message par Nicolas Jeu 24 Fév - 9:43

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 : Grandes icons Captur13

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

Nicolas
Admin
Admin

Messages : 113
Date d'inscription : 20/02/2011

https://rpguniverse.forumsactifs.com

Revenir en haut Aller en bas

Revenir en haut


 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum