Le Deal du moment : -20%
-20% sur le Lot de 2 écrans PC GIGABYTE ...
Voir le deal
429 €

Aller en bas
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

encore un autre menu de Dudu' Empty encore un autre menu de Dudu'

Mar 31 Aoû 2010 - 23:04
Auteur: Adurna

screen:

encore un autre menu de Dudu' 111
script:
Code:
#==============================================================================
# ** Scene_Menu  par Adurna
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

module Adurna
Obj = "Objet"
Comp = "Compétence"
Equip = "Equiper"
Stat = "Statut"
Sov = "Sauvegarder"
Fin = "Quitter"

Lieu = "lieu:"
end
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias
  #--------------------------------------------------------------------------

alias dudu_start start
alias dudu_up_com update_command_selection
alias dudu_up_actor update_actor_selection
alias dudu_end_actor end_actor_selection
alias dudu_term terminate

  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    dudu_start
    @command_window.x = -1000
    @win_actor =  Window_Actor.new(0)
    @win_actor.visible = false
    @status_window.x = -1000
    @gold_window.x = -10
    @gold_window.y = 370
    @lieu = Window_Lieu.new(254,426-54)
    @actor_chara = Actor_chara.new(354,-10)
    create_wm
  end
 
  def create_wm
    @o1 = Wm.new(100-30,-25,Adurna::Obj)
    @o2 = Wm.new(140-30,-25,Adurna::Comp)
    @o3 = Wm.new(180-30,-25,Adurna::Equip)
    @o4 = Wm.new(220-30,-25,Adurna::Stat)
    @o5 = Wm.new(260-30,-25,Adurna::Sov)
    @o6 = Wm.new(300-30,-25,Adurna::Fin)
    @o1.z = 1001
    @o2.z = 1002
    @o3.z = 1003
    @o4.z = 1004
    @o5.z = 1005
    @o6.z = 1006
  end
 
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
dudu_term
@o1.dispose
@o2.dispose
@o3.dispose
@o4.dispose
@o5.dispose
@o6.dispose
@lieu.dispose
@actor_chara.dispose
@win_actor.dispose if @win_actor != nil ;
end

  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    dudu_up_com
 case @command_window.index
      when 0   
        @o1.x = -10
        @o1.z = 10000
        @o2.x = -25
        @o2.z=1002
        @o6.x= -25
        @o6.z = 1006
      when 1
        @o2.x = -10
        @o2.z = 10000
        @o3.x = -25
        @o3.z=1003
        @o1.x= -25
        @o1.z = 1001
      when 2
        @o3.x = -10
        @o3.z = 10000
        @o4.x = -25
        @o4.z=1004
        @o2.x= -25
        @o2.z = 1002
      when 3
        @o4.x = -10
        @o4.z = 10000
        @o5.x = -25
        @o5.z=1005
        @o3.x= -25
        @o3.z = 1003
      when 4 
        @o5.x = -10
        @o5.z = 10000
        @o6.x = -25
        @o6.z=1006
        @o4.x= -25
        @o4.z = 1004
      when 5
        @o6.x = -10
        @o6.z = 10000
        @o1.x = -25
        @o1.z=1001
        @o5.x= -25
        @o5.z = 1005
      end
  end
  #--------------------------------------------------------------------------
  # * End Actor Selection
  #--------------------------------------------------------------------------
  def end_actor_selection
 dudu_end_actor
    @win_actor.dispose
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  def update_actor_selection
@win_actor.dispose
@win_actor =  Window_Actor.new(@status_window.index)
 dudu_up_actor
end
end

#==============================================================================
# ** Scene_Base
#==============================================================================

class Scene_Base
  def snapshot_for_background
    $game_temp.background_bitmap.dispose
    $game_temp.background_bitmap = Graphics.snap_to_bitmap
  end
 
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 0)
    update_menu_background
  end
end

class Window_Actor< Window_Base
  def initialize(actor_id)
    super(544-375+10,-10, 375, 125)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = $game_party.members[actor_id]
    refresh
  end
  def refresh
    self.contents.clear
    if @actor != -1
    draw_actor_face(@actor, 0, 0)
    draw_actor_name(@actor, 100, 10)
    draw_actor_class(@actor, 100, 35)
      draw_actor_level(@actor, 100, 60)
      draw_actor_state(@actor, 200, 60)
      draw_actor_hp(@actor,  200, 10)
      draw_actor_mp(@actor, 200, 35)
      end
    end
  end
 
 
class Wm < Window_Base
  def initialize(y, x,libélé)
    super(x, y, 160, WLH + 32)
    self.contents.clear
    self.contents.draw_text(4, 0, 120, WLH,libélé, 2)
  end
