| [ask] cara customize title menu | |
|
|
Pengirim | Message |
---|
baszto Advance
Posts : 317 Thanked : 2
| Subyek: [ask] cara customize title menu 2012-01-02, 14:20 | |
| kk ad yg bisa jelasin ke saya gak gman carany bkin windownya jadi agak keatas? soalnya seperti gambar diatas jadi agak kpotong gitu nih scriptnya kk klo dbutuhkan... - Code:
-
#============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs the title screen processing. #==============================================================================
class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main if $BTEST # If battle test battle_test # Start battle test else # If normal play super # Usual main processing end end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super load_database # Load database create_game_objects # Create game objects check_continue # Determine if continue is enabled create_title_graphic # Create title graphic create_command_window # Create command window play_title_music # Play title screen music end #-------------------------------------------------------------------------- # * Execute Transition #-------------------------------------------------------------------------- def perform_transition Graphics.transition(20) end #-------------------------------------------------------------------------- # * Post-Start Processing #-------------------------------------------------------------------------- def post_start super open_command_window end #-------------------------------------------------------------------------- # * Pre-termination Processing #-------------------------------------------------------------------------- def pre_terminate super close_command_window end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_command_window snapshot_for_background dispose_title_graphic end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 #New game command_new_game when 1 # Continue command_continue when 2 # Shutdown command_help when 3 command_credit when 4 command_shutdown end end end #-------------------------------------------------------------------------- # * Load Database #-------------------------------------------------------------------------- def load_database $data_actors = load_data("Data/Actors.rvdata") $data_classes = load_data("Data/Classes.rvdata") $data_skills = load_data("Data/Skills.rvdata") $data_items = load_data("Data/Items.rvdata") $data_weapons = load_data("Data/Weapons.rvdata") $data_armors = load_data("Data/Armors.rvdata") $data_enemies = load_data("Data/Enemies.rvdata") $data_troops = load_data("Data/Troops.rvdata") $data_states = load_data("Data/States.rvdata") $data_animations = load_data("Data/Animations.rvdata") $data_common_events = load_data("Data/CommonEvents.rvdata") $data_system = load_data("Data/System.rvdata") $data_areas = load_data("Data/Areas.rvdata") end #-------------------------------------------------------------------------- # * Load Battle Test Database #-------------------------------------------------------------------------- def load_bt_database $data_actors = load_data("Data/BT_Actors.rvdata") $data_classes = load_data("Data/BT_Classes.rvdata") $data_skills = load_data("Data/BT_Skills.rvdata") $data_items = load_data("Data/BT_Items.rvdata") $data_weapons = load_data("Data/BT_Weapons.rvdata") $data_armors = load_data("Data/BT_Armors.rvdata") $data_enemies = load_data("Data/BT_Enemies.rvdata") $data_troops = load_data("Data/BT_Troops.rvdata") $data_states = load_data("Data/BT_States.rvdata") $data_animations = load_data("Data/BT_Animations.rvdata") $data_common_events = load_data("Data/BT_CommonEvents.rvdata") $data_system = load_data("Data/BT_System.rvdata") end #-------------------------------------------------------------------------- # * Create Game Objects #-------------------------------------------------------------------------- def create_game_objects $game_temp = Game_Temp.new $game_message = Game_Message.new $game_system = Game_System.new $game_switches = Game_Switches.new $game_variables = Game_Variables.new $game_self_switches = Game_SelfSwitches.new $game_actors = Game_Actors.new $game_party = Game_Party.new $game_troop = Game_Troop.new $game_map = Game_Map.new $game_player = Game_Player.new end #-------------------------------------------------------------------------- # * Determine if Continue is Enabled #-------------------------------------------------------------------------- def check_continue @continue_enabled = (Dir.glob('Save*.rvdata').size > 0) end #-------------------------------------------------------------------------- # * Create Title Graphic #-------------------------------------------------------------------------- def create_title_graphic @sprite = Sprite.new @sprite.bitmap = Cache.system("Title") end #-------------------------------------------------------------------------- # * Dispose of Title Graphic #-------------------------------------------------------------------------- def dispose_title_graphic @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::new_game s2 = Vocab::continue s3 = 'Help' s4 = 'Credit' s5 = 'Exit' @command_window = Window_Command.new(172, [s1, s2, s3, s4, s5]) @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 #-------------------------------------------------------------------------- # * Dispose of Command Window #-------------------------------------------------------------------------- def dispose_command_window @command_window.dispose end #-------------------------------------------------------------------------- # * Open Command Window #-------------------------------------------------------------------------- def open_command_window @command_window.open begin @command_window.update Graphics.update end until @command_window.openness == 255 end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close begin @command_window.update Graphics.update end until @command_window.openness == 0 end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop end #-------------------------------------------------------------------------- # * Check Player Start Location Existence #-------------------------------------------------------------------------- def confirm_player_location if $data_system.start_map_id == 0 print "Player start location not set." exit end end #-------------------------------------------------------------------------- # * Command: New Game #-------------------------------------------------------------------------- def command_new_game confirm_player_location Sound.play_decision $game_party.setup_starting_members # Initial party $game_map.setup($data_system.start_map_id) # Initial map position $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.refresh $scene = Scene_Map.new RPG::BGM.fade(1500) close_command_window Graphics.fadeout(60) Graphics.wait(40) Graphics.frame_count = 0 RPG::BGM.stop $game_map.autoplay end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue if @continue_enabled Sound.play_decision $scene = Scene_File.new(false, true, false) else Sound.play_buzzer end end #-------------------------------------------------------------------------- # * Command: Shutdown #-------------------------------------------------------------------------- def command_shutdown Sound.play_decision RPG::BGM.fade(800) RPG::BGS.fade(800) RPG::ME.fade(800) $scene = nil end #-------------------------------------------------------------------------- # * Command: Credit #-------------------------------------------------------------------------- def command_credit $scene = Scene_Credits.new end #-------------------------------------------------------------------------- # * Command: Credit #-------------------------------------------------------------------------- def command_help $scene = Scene_Help.new end #-------------------------------------------------------------------------- # * Battle Test #-------------------------------------------------------------------------- def battle_test load_bt_database # Load battle test database create_game_objects # Create game objects Graphics.frame_count = 0 # Initialize play time $game_party.setup_battle_test_members $game_troop.setup($data_system.test_troop_id) $game_troop.can_escape = true $game_system.battle_bgm.play snapshot_for_background $scene = Scene_Battle.new end end
trus saya mw tanya lagi., klo cara ngilangin window gmana? cara ngerubah font gmana? cara ngerubah font size? cara ngerubah warna? mungkin segtu dlu prtanyaan saya. sori kalo kbanyakan thx | |
|
| |
Nefusa 7 Senior
Posts : 954 Thanked : 6 Engine : RMXP Skill : Intermediate Type : Scripter
| Subyek: Re: [ask] cara customize title menu 2012-01-02, 14:27 | |
| kalau mau bikin windownya keatas edit ini - Code:
-
@command_window.y = 288 di kurangin angkanya biar jadi keatas . . - Quote :
- cara ngerubah font gmana?
emang font yang mana yang mau dirubah? - Quote :
- cara ngerubah warna?
warna apa yang dirubah? | |
|
| |
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Trophies
Awards:
| Subyek: Re: [ask] cara customize title menu 2012-01-02, 14:32 | |
| Beuh... Oke, saya jawab 1-1... 1. Ke Scene_Title, cari def create_command_window, lalu cari yang bagian : @command_window.y = 288, ganti 288 menjadi nilai yang dinginkan. Makin kecil nilai, makin naik. Begitu sebaliknya 2. Hilangin window apa? 3,4 : Ke Main lalu tambahkan kode ini setelah kata Graphics.freeze: - Code:
-
Font.default_name = "NAME" Font.default_size = SIZE Ganti NAME menjadi font yang diinginkan dan ganti SIZE menjadi ukuran yang diinginkan. Cek : https://rmid.forumotion.net/t3963-tips-vx-problem-in-changing-font <- Kalo ada masalah kayak kepotong textnya. 5. Warna apa? | |
|
| |
DrDhoom Doomed Zombie
Posts : 629 Thanked : 22 Engine : Multi-Engine User Skill : Intermediate Type : Scripter
| Subyek: Re: [ask] cara customize title menu 2012-01-02, 14:37 | |
| cari nama window yang mau di naikin, misal : - Code:
-
@status_window trus ubah properties y nya, contoh: - Code:
-
@status_window.y = 201 kalo mau ngilangin, sperti ini. contoh: - Code:
-
@status_window.visible = false kalo mau munculin lagi, tinggal ganti jadi true ini font yang mana ya? kalo global: ganti font default: - Code:
-
Font.default_name = ["Myriad", "Verdana"] ganti ukuran default font: - Code:
-
Font.default_size = 89 ganti warna default font: - Code:
-
Font.default_color = Color.new(R,G,B,Alpha) | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-02, 14:42 | |
| - Nufus27 wrote:
- kalau mau bikin windownya keatas edit ini
- Code:
-
@command_window.y = 288 di kurangin angkanya biar jadi keatas . . - Quote :
- cara ngerubah font gmana?
emang font yang mana yang mau dirubah?
- Quote :
- cara ngerubah warna?
warna apa yang dirubah? wah thx kk nufus udah bisa dikeatasin warna tlisan di title menu font tulisan di titlemenu - LowlingLife wrote:
- Beuh... Oke, saya jawab 1-1...
1. Ke Scene_Title, cari def create_command_window, lalu cari yang bagian : @command_window.y = 288, ganti 288 menjadi nilai yang dinginkan. Makin kecil nilai, makin naik. Begitu sebaliknya
2. Hilangin window apa?
3,4 : Ke Main lalu tambahkan kode ini setelah kata Graphics.freeze: - Code:
-
Font.default_name = "NAME" Font.default_size = SIZE Ganti NAME menjadi font yang diinginkan dan ganti SIZE menjadi ukuran yang diinginkan.
Cek : https://rmid.forumotion.net/t3963-tips-vx-problem-in-changing-font <- Kalo ada masalah kayak kepotong textnya.
5. Warna apa? 1. sip udah bisa kk 2. hilangin window title menu/kotak yg mengelilingi tlisan new game, continue,dll 3,4.dcoba dlu deh 5.warna tlisan titlemenu okedeh saya cek lgsung ke linkny thx bgt kk @drdhoom okedeh om sya cba dlu thx
Terakhir diubah oleh baszto tanggal 2012-01-02, 14:44, total 2 kali diubah (Reason for editing : udah ada post bru :D) | |
|
| |
Nefusa 7 Senior
Posts : 954 Thanked : 6 Engine : RMXP Skill : Intermediate Type : Scripter
| Subyek: Re: [ask] cara customize title menu 2012-01-02, 15:13 | |
| - Quote :
- hilangin window title menu/
kotak yg mengelilingi tlisan new game, continue,dll tambahin - Code:
-
@command_window.opacity = 0 dibawah - Code:
-
@command_window.y = 288 | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-04, 23:22 | |
| @om nufus wah bsa om crany thx bgt nih
nah skrg saya mw nanya lagi gmana carany ganti font n warna tlisan di title menu (new game,continue,etc)? skalian ksh tw tmpatny.. thx | |
|
| |
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Trophies
Awards:
| Subyek: Re: [ask] cara customize title menu 2012-01-05, 19:11 | |
| @ om bas : http://rpgmaker.net/tutorials/454/ | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-05, 20:10 | |
| @^^ maaf om disitu cuma ada font (worked) doang tpi kurang font size n font color mohon solusinya... thx | |
|
| |
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Trophies
Awards:
| Subyek: Re: [ask] cara customize title menu 2012-01-05, 20:18 | |
| Sorry, tadi buru-buru dan males... kan kalo tadi cuma font namenya itu : - Code:
-
@command_window.contents.font.name = FONT_NAME Kalo mau size dan color, tinggal paste : - Code:
-
@command_window.contents.font.color = Color @command_window.contents.font.size = Size Ganti Color dan Size sesuai keinginan... | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-06, 21:18 | |
| @om lowl saya kan udh nbhin ini - Quote :
- @command_window.contents.font.name = FONT_NAME
@command_window.contents.font.color = FONT_COLOR @command_window.contents.font.size = FONT_SIZE dan ini diatas class scene_title - Quote :
- FONT_NAME = "Algerian"
FONT_COLOR = Color.new(32,144,76,20) #r,g,b FONT_SIZE = 35 tapi kok warnanya gak brubah cuma sizenya aja yg brubah ni ssnya itu tulisanya jadi merapat gitu dan mnimbulkan pertanyaan baru utk saya gmana caranya utk ngatur jarak antar tulisan2 itu? maaf klo gak kelar2 thx | |
|
| |
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Trophies
Awards:
| Subyek: Re: [ask] cara customize title menu 2012-01-06, 21:26 | |
| @ om baszto : coba taruh yang kode-kode tadi di atas di def create_command_window. Terus coba nge-define FONT_COLOR, dll juga didalam def create_command_window.
Untuk mengatur jarak, ganti WLH di Window_Base. | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-06, 22:15 | |
| @om lowl wa ttp kagak bisa saya jadi bingung cuma size sama font doang bisanya thx | |
|
| |
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Trophies
Awards:
| Subyek: Re: [ask] cara customize title menu 2012-01-06, 22:20 | |
| Beuh.... Saya juga bingung nih... Coba ya saya buat snippet dulu... | |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-06, 22:34 | |
| okedeh om saya tunggu ya... thx banget nih | |
|
| |
DrDhoom Doomed Zombie
Posts : 629 Thanked : 22 Engine : Multi-Engine User Skill : Intermediate Type : Scripter
| Subyek: Re: [ask] cara customize title menu 2012-01-08, 16:32 | |
| Untuk ganti warna font nya, ganti di Window_Command pada def draw_item tapi, biar class lain yg juga make Window ini ga keganti, lebih baik bikin def baru lagi masukin script ini di Window_Command paling bawah sebelum end, - Code:
-
def refresh_menu self.contents.clear for i in 0...@item_max draw_item_menu(i) end end
def draw_item_menu(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = Color.new(0,0,0) #Ganti ini untuk merubah warna self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(rect, @commands[index]) end
trus pada Scene_Title, ganti def create_command_window jadi gini - Code:
-
def create_command_window s1 = Vocab::new_game s2 = Vocab::continue s3 = Vocab::shutdown @command_window = Window_Command.new(172, [s1, s2, s3]) @command_window.refresh_menu @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
| |
|
| |
baszto Advance
Posts : 317 Thanked : 2
| Subyek: Re: [ask] cara customize title menu 2012-01-08, 16:45 | |
| @doom wokeh,, udah bisa om THX bgt buat yg udah bantuin Topic Solved | |
|
| |
Sponsored content
| Subyek: Re: [ask] cara customize title menu | |
| |
|
| |
| [ask] cara customize title menu | |
|