CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#==========================*Law's Custom Name Screen*==========================
#=============================Author: The Law G14 =============================
#=================================Version 1.0==================================
#==============================================================================
#------------------------------------------------------------------------------
#==============================================================================
# ** Window_NameInput
#------------------------------------------------------------------------------
# This window is used to select text characters on the input name screen.
#==============================================================================
class Window_NameInput < Window_Base
CHARACTER_TABLE =
[
"A","B","C","D","E",
"F","G","H","I","J",
"K","L","M","N","O",
"P","Q","R","S","T",
"U","V","W","X","Y",
"Z","é","è","à","ô",
"+","-","*","/","!",
"1","2","3","4","5",
"%","@","&","{" ,"}" ,
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
"p","q","r","s","t",
"u","v","w","x","y",
"z"," "," "," "," ",
"#","$","%","&","@",
"6","7","8","9","0",
"^","$","#","~","|"
]
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Actor Face Graphic
#--------------------------------------------------------------------------
def draw_actor_face_graphic(actor, x, y)
bitmap = RPG::Cache.picture(actor.id.to_s)
self.contents.blt(x, y, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
end
end
#==============================================================================
# ** Window_NameEdit
#------------------------------------------------------------------------------
# This window is used to edit your name on the input name screen.
#==============================================================================
class Window_NameEdit < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw name
name_array = @name.split(//)
for i in 0...@max_char
c = name_array[i]
if c == nil
c = "_"
end
x = 320 - @max_char * 14 + i * 28
self.contents.draw_text(x, 32, 28, 32, c, 1)
end
# Draw graphic
draw_actor_face_graphic(@actor, 250 - @max_char * 14 - 40, 0)
end
end