end


class Window_Lieu < Window_Base
  def initialize(x, y)
    super(x, y, 300, WLH+32)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    $maps = load_data("Data/MapInfos.rvdata")
    @map_id = $game_map.map_id
    @map_name = $maps[@map_id].name
    self.contents.font.color = system_color
    self.contents.draw_text(5, -8, 280, 32, Adurna::Lieu)
    self.contents.font.color = normal_color
    self.contents.draw_text(-22, -8, 360, 32, @map_name, 1)
  end
end


class Actor_chara<Window_Base
def initialize(x, y)
    super(x, y, 200, 70)
    self.contents.clear
    for actor in $game_party.members
      draw_actor_graphic(actor,20+40*actor.index, 18+16)
    end
    end
end


Dernière édition par Adurna le Sam 25 Sep 2010 - 22:17, édité 1 fois
Black'
Black'
Membre

Nombre de messages : 351
Localisation : Far, far away
Distinction : aucune
Date d'inscription : 19/04/2010

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Mer 1 Sep 2010 - 10:39
Il me fait un peu penser à celui de YEZ... Merci du partage !
Jess
Jess
Staffeux retraité

Nombre de messages : 855
Age : 33
Localisation : Ma drums ou mon ordi !
Distinction : Dieu de Kipatord


Date d'inscription : 04/05/2008

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Mer 1 Sep 2010 - 13:42
C'est un super menu que t'as pondu là ! J'adore vraiment. Je vois pas quoi dire de plus, non vraiment c'est très bien. Ça fait plaisir de voir des bons scripteurs. J'aaiiiime les bons scripts. :p
Berka
Berka
Staffeux retraité

Nombre de messages : 1832
Age : 33
Localisation : Paris
Distinction : rubyste déglingué
9ème dan en scripting-no-jutsu

Nouveau Justine Beber ;P
Date d'inscription : 16/12/2007
http://rpgruby.olympe-network.com

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Mer 1 Sep 2010 - 13:50
Joli menu, simple mais efficace.

Juste: conventionnellement, pas d'accents sur les noms de variables: "libélé"
Peut etre que tu pourrais retirer le flou sur la map. Ca gagnerait en lisibilité et ergonomie.
Shadow-clad
Shadow-clad
Membre

