Startseite »
Forum »
RPG-Studio.org - Community »
Community-Forum »
Öffentliches Archiv »
RGSS »
Menüs »
Ich glaub hier muss mal ein großes Schild aufgestellt werden, wo drauf steht, dass die Skripte nicht mehr gehen, wegen den Forum umstellung. ._.
und
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
#===================================# #Very Easy and Editable Menu by Xk8 # #===================================# class Scene_Menu #'#...'comments mean: 'see above' def initialize(menu_index = 0) @menu_index = menu_index end def main @spriteset = Spriteset_Map.new #shows the map behind the menu s1 = "Item" #s1 - s8 are the names of the commands in the menu s2 = "Skill" s3 = "Equip" s4 = "Status" s5 = "Save" s6 = "Gold" s7 = "Playtime" s8 = "End Game" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8]) #this #line draws the commands in the command window (s1 = 0) @command_window.index = @menu_index @command_window.back_opacity = 160 #this line makes the menu 'see-through' if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end if $game_system.save_disabled #this line controls the save-game ability @command_window.disable_item(4) end #the functions of each command are further below the script #playtime window is drawn @playtime_window = Window_PlayTime.new @playtime_window.x = 160 #x pos of the playtime window @playtime_window.y = 208 #y pos of the playtime window @playtime_window.back_opacity = 160 #makes the window see-through @playtime_window.visible = false #the window is invisible until called #goldwindow is drawn @gold_window = Window_Gold.new @gold_window.x = 160 #x pos of the gold window @gold_window.y = 176 #y pos of the gold window @gold_window.back_opacity = 160 #makes the window see-through @gold_window.visible = false #makes the window invisible until called #drawing the status window (Window_NewMenuStatus); the window where you select #a character to view it's stats or skills or whatever @status_window = Window_NewMenuStatus.new #defines what window to draw @status_window.x = 160 #x pos of the status window @status_window.y = 0 #default y pos of the status window @status_window.back_opacity = 160 #makes the window see-through @status_window.visible = false #makes the window invisible until called Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze #these lines delete the windows after pressing 'B' to exit the menu @command_window.dispose @playtime_window.dispose @gold_window.dispose @status_window.dispose @spriteset.dispose end def update #these lines update the various active windows in the menu @command_window.update @playtime_window.update @gold_window.update @status_window.update if @command_window.active #this line see if the command window is active update_command #looks up which definition of functions is used for this window return end if @status_window.active #... update_status #... return end if @gold_window.active #... update_status #... return end if @playtime_window.active #... update_status #... return end end def update_command #the definitions of the menu commands if Input.trigger?(Input::B) #press B in menu to exit the menu $game_system.se_play($data_system.cancel_se) #plays a sound effect $scene = Scene_Map.new #exit the menu and go back to the game return end if Input.trigger?(Input::C) #press confirm if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 #item (first command always starts with 0) $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 #skill further comments are at the bottom of the page $game_system.se_play($data_system.decision_se) @command_window.active = false #make the command window inactive (no control) @status_window.visible = true #make the status window visible @status_window.active = true #makes the status window active (control) @status_window.index = 0 #the start position of the status window @status_window.y = 48 #the y pos of the status window for THIS option when 2 #Equipment further comments are at the bottom of the page $game_system.se_play($data_system.decision_se) @command_window.active = false #... @status_window.visible = true #... @status_window.active = true #... @status_window.index = 0 #... @status_window.y = 80 #... when 3 #Status further comments are at the bottom of the page $game_system.se_play($data_system.decision_se) @command_window.active = false #... @status_window.visible = true #... @status_window.active = true #... @status_window.index = 0 #... @status_window.y = 112 #... when 4 #Save if $game_system.save_disabled #checks if saving is enabled or not $game_system.se_play($data_system.buzzer_se) #saving disabled return end $game_system.se_play($data_system.decision_se) #saving enabled $scene = Scene_Save.new #save game screen when 5 #Gold $game_system.se_play($data_system.decision_se) @command_window.active = false #... @gold_window.visible = true #makes gold window visible when 6 #Playtime $game_system.se_play($data_system.decision_se) @command_window.active = false #... @playtime_window.visible = true #... when 7 #Quit $game_system.se_play($data_system.decision_se) $scene = Scene_End.new #quits the game end return end end def update_status if Input.trigger?(Input::B) #when pressing 'B', control of the command window #is regained and the other window's 'dissappear' until called again $game_system.se_play($data_system.cancel_se) @command_window.active = true @gold_window.visible = false @playtime_window.visible = false @status_window.active = false @status_window.visible = false @status_window.index = -1 return end if Input.trigger?(Input::C) #what happens when 'C' is pressed in the first 3 options of the menu #'Skill' 'Equip' 'Status' case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end |
und
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
#===================================# #Very Easy and Editable Menu by Xk8 # #===================================# #(edited from Zieg's ringmenu) #all the important things are commented, meaning, if you want to edit, edit the #commented lines, as they are the ones that matter..sorta.. # -Xk8 class Window_NewMenuStatus < Window_Selectable def initialize super(204, 64, 160, 240) #x, y, width, height of the char select window self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.index = -1 end def refresh self.contents.clear self.contents.font.name = $fontface #fontname for the names displaying #'$fontface' is defined in 'Main', for a different font, 'fontname' e.g. 'Arial' @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 80 #x pos. of the hero's info y = 50 * i #y pos. for each hero's info actor = $game_party.actors[i] draw_actor_face(actor, x - 72, y + 37) #where the character graphic is drawn draw_actor_name(actor, x - 20, y + 1) #where the hero's name is drawn end end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 50, self.width - 34, 38) end end def draw_actor_face(actor, x, y) #definition of the character graphic bitmap = RPG::Cache.character(actor.character_name, actor.character_hue) cw = bitmap.rect.width / 4 ch = bitmap.rect.height / 4 src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 23, y - ch, bitmap, src_rect) end end |
Hey Markusmks,
Tolles Menu-Skript, Respekt. Es ist genau so eins wie ich es brauche.
Allerdings will ich es ein wenig editieren und brauche dabei deine Hilfe:
Ich möchte das die "Skills" und "Equip" aufgerufen werden, wenn ich im "Status" eine bestimmte Taste drücke(am besten die rechte Navigationstaste)
Wär toll wenn du mir sagen würdest wie das geht
MFG
Drafeirha
Tolles Menu-Skript, Respekt. Es ist genau so eins wie ich es brauche.
Allerdings will ich es ein wenig editieren und brauche dabei deine Hilfe:
Ich möchte das die "Skills" und "Equip" aufgerufen werden, wenn ich im "Status" eine bestimmte Taste drücke(am besten die rechte Navigationstaste)
Wär toll wenn du mir sagen würdest wie das geht
MFG
Drafeirha
---drafeirha---

Greetz an Special Thx: Emixp, Eddi, Geo, Rabu, Lelli, Eddi, Ryo Sakura, GruSy, Sasuke und natürlich alle Mods und Admins die so wunderbar auf das Forum hier aufpassen.