المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : RMVX SCRIPT سكربت وضع أيقونات على Menu



ابداعاتي
21-07-2008, 08:36 PM
السلام عليكم ورحمة الله وبركاته


سكربت وضع أيقونات بجانب Menu


من تصميمي


النسخة V1.0


Screen Shot
http://montada.com/attachment.php?attachmentid=305314&stc=1&d=1216661654


شرح التركيب


ضع هذا السكربت فوق Main

#==============================================================================
# ** Window_IconCommand
#------------------------------------------------------------------------------
# This Script will help you to put menu icon
# The development by Vincent OR Ebda3ate
# For montada.com
#==============================================================================
class Window_IconCommand < Window_Selectable
attr_reader :commands # command
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
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


واستبدل Scene_Menu


بهذا


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
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
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = [144,Vocab::item]
s2 = [135,Vocab::skill]
s3 = [40,Vocab::equip]
s4 = [137,Vocab::status]
s5 = [133,Vocab::save]
s6 = [136,Vocab::game_end]
@command_window = Window_IconCommand.new (160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
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
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # 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
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
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




آآآمل انه يفيدكم

والله يخلي درس Calmkiller

الي خلاني أطور نفسي أكثر وأكثر في هذي اللغة الجميلة

amegaara
21-07-2008, 08:44 PM
والله تطور ملحوظ في المنتدى كنا نجيب سكربتات من مواقع تانية دحين احنا بنسوي سكربتات و إنشاء الله في المستقبل المواقع الامريكية و اليابانية تنقل سكربتاتنا لمواقعهم

CalmKiller
22-07-2008, 12:21 AM
شكرا لك اخي ارى ان السكربت حلو جدا
و لكن يفضل انك تحط ديمو مع السكربت للعرض
و يفضل ان التعليقات على السكربت تكون عربي نظرا لمنشأ السكربت
و اشكرك على دعمي.

ابداعاتي
22-07-2008, 02:14 PM
تسلمون على ردودكم الحلوة


:D

هذا رابط الديمو


http://www.mediafire.com/?tjetxetjmui

Karim Ghazal
22-07-2008, 09:17 PM
بدييييييييييييع , جداً رائع هذ االسكربت , مع أنني لن أستعمله لانه أستعمل سكربت اخر

للعبتي .. ألف شكر , راح يستفاد منه الاخرين ..

gameFan99
13-11-2008, 08:15 PM
لاااااااااااااااااااااااااا

حطيته و ما يشغلي اللعبة حتا!!!