Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Need to set focus for TextField — Gideros Forum

Need to set focus for TextField

DoradoLabDoradoLab Member
edited June 2014 in Game & application design
Hi Gideros,

I have a small problem. I am using a virtual keyboard. Values entered from keyboard shown in a text-field. But when i type, the cursor will not show inside the text box. Is there any property or option to set the cursor. Please let me know how to do that ASAP. That will be a great help for me to complete my game.

Thanks ,

Dorado Lab

Likes: DoradoLab

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • ar2rsawseenar2rsawseen Maintainer
    @DoradoLab Which Virtual keyboard do you use exactly?
  • Simple which we designed which has only Alphabets , Bacckspace, space and Enter keys..
  • ar2rsawseenar2rsawseen Maintainer
    edited June 2014 Accepted Answer
    ah, I see
    and by text box you mean TextField object, right?
    Well TextField was meant to render text, not to input it, so it won't behave as natural text box, but you could always emulate it, like adding an image that would represent the cursor, and then simply animate it using GTween:
    local cursor = Bitmap.new(Texture.new("cursor_image.png", true))
    cursor:setAnchorPoint(0.5, 0.5)
    cursor:setPosition(text:getWidth() + 10, 5)
    text:addChild(cursor)
    local tween1 = GTween.new(cursor, 0.4, {alpha=0})
    local tween2 = GTween.new(cursor, 0.4, {alpha=1}, {autoPlay = false})
    tween1.nextTween = tween2
    tween2.nextTween = tween1
    and then when entering text, you will need to reset the position of the cursor position
    cursor:setX(text:getWidth() + 10)
  • Delete t:

    setAnchortPoint >>> setAnchorPoint

    Likes: ar2rsawseen

    Kate's Catalogue of Travelling Theatre Centres :
    Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
    She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
    +1 -1 (+1 / -0 )Share on Facebook
  • PlatypusPlatypus Member
    edited June 2014
    Speaking of entering text, is Gideros 2.0 likely to facilitate direct access to native iOS/Android user-editable text fields (without needing BhWax or JavaBridge)?

    (By the way, will Gideros 2.0 be released in 2014?)
    Kate's Catalogue of Travelling Theatre Centres :
    Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
    She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
  • ar2rsawseenar2rsawseen Maintainer
    Corrected
    and sorry, really can't tell anything, will need to wait for @atilim's message
  • I am really looking forward to Atılım's message.

    Will Atılım's message be given in 2014? ;)
    Kate's Catalogue of Travelling Theatre Centres :
    Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
    She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Sign In or Register to comment.