User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Alternative for Edit Box for player input?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Alternative for Edit Box for player input?

    I am currently using the Edit Box object to have the player write his name after a game for the leaderboard in the game. But for some reason the Edit Box seem to cause problems, for example I cant go into fullscreen if I have the Edit Box and it always stays on top, even if it is on a layer bellow an other object.

    Is there some other way for having a textbox the player can insert his name into?

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,964
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    All Window Control objects do this, List object, editboxes, listview, etc... your best bet is to write a custom editbox, or use text blitter/ the new character object to display it.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Ah ok! I created a start of a custom editbox, I have an example here.

    Before I continue though,
    It only works with the A,B and C buttons now for the example and the backspace button erases the whole string. I could go with this and it would work, but is there some event for detecting the current button the player presses and storing it in a value or string? That would be better then this way I think of having a event for every letter in the alphabet :p . Also, is there any command that could be used to erase the last letter written, instead of as it is now in my example, where if you press backspace the whole text is erased?
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Outcast View Post
    Also, is there any command that could be used to erase the last letter written, instead of as it is now in my example, where if you press backspace the whole text is erased?

    on desired event, set your string to
    Code:
    Left$(string$( "YourString" ), Len(string$( "YourString" ))-1)
    (the example refers to a string object, but it works with every kind of text/string)

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The control X object can retrieve the last key press as a string. You can use the String Parser object to convert that string (the key press) to an ASCII value. Then, if the ASCII value is between 32 and 128, you know it is one of the keyboard characters.

    To backspace the last character, set the string to: Left$(string$( "String" ), Len(string$( "String" ))-1)

    To see how either of those tasks are done, check out this example I made: http://www.create-games.com/download.asp?id=8549

    The example is for an Array Inventory Editor but the editor itself uses those two methods. There is also a link for the Control X on that page.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Actually, in that example, I didn't compare the ASCII values. Although that will work fine. In the example, I compared the Key IDs.

    Also, this example: http://www.create-games.com/download.asp?id=8684 shows how to type your name by selecting letters with the arrow keys. I'm not sure what you are going for... hopefully one of them helps.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChrisBurrows View Post
    The control X object can retrieve the last key press as a string. You can use the String Parser object to convert that string (the key press) to an ASCII value. Then, if the ASCII value is between 32 and 128, you know it is one of the keyboard characters.

    To backspace the last character, set the string to: Left$(string$( "String" ), Len(string$( "String" ))-1)

    To see how either of those tasks are done, check out this example I made: http://www.create-games.com/download.asp?id=8549

    The example is for an Array Inventory Editor but the editor itself uses those two methods. There is also a link for the Control X on that page.
    I would like to try this, but it does not seem the Control X object is supported in Flash :/

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,964
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    Try setting the focus to an editbox that is offscreen and/or invisible and just copying it to the string or whatever you're using.

  9. #9
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    I agree with Phi. That is the simplest way.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Wish there was a cleaner solution though... The editbox off to the side trick is nice except it leaves you with no mouse cursor controls over the editbox on screen. So for example, it would be incredibly difficult to allow the user to click somewhere in the on screen box and select a bit of the text with the mouse and then copy/past/delete it. The solution is fine for simple text entry but it's not a good solution for something like a chat box entry area where users might want to copy things from their edit box or paste/insert things in.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Keyboard input vs player control input
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 22nd August 2013, 09:00 PM
  2. [BUG] Edit Box Object--> “INPUT FOCUS”
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 5th September 2012, 03:14 PM
  3. reformat edit box input and output as $x,xxx,xxx
    By JohnArtbox in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th September 2011, 03:59 AM
  4. Setting up alternative input controls
    By ionside in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th October 2010, 08:06 AM
  5. Edit Box requires different input
    By alternatepower in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th August 2007, 02:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •