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 Classic Chat / I want to create my own console. What is the best idea for text input?

Author
Message
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 10th Jun 2019 09:34
I can get a long way with getRawKeyPressed. So far I go for this:



But when it comes to special characters, a lot of them requires Shift/Alt combinations which differs depending on your keyboard language.

Is there any solution here?
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th Jun 2019 13:10 Edited at: 10th Jun 2019 13:10
For my own console, I just use an edit box . See CreateEditBox()

You can type into that to enter commands as well as display previous lines of commands or results and also print to it from code by adding a line.
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 10th Jun 2019 14:39 Edited at: 10th Jun 2019 14:40
Thanks, but I can't really use that, since I go for a style that recreates the look of a CRT monitor. This is what my prog looks like right now:

https://forum.thegamecreators.com/attachment/84334

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Jun 2019 14:57
looks good basicFanatic
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 10th Jun 2019 15:09 Edited at: 10th Jun 2019 15:09
You want the character buffer:

https://www.appgamekit.com/documentation/Reference/Input-Raw/GetCharBuffer.htm
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 10th Jun 2019 15:11 Edited at: 10th Jun 2019 15:33
You can set the Editbox font to look just like your image. You can even use an image based font on an edit box if you wanted to.

EDIT:

Quick demo of what i meant .....by setting your own font and background you can get something very similar but that allows you to type into it too....



Just an option if you wanted it
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 11th Jun 2019 08:43
Ortu
Holy cow, how did I miss that? Thanks a bunch!

Bengismo:
Impressive! Yet, I'm currently rendering the text to a pixelart-size image which I upscale to create ever-so-authentic blurriness, so editBox would screw things up. But the command looks way more powerful than expected.

Login to post a reply

Server time is: 2024-11-22 21:15:48
Your offset time is: 2024-11-22 21:15:48