Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Edit box Right to Left

Author
Message
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 4th Apr 2020 21:26
is it possible?
Thinking of how to ...
for now i am thinking of , catching the Width of the Edit box and adding spaces to it, until it reaches the last char before wrapping up the line (it has only one line , its a search edit box with one line)
so once i am there and since Hebrew and probably every right to left Lang is flipped in AGKS, i get a new Char entered and remove one space before the last one (to the left) add that char and again and again until i get a full word.
or , i get Always get the text and reverse it (already have a reverse function presented here by Scraggle i think) , if i could turn it RTL it will be easier if not will make function with spaces i think don't know ..

any ideas?
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 5th Apr 2020 08:30
I can't get the code easily but I've centred text before in an edit box by adding a couple of sprites and text on the screen that looks like an editbox, and have an editbox off the screen out of view. When the user tapped on the fake editbox (the sprites and text) the real editbox was focused and what they typed appeared in the text element (which was centred on the sprites). You lose some functionally like selecting/moving the cursor position but that's probably all you lose as editbox's have limited functionally anyway. The text element was showing what was in the editbox (GetEditboxString).

You could do something similar by aligjning the text to the right of the sprite (and text alignment = right) and then reverse the string that's displayed in the text element as the user types.

In my app whenever they tapped on the fake editbox it cleared whatever they had previously typed, because it wasn't possible to position the cursor and delete/edit parts of their text.
OryUI - A WIP AGK2 UI Framework
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 5th Apr 2020 10:36
Hi Kevin.
Quote: "In my app whenever they tapped on the fake editbox it cleared whatever they had previously typed, because it wasn't possible to position the cursor and delete/edit parts of their text."


Yeah this is the main problem. i actually managed to do Right to left input in a simple Edit Text after each key pressed (android keyboard) i move the cursor to the left. Also tried to use SetEditBoxScissors to make it feel like you are typing from the most right designated.

But i Could not get the chars erased if needed thought of many solutions non seem to be working good not even in PSUEDO code...

But we do have a Scene Editor.. so if i am going to use a Text object somehow.. i will build a new Keyboard where you press buttons with the Hebrew Letters as they are by that just not using the normal AppGameKit input at all. Unless that is if Paul or someone will make it possible to "SetEditBoxRTL(editBoxId,val as integer)" where val 0 is the normal and 1 is , this could really benefit me, but until that is accepted to do , i will just a small Hebrew Key board and use a Text Object and when you press a letter it will simply add a "letter" to the searchString then i could search by that.

The most exciting thing i am intrigued by that is that i will be able to use 3D/ or 2D sprites and shaders on that keyboard also Tweens, it is going to be incredible. will show it off later on.

PS
I have already build a Hebrew Keyboard in AppGameKit but its on my old computer and cannot access it right now, and back then it was made in AppGameKit not AGKS , so AGKS is going to simplify it by a lot

Thanks for the comment and for your time
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 5th Apr 2020 11:58 Edited at: 5th Apr 2020 11:59


First thing first.
The design.




Light blue a bit transparent and white borders.
Letters will be in White probably with shadows.

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Apr 2020 21:03
I know that somewhere on the boards, someone has posted a custom edit box.
I tried to find it yesterday without success

Login to post a reply

Server time is: 2024-04-10 07:44:20
Your offset time is: 2024-04-10 07:44:20