Le Deal du moment : -34%
-34% LG OLED55B3 – TV OLED 4K 55″ 2023 ...
Voir le deal
919 €

Aller en bas
Douk
Douk
Membre

Nombre de messages : 296
Age : 30
Distinction : aucune
Date d'inscription : 23/04/2008
http://www.arcantia.info-a.googlepages.com/index.html

Icons dans l'écran titre Empty Icons dans l'écran titre

Sam 9 Aoû 2008 - 22:03
Yop !


Auteur :
RMBrasil Wink

Screen :
Icons dans l'écran titre Tc3adt10


Scripts :
A modifier :Scene Title :
Ligne 264 normalement, j'ai pas trop compris...

Code:
#===============================================================
#                            rpgmakervx.1fr1.net
#                                                                                                     
#        Merci de ne pas distribuer ce script sans autorisation.
#===================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = [10,Vocab::new_game]
    s2 = [15,Vocab::continue]
    s3 = [20,Vocab::shutdown]
    @command_window = Window_IconCommand.new(172, [s1, s2, s3])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = 288
    if @continue_enabled                    # If continue is enabled
      @command_window.index = 1            # Move cursor over command
    else                                    # If disabled
      @command_window.draw_item(1, false)  # Make command semi-transparent
    end
    @command_window.openness = 0
    @command_window.open
  end
end

Au dessus de Main :

Code:
#==============================================================================
# ** Window_IconCommand
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_IconCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader  :commands                # command
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    width      : window width
  #    commands  : command string array
  #    column_max : digit count (if 2 or more, horizontal selection)
  #    row_max    : row count (0: match command count)
  #    spacing    : blank space when items are arrange horizontally
  #--------------------------------------------------------------------------
  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    if row_max == 0
      row_max = (commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = commands
    @item_max = commands.size
    @column_max = column_max
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #    index  : item number
  #    enabled : enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4 + 24
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    draw_icon(@commands[index][0], rect.x - 24, rect.y)
    self.contents.draw_text(rect, @commands[index][1])
  end
  #--------------------------------------------------------------------------
  # * Draw Item Name
  #    item    : Item (skill, weapon, armor are also possible)
  #    x      : draw spot x-coordinate
  #    y      : draw spot y-coordinate
  #    enabled : Enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_item_name(index, x, y, enabled = true)
    draw_icon(index, x, y, enabled)
  end
end

Infos supp's :
Dites moi si ça marche pas...

Voilà :
Douk
Douk
Membre

Nombre de messages : 296
Age : 30
Distinction : aucune
Date d'inscription : 23/04/2008
http://www.arcantia.info-a.googlepages.com/index.html

Icons dans l'écran titre Empty Re: Icons dans l'écran titre

Sam 9 Aoû 2008 - 22:23
Icons dans l'écran titre 547728 Merci Mister',
T'es sur qu'il faut placer les deux au dessus de Main ?

Edit : T'embete pas pour mon menu, j'arrete RM pour l'instant, je me remet à la programmation Wink
Douk
Douk
Membre

Nombre de messages : 296
Age : 30
Distinction : aucune
Date d'inscription : 23/04/2008
http://www.arcantia.info-a.googlepages.com/index.html

Icons dans l'écran titre Empty Re: Icons dans l'écran titre

Sam 9 Aoû 2008 - 22:37
<hs>Ok merci ^^
T'inquiète, je préfère coder en C/C++ voir C#.
Mais pour l'instant je m'interesse plutôt à PHP et Javascript, je connais déjà pas mal HTML et CSS.</hs>
Anonymous
Invité
Invité

Icons dans l'écran titre Empty Re: Icons dans l'écran titre

Lun 6 Avr 2009 - 14:09
Super utile, pratique pour le design du jeu.
MayDios
MayDios
Membre

Nombre de messages : 92
Localisation : Là, sous tes yeux.
Distinction : aucune
Date d'inscription : 21/12/2008

Icons dans l'écran titre Empty Re: Icons dans l'écran titre

Mar 7 Avr 2009 - 20:43
Hey, le script permettant d'afficher les icones est sympa ( Le deuxième, c'bien ça ? ) Bref, c'peut être sympa de l'utiliser dans les différentes Window du jeu ! ( Voilà qui va m'être utile pour mon script de skin de combat.. . Icons dans l'écran titre 409170 )

Bref le pingouin maker te remercie du partage, Douk.
Contenu sponsorisé

Icons dans l'écran titre Empty Re: Icons dans l'écran titre

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