Jump to content
Rpg²S Forum

MSX - Name Input


Melosx
 Share

Recommended Posts

MSX - Name Input

 

 

Descrizione

Modifica la schermata di inserimento del nome eroe.

Autore

Melosx

 

Screenshot

http://i47.tinypic.com/21suvb.png

 

 

Istruzioni per l'uso

Copiare sotto materials e sopra main.

 

Script

 

 

#==============================================================================
# ** MSX - Name Input 1.0
#==============================================================================
# Author:   Melosx
# Version: 1.0
# Release Date: 25/05/2012 => v1.0
#				  
#==============================================================================
# * Instructions
# -----------------------------------------------------------------------------
# Copy this script under Materials and above Main.
#==============================================================================

#==============================================================================
# ** Window_NameEdit
#==============================================================================

class Window_NameEdit < Window_Base

 def initialize(actor, max_char)
x = 0
y = 0
super(x, y, 544, 128)
@actor = actor
@max_char = max_char
@default_name = @name = actor.name[0, @max_char]
@index = @name.size
deactivate
refresh
 end

 def char_width
text_size($game_system.japanese? ? "あ" : "A").width
 end

 def item_rect(index)
Rect.new(left + index * char_width, 68, char_width, line_height)
 end

 def underline_rect(index)
rect = item_rect(index)
rect.x += 1
rect.y += rect.height
rect.width -= 2
rect.height = 2
rect
 end

 def underline_color
color = normal_color
color.alpha = 96
color
 end

 def draw_char(index)
rect = item_rect(index)
rect.width += 4
change_color(normal_color)
draw_text(rect, @name[index] || "")
 end

 def refresh
contents.clear
draw_actor_face(@actor, 0, 0)
draw_actor_class(@actor, 156, 0)
draw_actor_level(@actor, 156, 30)
draw_actor_graphic(@actor, 116, 40)
draw_actor_hp(@actor, 306, 5, 150)
draw_actor_mp(@actor, 326, 30, 150)
@max_char.times {|i| draw_underline(i) }
@name.size.times {|i| draw_char(i) }
cursor_rect.set(item_rect(@index))
 end
end



#==============================================================================
# ** Window_NameInput
#==============================================================================

class Window_NameInput < Window_Selectable

 MSX_LATIN1 = ['A','B','C','D','E',  'a','b','c','d','e',  '0','1','2','3','4',
			'F','G','H','I','J',  'f','g','h','i','j',  '5','6','7','8','9',
			'K','L','M','N','O',  'k','l','m','n','o',  '/','=','@','<','>',
			'P','Q','R','S','T',  'p','q','r','s','t',  '(',')','*','+','-',
			'U','V','W','X','Y',  'u','v','w','x','y',  '[',']','^','_',':',
			'Z',' ',' ',' ',' ',  'z',' ',' ',' ',' ',  '{','}','|','~',';',
			' ',' ',' ',' ',' ',  ' ',' ',' ',' ',' ',  '!','#','$','%','&',
			' ',' ',' ',' ',' ',  ' ',' ',' ',' ',' ',  ' ',' ',' ',' ',' ',
			' ',' ',' ',' ',' ',  ' ',' ',' ',' ',' ',  ' ','Del','<-Pg','Pg->','OK']
		
		
		
 MSX_LATIN2 = ['Á','É','Í','Ó','Ú',  'á','é','í','ó','ú',  ' ',' ',' ',' ',' ',
			'À','È','Ì','Ò','Ù',  'à','è','ì','ò','ù',  ' ',' ',' ',' ',' ',
			'Â','Ê','Î','Ô','Û',  'â','ê','î','ô','û',  ' ',' ',' ',' ',' ',
			'Ä','Ë','Ï','Ö','Ü',  'ä','ë','ï','ö','ü',  ' ',' ',' ',' ',' ',
			'Ā','Ē','Ī','Ō','Ū',  'ā','ē','ī','ō','ū',  ' ',' ',' ',' ',' ',
			'Ã','Å','Æ','Ç','Ð',  'ã','å','æ','ç','ð',  ' ',' ',' ',' ',' ',
			'Ñ','Õ','Ø','Š','Ŵ',  'ñ','õ','ø','š','ŵ',  ' ',' ',' ',' ',' ',
			'Ý','Ŷ','Ÿ','Ž','Þ',  'ý','ÿ','ŷ','ž','þ',  ' ',' ',' ',' ',' ',
			'IJ','Œ','ij','œ','ß',  '«','»',' ',' ',' ',  ' ','Del','<-Pg','Pg->','OK']

 MSX_JAPAN1 = ['あ','い','う','え','お',  'が','ぎ','ぐ','げ','ご',  'ア','イ','ウ','エ','オ',
		   'か','き','く','け','こ',  'ざ','じ','ず','ぜ','ぞ',  'カ','キ','ク','ケ','コ',
		   'さ','し','す','せ','そ',  'だ','ぢ','づ','で','ど',  'サ','シ','ス','セ','ソ',
		   'た','ち','つ','て','と',  'ば','び','ぶ','べ','ぼ',  'タ','チ','ツ','テ','ト',
		   'な','に','ぬ','ね','の',  'ぱ','ぴ','ぷ','ぺ','ぽ',  'ナ','ニ','ヌ','ネ','ノ',
		   'は','ひ','ふ','へ','ほ',  'ぁ','ぃ','ぅ','ぇ','ぉ',  'ハ','ヒ','フ','ヘ','ホ',
		   'ま','み','む','め','も',  'っ','ゃ','ゅ','ょ','ゎ',  'マ','ミ','ム','メ','モ',
		   'や','ゆ','よ','わ','ん',  'ー','~','・','=','☆',  'ヤ','ユ','ヨ','ワ','ン',
		   'ら','り','る','れ','ろ',  'ゔ','を','ラ','リ','ル',  ' ','Del','<-Pg','Pg->','OK']



 MSX_JAPAN2 = ['ガ','ギ','グ','ゲ','ゴ',  'A','B','C','D','E',  'a','b','c','d','e',
			'ザ','ジ','ズ','ゼ','ゾ',  'F','G','H','I','J',  'f','g','h','i','j',
			'ダ','ヂ','ヅ','デ','ド',  'K','L','M','N','O',  'k','l','m','n','o',
			'バ','ビ','ブ','ベ','ボ',  'P','Q','R','S','T',  'p','q','r','s','t',
			'パ','ピ','プ','ペ','ポ',  'U','V','W','X','Y',  'u','v','w','x','y',
			'ァ','ィ','ゥ','ェ','ォ',  'Z','[',']','^','_',  'z','{','}','|','~',
			'ッ','ャ','ュ','ョ','ヮ',  '0','1','2','3','4',  '!','#','$','%','&',
			'ー','~','・','=','☆',  '5','6','7','8','9',  '(',')','*','+','-',
			'ヴ','ヲ','ロ',' ',' ',  '/','=','@','<','>',  ' ','Del','<-Pg','Pg->','OK']
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#

 def initialize(edit_window)
