- Dudu'Staffeux retraité
- Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' ]
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
[résolu]probleme dans mon script de menu
Dim 20 Déc 2009 - 20:18
Bonjour ou bonsoir voir bonne nuit
bon bah voila j'ai commencé un joli ptit script de menu que j'ai poster sur la comun' mais j'ai un ptit problème que voici:
quand je sélectionne "compétence"
le menu de sélection actor s'affiche
on sélectionne le perso (jusque là pas de problème!!!)
la le menu compétence s'affiche mais patatra le menu de sélection actor reste affiché par dessus pas actif mais affiché ce qui fait que l'on ne vois pas la compétence que l'on veux sélectionné
screen:
et mon script:
Merci d'avance à ce qui se pencherons sur mon problème en espérant que l'on pour résoudre ce ptit problème un peut embêtent!!!
cordialement adurna
bon bah voila j'ai commencé un joli ptit script de menu que j'ai poster sur la comun' mais j'ai un ptit problème que voici:
quand je sélectionne "compétence"
le menu de sélection actor s'affiche
on sélectionne le perso (jusque là pas de problème!!!)
la le menu compétence s'affiche mais patatra le menu de sélection actor reste affiché par dessus pas actif mais affiché ce qui fait que l'on ne vois pas la compétence que l'on veux sélectionné
screen:
et mon script:
- Code:
#=================================================================#
# By Adurna 12/12/09 maj:16/12/09 #
# menu option plus version 0.5 #
#=================================================================#
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
module Adurna
Obj = "Objet"
Comp = "Compétence"
Equip = "Équiper"
Stat = "Statut"
Sov = "Sauvegarder"
Char = "Charger"
Fin = "Quitter"
Affiche_Icon=1 #pas encore utiliser
Icon_Or=147
Icon_Loc=153
Icon_Obj=144
Icon_Comp=128
Icon_Equip=32
Icon_Stat=118
Icon_Sov=176
Icon_Char=177
Icon_Fin=117
end
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@location_window = Window_location.new(0, 240)
# @icon_window=Window_icon.new(0,0)
@status_window=0
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@location_window.dispose
# @icon_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def icon_item
self.contents.clear
#if Adurna::Affiche_Icon >0
draw_icon(Adurna::Icon_Obj, 2, 3, true)
# end
end
def create_command_window
s1 = [Adurna::Icon_Obj, Adurna::Obj]
s2 = [Adurna::Icon_Comp, Adurna::Comp]
s3 = [Adurna::Icon_Equip, Adurna::Equip]
s4 = [Adurna::Icon_Stat, Adurna::Stat]
s5 = [Adurna::Icon_Sov, Adurna::Sov]
s6 = [Adurna::Icon_Char, Adurna::Char]
s7= [Adurna::Icon_Fin, Adurna::Fin]
# @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])
@command_window = Window_IconCommand.new(172, [s1, s2, s3, s4, s5, s6,s7])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4,false) # Disable save
end
if Dir.glob('Save*.rvdata').size <=0
@command_window.draw_item(5,false)
end
if Adurna::Affiche_Icon >0
#draw_icon(Adurna::Icon_Odj,2, 3, true)
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
@status_window=Window_MenuStatus.new(160, 0)
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5
$scene = Scene_File.new(false, false, false)
when 6 # End Game
$scene = Scene_End.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
@status_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
class Window_location < Window_Base
def initialize(x, y)
super(x, y, 300, (WLH*2) + 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(0, -4, 128, 32, "Location :")
self.contents.font.color = normal_color
self.contents.draw_text(0, -4+WLH, 128, 32, @map_name, 1)
draw_icon(Adurna::Icon_Loc,0, WLH, true)
self.contents.font.color = system_color
self.contents.draw_text(125, -4, 128, 32, Vocab::gold,1)
self.contents.font.color = normal_color
self.contents.draw_text(125, -10+WLH, 140, 42, $game_party.gold, 1)
draw_icon(Adurna::Icon_Or,235, WLH, true)
end
end
class Window_IconCommand < Window_Selectable
def initialize(width, commands, column_max = 1, row_max = 7, spacing = 20)
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
refresh
self.index = 0
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
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
def draw_item_name(index, x, y,enabled = true)
draw_icon(index, x, y, enabled)
end
end
Merci d'avance à ce qui se pencherons sur mon problème en espérant que l'on pour résoudre ce ptit problème un peut embêtent!!!
cordialement adurna
- Dudu'Staffeux retraité
- Nombre de messages : 2060
Age : 33
Distinction : Apprenti KGB-boy en avenir
[Coco' ]
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
Re: [résolu]probleme dans mon script de menu
Dim 20 Déc 2009 - 22:31
merci sha marche
- kordarrModérateur
- Nombre de messages : 1838
Age : 33
Localisation : île de la réunion, Le Tampon.
Distinction : Auto-proclamé sex-symbol de la commu'
Frère jumeau de Jonathan ( Secret Story )
Exhibitionniste en herbe
[Mist' & Coco' ]
Fan n°1 de Coco'
Psychopathe en chef
Date d'inscription : 05/11/2008
Re: [résolu]probleme dans mon script de menu
Mar 22 Déc 2009 - 11:38
Mettez [résolu] dans les titres de vos topics résolu, à partir de maintenant c'est un avertissement si cette règles est oublié.
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|