GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Store several Numbers in Table and display them as once

LocoyoLocoyo Posts: 6Member, PRO

Hey Guys,

I used GS few years ago and was ****** that there is no keyboard support on mobiles. I don't know why.. im back :D and still hating it. But I need for an App the Numpad (at least)

So.. short description of the current situation

i have 4 input fields
when pass is touched on one of them the Numpad appears and I can press them ( its a single image, with actors over each single number / icon )

ex i wanna enter 1256.7

I press every single number and the dot

how! can I save them into a table (I guess I have to store each value into a single cell right? how the next value will be added automatically into the next cell .. kind of check cell if empty, if not take next one )

and

display the text on the input field ( I guess that should be the mergecol or row..that shouldn't be the problem at all.. I have more issues with the adding every value :(

if there is any other way then tables.. go for it.. im open for any kind of solution.

thanks a lot

Comments

  • LocoyoLocoyo Posts: 6Member, PRO

    ok.. I found a similar project with a keyboard and tried to edit it for my suppose...
    but... no

    i have the "key" actor only on 1..2 and 3 .. and the actor on top should be the display text... it's realized with attributes only..
    for me it looks fine and similar to the code I used as source.. but when I run the project there shows up 2 letters ( its only made for 2 atm ) and then it disappears and nothing happens when I click onto one of the buttons...

    may you can help me :)

    here's my gs file
    https://www.dropbox.com/s/3qdn0o70dvtel27/V18.gameproj.zip?dl=0

  • tatiangtatiang Posts: 11,459Member, Sous Chef, PRO, Senior Sous-Chef
    edited December 2017

    In the digit/decimal actor with self.value (text) set to the numeral or a period:

    When touch is pressed
        Change attribute game.input (text) to game.input..self.value

    In the input field actor:

    Display Text --> game.input

    Note: the two periods (..) concatenate or join two attribute values into a single text value.

    The backspace key can be a little tricky to figure out so here's how that works:

    When touch is pressed
         Change attribute game.input to textSubStr(game.input,1,textLength(game.input)-1)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,459Member, Sous Chef, PRO, Senior Sous-Chef
  • LocoyoLocoyo Posts: 6Member, PRO
    edited December 2017

    @tatiang said:
    In the digit/decimal actor with self.value (text) set to the numeral or a period:

    When touch is pressed
        Change attribute game.input (text) to game.input..self.value

    In the input field actor:

    Display Text --> game.input

    Note: the two periods (..) concatenate or join two attribute values into a single text value.

    The backspace key can be a little tricky to figure out so here's how that works:

    When touch is pressed
         Change attribute game.input to textSubStr(game.input,1,textLength(game.input)-1)

    actually... I'm really angry that I made so many lines of code.. and it was so easy...

    thank you so much.. love ya and merry xmas :smiley:

  • tatiangtatiang Posts: 11,459Member, Sous Chef, PRO, Senior Sous-Chef

    You're welcome! Believe me, I've been in your shoes many times. "Oh, it's that simple? Argh!"

    Merry Christmas!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.