Nombre de messages : 510
Age : 33
Localisation : A durbuy normal j'en suis le maire ! ^^
Distinction : Survivant ultime de Koh Lanta : Erem Vehyx 2010
[Denis Coco' Smile]
Date d'inscription : 18/06/2010
http://redmoonlight.forumgratuit.org/forum.htm

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Mer 1 Sep 2010 - 14:12
très joli menu ! l'idéal ce serait de pouvoir rajouter des commandes comme phs etc...
Anonymous
Invité
Invité

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Dim 5 Sep 2010 - 10:55
Je pense qu'il est possible de rajouter des options, sans trop de difficultés, il suffit de chercher un peu dans le script Smile
Encore une fois, encore un grand bravo à toi dudu', tu nous surprendra toujours
Autrement, maintenant que Berka le dis, je suis effectivement de son avis
Je t'ajoute encore une fois au listing
Naël
Naël
Membre

Nombre de messages : 558
Age : 27
Localisation : n.f. : repérage, dans l'espace ou dans le temps.
Distinction : aucune
Date d'inscription : 07/02/2010

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Dim 5 Sep 2010 - 11:24
Du beau boulot !
Ca nous fait un menu clair, pas surchargé, bref, super sympa !

Merci beaucoup !
I'm very Happy...
I'm very Happy...
Membre

Nombre de messages : 66
Age : 27
Localisation : Dans ton c... aie !
Distinction : aucune
Date d'inscription : 25/09/2010

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 15:39
Bon Boulot l'interface et sympa
Bonne chance pour tes prochain script
Balbereith
Balbereith
Staffeux retraité

Nombre de messages : 4129
Age : 31
Localisation : dans l'ombre...
Distinction : Péripatéticienne à temps perdu
Helly n°666 [Coco' ;D]
mon ptit balbounet p'tit jardinier en herbe(les râteaux ça le connait) [tonton Adurna]
Cultivateur professionnel de la commu' (il a de bons outils en de nombreux exemplaires encore un autre menu de Dudu' 522164 ) [Coco' Smile]
Date d'inscription : 13/05/2009

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 21:33
En effet, menu sympatoche, la simplicité est toujours de grande classe ^^
Gore33
Gore33
Membre

Nombre de messages : 189
Age : 25
Localisation : Dans un monde virtuel
Distinction : aucune
Date d'inscription : 27/10/2009

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 21:57
J'avais remarqué un bug, lorsque on manipule le menu rapidement (plusieurs touche préssé a la fois), il bug, je l'ai arrangé a ma manière ! Wink

Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  WLH = 24                  # Window Line Height
  #--------------------------------------------------------------------------
  # * Object Initialization
  #    x      : window x-coordinate
  #    y      : window y-coordinate
  #    width  : window width
  #    height : window height
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super()
    self.windowskin = Cache.system("Window")
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
    self.back_opacity = 200
    self.openness = 255
    create_contents
    @opening = false
    @closing = false
  end
  #--------------------------------------------------------------------------
  # * Create Window Contents
  #--------------------------------------------------------------------------
  def create_contents
    self.contents.dispose
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if @opening
      self.openness += 48
      @opening = false if self.openness == 255
    elsif @closing
      self.openness -= 48
      @closing = false if self.openness == 0
    end
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    @opening = true if self.openness < 255
    @closing = false
  end
  #--------------------------------------------------------------------------
  # * Close Window
  #--------------------------------------------------------------------------
  def close
    @closing = true if self.openness > 0
    @opening = false
  end
  #--------------------------------------------------------------------------
  # * Get Text Color
  #    n : Text color number  (0-31)
  #--------------------------------------------------------------------------
  def text_color(n)
    x = 64 + (n % Cool * 8
    y = 96 + (n / Cool * 8
    return windowskin.get_pixel(x, y)
  end
  #--------------------------------------------------------------------------
  # * Get Normal Text Color
  #--------------------------------------------------------------------------
  def normal_color
    return text_color(0)
  end
  #--------------------------------------------------------------------------
  # * Get System Text Color
  #--------------------------------------------------------------------------
  def system_color
    return text_color(16)
  end
  #--------------------------------------------------------------------------
  # * Get Crisis Text Color
  #--------------------------------------------------------------------------
  def crisis_color
    return text_color(17)
  end
  #--------------------------------------------------------------------------
  # * Get Knockout Text Color
  #--------------------------------------------------------------------------
  def knockout_color
    return text_color(18)
  end
  #--------------------------------------------------------------------------
  # * Get Gauge Background Color
  #--------------------------------------------------------------------------
  def gauge_back_color
    return text_color(19)
  end
  #--------------------------------------------------------------------------
  # * Get HP Gauge Color 1
  #--------------------------------------------------------------------------
  def hp_gauge_color1
    return text_color(20)
  end
  #--------------------------------------------------------------------------
  # * Get HP Gauge Color 2
  #--------------------------------------------------------------------------
  def hp_gauge_color2
    return text_color(21)
  end
  #--------------------------------------------------------------------------
  # * Get MP Gauge Color 1
  #--------------------------------------------------------------------------
  def mp_gauge_color1
    return text_color(22)
  end
  #--------------------------------------------------------------------------
  # * Get MP Gauge Color 2
  #--------------------------------------------------------------------------
  def mp_gauge_color2
    return text_color(23)
  end
  #--------------------------------------------------------------------------
  # * Get Equip Screen Power Up Color
  #--------------------------------------------------------------------------
  def power_up_color
    return text_color(24)
  end
  #--------------------------------------------------------------------------
  # * Get Equip Screen Power Down Color
  #--------------------------------------------------------------------------
  def power_down_color
    return text_color(25)
  end
  #--------------------------------------------------------------------------
  # * Draw Icon
  #    icon_index : Icon number
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    enabled    : Enabled flag. When false, draw semi-transparently.
  #--------------------------------------------------------------------------
  def draw_icon(icon_index, x, y, enabled = true)
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end
  #--------------------------------------------------------------------------
  # * Draw Face Graphic
  #    face_name  : Face graphic filename
  #    face_index : Face graphic index
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    size      : Display size
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, x, y, size = 96)
    bitmap = Cache.face(face_name)
    rect = Rect.new(0, 0, 0, 0)
    rect.x = face_index % 4 * 96 + (96 - size) / 2
    rect.y = face_index / 4 * 96 + (96 - size) / 2
    rect.width = size
    rect.height = size
    self.contents.blt(x, y, bitmap, rect)
    bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Draw Character Graphic
  #    character_name  : Character graphic filename
  #    character_index : Character graphic index
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_character(character_name, character_index, x, y)
    return if character_name == nil
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  #--------------------------------------------------------------------------
  # * Get HP Text Color
  #    actor : actor
  #--------------------------------------------------------------------------
  def hp_color(actor)
    return knockout_color if actor.hp == 0
    return crisis_color if actor.hp < actor.maxhp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # * Get MP Text Color
  #    actor : actor
  #--------------------------------------------------------------------------
  def mp_color(actor)
    return crisis_color if actor.mp < actor.maxmp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Walking Graphic
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    draw_character(actor.character_name, actor.character_index, x, y)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Face Graphic
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    size  : Display size
  #--------------------------------------------------------------------------
  def draw_actor_face(actor, x, y, size = 96)
    draw_face(actor.face_name, actor.face_index, x, y, size)
  end
  #--------------------------------------------------------------------------
  # * Draw Name
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.contents.font.color = hp_color(actor)
    self.contents.draw_text(x, y, 108, WLH, actor.name)
  end
  #--------------------------------------------------------------------------
  # * Draw Class
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 108, WLH, actor.class.name)
  end
  #--------------------------------------------------------------------------
  # * Draw Level
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 32, y, 24, WLH, actor.level, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw State
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 96)
    count = 0
    for state in actor.states
      draw_icon(state.icon_index, x + 24 * count, y)
      count += 1
      break if (24 * count > width - 24)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 120)
    draw_actor_hp_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
    self.contents.font.color = hp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.hp, 2)
    else
      self.contents.draw_text(xr - 99, y, 44, WLH, actor.hp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxhp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP gauge
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width = 120)
    gw = width * actor.hp / actor.maxhp
    gc1 = hp_gauge_color1
    gc2 = hp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Draw MP
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 120)
    draw_actor_mp_gauge(actor, x, y, width)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a)
    self.contents.font.color = mp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.mp, 2)
    else
      self.contents.draw_text(xr - 99, y, 44, WLH, actor.mp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 44, y, 44, WLH, actor.maxmp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw MP Gauge
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp_gauge(actor, x, y, width = 120)
    gw = width * actor.mp / [actor.maxmp, 1].max
    gc1 = mp_gauge_color1
    gc2 = mp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #    actor : actor
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    type  : Type of parameters (0-3)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = Vocab::atk
      parameter_value = actor.atk
    when 1
      parameter_name = Vocab::def
      parameter_value = actor.def
    when 2
      parameter_name = Vocab::spi
      parameter_value = actor.spi
    when 3
      parameter_name = Vocab::agi
      parameter_value = actor.agi
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
  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(item, x, y, enabled = true)
    if item != nil
      draw_icon(item.icon_index, x, y, enabled)
      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
  #--------------------------------------------------------------------------
  # * Draw number with currency unit
  #    value : Number (gold, etc)
  #    x    : draw spot x-coordinate
  #    y    : draw spot y-coordinate
  #    width : Width
  #--------------------------------------------------------------------------
  def draw_currency_value(value, x, y, width)
    cx = contents.text_size(Vocab::gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2)
  end
end

Voilà, bon jeu !
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 22:13
alors gore33 pourrais tu d'abord me dire avec quelle touche tu as réussi à le buger parce que j'ai tout tester et j'ai pas trouver de telle bug...
ensuite ce que tu donne comme correction que tu aurais fait n'est ni plus ni moins que le Window_base alors je ne vois pas trop ce que ça apport...

par contre je préviens de la correction d'un bug avéré cette foie si : il peut y avoir une persistance de la fenêtre d'acteur je met le script à jours de suite =) enjoy
Gore33
Gore33
Membre