super(0, edit_window.y + edit_window.height, Graphics.width, Graphics.height - edit_window.height)
@edit_window = edit_window
@page = 0
@index = 0
refresh
update_cursor
activate
 end

 def table
return [MSX_LATIN1, MSX_LATIN2, MSX_JAPAN1, MSX_JAPAN2]
 end

 def character
@index < 133 ? table[@page][@index] : ""
 end

 def is_page_change?
@index == 133
 end

 def is_ok?
@index == 134
 end

 def item_rect(index)
rect = Rect.new
rect.x = index % 15 * 32 + index % 15 / 5 * 16
rect.y = index / 15 * line_height
rect.width = 32
rect.height = line_height
rect
 end

 def refresh
contents.clear
change_color(normal_color)
135.times {|i| draw_text(item_rect(i), table[@page][i], 1) }
 end

 def cursor_down(wrap)
if @index < 120 or wrap
  @index = (index + 15) % 135
end
 end

 def cursor_up(wrap)
if @index >= 15 or wrap
  @index = (index + 120) % 135
end
 end

 def cursor_right(wrap)
if @index % 15 < 14
  @index += 1
elsif wrap
  @index -= 14
end
 end

 def cursor_left(wrap)
if @index % 15 > 0
  @index -= 1
elsif wrap
  @index += 14
end
 end

 def process_jump
if @index != 134
  @index = 134
  Sound.play_cursor
end
 end

 def process_ok
if @index == 131
  process_back
elsif @index == 132
  cursor_pageup
elsif !character.empty?
  on_name_add
elsif is_page_change?
  Sound.play_ok
  cursor_pagedown
elsif is_ok?
  on_name_ok
end
 end

end

 

 

http://i.imgur.com/ROhv4te.png



287x66-white.png

Link to comment
Share on other sites

Ah bene più grandicella come schermata e completa di stat e grafica! ^ ^

Buono per imparare a mettere certe cose in determinate finestre! ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!
(> <)


Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^

http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^

http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^

REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

 

SUWOnzB.jpg 🖤
http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gif
http://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3
http://i.imgur.com/MpaUphY.jpg by Idriu E:3

Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44)

http://i.imgur.com/PgUqHPm.png
Ufficiale
"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"


http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3
Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^
http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^
http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.png
Grazie Testament XD Fan n°1 ufficiale di PQ! :D

Viva
il Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che non
avevo programmi di grafica per fare un banner su questo pc XD (ora ho di
nuovo il mio PC veramente :D)

Rosso Guardiano della
http://i.imgur.com/Os5rvhx.png

Rpg2s RPG BY FORUM:

Nome: Darth Reveal

 

PV totali 2
PA totali 16

Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.
Bozze vesti non definitive qui.

Equipaggiamento:
Indossa:
60$ e 59$ divisi in due tasche interne
Levaitan

Spada a due mani elsa lunga

Guanti del Defender (2PA)
Anello del linguaggio animale (diventato del Richiamo)

Scrinieri da lanciere (2 PA)

Elmo del Leone (5 PA)

Corazza del Leone in Ferro Corrazzato (7 PA)

ZAINO (20) contenente:
Portamonete in pelle di cinghiale contenente: 100$
Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)
Corda
Bottiglia di idromele
Forma di formaggio
Torcia (serve ad illuminare, dura tre settori)

Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)
Ampolla Bianca

Semi di Balissa

 

CAVALLO NORMALE + SELLA (30 +2 armi) contentente:
66$
Benda di pronto soccorso x3
Spada a due mani

Fagotto per Adara (fazzoletto ricamato)


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...