Shepher Admin
Número de Mensagens : 87 Idade : 28
| Assunto: [RGSS]Ícones para Comandos Seg maio 31, 2010 6:28 pm | |
| Ícones para Comandospor Atoa
Introdução Este script simples adiciona ícones para as janelas de New Game, Menu, Batalha, End Game e Loja. Eu fiz algumas modificações para que fosse possível deixar alguns comandos sem ícones (no script original, se algum comando estivesse sem ícone o jogo dava erro e fechava) Características • Adiciona ícones aos comandos ScreenshotsComo usarPara instalá-lo, apenas cole o script acima do main. Os ícones devem estar na pasta ícones do seu jogo e devem ter o mesmo nome dos comandos + "_ic" Exemplo: O comando ataque deve ter um icone chamado "Ataque_ic" DemoNão necessária. Script- Spoiler:
- Código:
-
#============================================================================== # Ícones para Comandos # por Atoa #============================================================================== =begin Este script simples adiciona ícones para as janelas de New Game, Menu, Batalha, End Game e Loja.
Os ícones devem estar na pasta ícones do seu jogo e devem ter o mesmo nome dos comandos.
=end
#============================================================================== # Window_Command #============================================================================== class Window_Command < Window_Selectable #-------------------------------------------------------------------------- def draw_item(index, color) begin bitmap = RPG::Cache.icon(@commands[index] + "_ic") opacity = color == normal_color ? 255 : 128 self.contents.blt(4, 32 * index + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.font.color = color rect = Rect.new(32, 32 * index, self.contents.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) rescue self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end end end
#============================================================================== # Window_ShopCommand #============================================================================== class Window_ShopCommand < Window_Selectable #-------------------------------------------------------------------------- def draw_item(index) begin bitmap = RPG::Cache.icon(@commands[index] + "_ic") x = 32 + index * 160 self.contents.blt(x - 28, 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x, 0, 128, 32, @commands[index]) rescue x = 4 + index * 160 self.contents.draw_text(x, 0, 128, 32, @commands[index]) end end end
#============================================================================== # Window_PartyCommand #============================================================================== class Window_PartyCommand < Window_Selectable #-------------------------------------------------------------------------- def draw_item(index, color) begin bitmap = RPG::Cache.icon(@commands[index] + "_ic") self.contents.blt(184 + index * 160 + 4 , 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.font.color = color rect = Rect.new(184 + index * 160 + 32, 0, 118, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index], 0) rescue self.contents.font.color = color rect = Rect.new(160 + index * 160 + 4, 0, 118, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index], 1) end end end
#============================================================================== # Window_Command #============================================================================== class Window_Command_IBC < Window_Selectable #-------------------------------------------------------------------------- def draw_item(index, color) begin bitmap = RPG::Cache.icon(@commands[index] + "_ic") opacity = color == normal_color ? 255 : 128 self.contents.blt(4, 32 * index + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.font.color = color rect = Rect.new(32, 32 * index, self.contents.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) rescue self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end end end
Perguntas FrequentesNenhuma Pergunta Frequente Créditos e Agradecimentos• Feito por Atoa
•Disponibilizado aqui por Shepher | |
|