TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

LUA Request: TextBox(x,y,x,y,size,text) or Line Break \n #624

Open Teabone3 opened 5 years ago

Teabone3 commented 5 years ago

Many game developers using Game Guru I noticed over the years are struggling to optimize their code as they feed new Y values for every line (of which also becomes a new string variable) in order to add dialogue and story to their game. Text is a vital aspect of gaming as it engages with the player on a deeper level for information, context and story telling.

I'm requesting a dynamic text wrap box that could work on the following types of commands ( at the very least the first colorless one):

TextBox(x,y,x,y,size,text)

TextBoxCenter(x,y,x,y,size,text) TextBoxColor(x,y,x,y,size,text,R,G,B) TextBoxCenterColor(x,y,x,y,size,text, R,G,B)

Similar to Panels, the Text Box would require x and y top left coordinates and x and y bottom right coordinates.

3coms commented 5 years ago

Or at least work with "\n" to get a line break.

to get: apple banana pinacle

instead of: apple banana pinacle

3coms commented 5 years ago

And if user has the ability to set textbox depth from here, some sort of: TextBoxColor(x,y,x,y,size,text,R,G,B,0), most likely user don't need pastesprite() or pasteposition()

Teabone3 commented 4 years ago

I like that idea 3coms

of course something even cooler would be allowing for certain charcter combinations to do various things like line breaks and even have different colors added inside the same text command.

Benjib0y commented 4 years ago

The full set of parameters gets quite long - x,y top-left;x,y bottom-right, frame colour, background colour, text colour, font, font-size, font-effect, (bold/italic etc.), text with mark-up notation. To get exactly what you want. I reckon a UI might help. Yes please. The sneak peak suggest the beginnings of this capability with character behaviour - one of option of which is npc dialogue. This just tacks onto what we've already seen, (for GGMax)

3coms commented 4 years ago

yah, some sort of "TextBoxColor(x,y,x1,y1,size,text,R,G,B,0,0)" 1 to get line break and 0 to does not.

Teabone3 commented 3 years ago

Lee did mention possible plans for some sort of Rich Text system.

Would be nice to have some additional support for line break. Its annoying creating a ton of Text Command lines for each line. AGK has some great commands for handling text for colors, line breaks using /n and wrapping options. All kinds of things.

https://www.appgamekit.com/documentation/Reference/Text.htm

3coms commented 3 years ago

I'm with you on this matter, we need more text Lua commands to be more productive.

OldFlak commented 3 years ago

And Right Justified would be good to have....

It has amazed me from day one with GG how the text tools are just so basic - kinda like we are meant to use images for everything instead.

OldFlak....

3coms commented 3 years ago

And some sort of "SendKey" to be able to let's say, mimic pressing F12 to take a shot in test mode/game mode, via script. Then you could take a shot of the scene in realtime when you are playing your level, and automatically add this shot to your Load game menu for later use. About the usage, well, for example, place save zone in any spot of your map, and include this command on their script, so you will found the shot in the LoadGame menu.

Teabone3 commented 3 years ago

I think you should make a new github request for that as I think that is unrelated to text

3coms commented 3 years ago

@ Teabone3 It should be somewhere, I've requested it for GG times ago, but yes, you are right it is unrelated. :)

Teabone3 commented 3 years ago

I only say that as if/once this gets added it will be cleared and your request might get lost