Nombre de messages : 189
Age : 25
Localisation : Dans un monde virtuel
Distinction : aucune
Date d'inscription : 27/10/2009

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 22:24
Bon, je n'arrive pas a reproduire le bug car tu a changer le script !^^'
Sinon, j'avait enlevé une partie et sa ne buger plus...
Je ne me rapelle plus du nom...
Maintenant, autre problème, ton autre script bug encore plus, pas possible de lancer le jeu !
Un message d'"erreur direct...
A toi de voir Wink

EDIT :Nan, enfaite, c'est moi qui avait mal placé le script, j'ai donc pu refaire le bug, voilà :

encore un autre menu de Dudu' Bug_pr10
Et j'ai enlevé cette partie :

Code:
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    self.contents.dispose
    super
  end

Et tout aller bien !^^
Dudu'
Dudu'
Staffeux retraité

Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' Smile]
Hamsterphile de service ^^
[Balby' le Fake]
Grand prof de la MA
[Skillo]
Ce grand programmateur, mon coeur, ma vie ! [Hamu']
Date d'inscription : 22/06/2009

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

Sam 25 Sep 2010 - 22:51
bien alors quel combinaison de touche à tu utiliser ???
et en suite il ne faut en aucun cas supprimer ces ligne!!!!
on bidouille pas les script quand on sais pas...
Contenu sponsorisé

encore un autre menu de Dudu' Empty Re: encore un autre menu de Dudu'

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