RickardB 0 Posted June 4, 2014 Hello, I was playtesting my game and experimentating with the Name input processing event And i discovered that there was no backspace button in the LATIN01-02 alphabet. I dugged a bit deeper in the code to look for some evidence of a backspace button existing(if i had accidentaly deleted that character) And i found this: #-------------------------------------------------------------------------- # * Go Back One Character #-------------------------------------------------------------------------- def process_back Sound.play_cancel if @edit_window.back Does that mean there is a backspace button? is there anyway to assign it to a letter if it works in that way? -Many thanks in advance! (I apologize if i have any Spelling mistakes, English is not my native language) Share this post Link to post Share on other sites
Galv 1,387 Posted June 4, 2014 Moved to Ruby School for Thought Share this post Link to post Share on other sites
Tsarmina 2,612 Posted June 5, 2014 Yeah, that puzzled me for a long time. Esc should work, and I suppose that if it does X should also work, though I've never tried using the latter myself. Share this post Link to post Share on other sites
Gambit. 84 Posted June 5, 2014 Here's a simple script I just wrote that changes the space on the first page of characters to a backspace button. The space on the second page will still be a space. #============================================================================== # ** Window_NameInput #------------------------------------------------------------------------------ # This window is used to select text characters on the name input screen. #============================================================================== class Window_NameInput < Window_Selectable #-------------------------------------------------------------------------- # * Character Tables (Latin) #-------------------------------------------------------------------------- LATIN1 = [ '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', '(',')','*','+','-', '/','=','@','<','>', ':',';','â†','Page','OK'] #-------------------------------------------------------------------------- # * Get Text Character #-------------------------------------------------------------------------- def character !is_backspace? && @index < 88 ? table[@page][@index] : "" end #-------------------------------------------------------------------------- # * Determine Cursor Location: Backspace #-------------------------------------------------------------------------- def is_backspace? @index == 87 && @page == 0 end #-------------------------------------------------------------------------- # * Processing When OK Button Is Pressed #-------------------------------------------------------------------------- def process_ok if !character.empty? on_name_add elsif is_backspace? process_back elsif is_page_change? Sound.play_ok cursor_pagedown elsif is_ok? on_name_ok end end end Share this post Link to post Share on other sites
RickardB 0 Posted June 5, 2014 Thank you very much for your answers! This question is now solved! Share this post Link to post Share on other sites
TheoAllen 830 Posted June 5, 2014 ~ Closed since solved ~ Share this post Link to post Share on other sites