Scripts / About text lua functions in GG

Author
Message
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Sep 2019 03:06

Hi guys
I'm working on to get a list of names, write them in a panel using text command.

As result I'm getting:
appleorangebananapinacle

rather than:
apple
orange
banana
pinacle



So the question comes: does the "Text(x,y,size,txt)" function works with "\n" in order to get the names listed as pointed above?
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Sep 2019 05:29
Ok, I've solved.
I've realized "lines" getting "appleorangebananapinacle " as value, therefore it has not more than 1 line, not good for looping , so I've splitted "lines" into chunks, and wrote all then in panel via "Text(x,y,size,txt)" function.

But the question remain.

does the "Text(x,y,size,txt)" function works with "\n" to get a line break?
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 26th Sep 2019 19:42
Not that I am aware of, to get multiple lines you need to calculate a new y value your self.
Been there, done that, got all the T-Shirts!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Sep 2019 19:51
@ AmenMoses
Yes, I have already done it, however it is a pity that I do not have this complement, this would make things much easier.
Ty AM for the tip.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 27th Sep 2019 13:24 Edited at: 27th Sep 2019 13:31
Would be cool to have a wrapable dynamic TextBox(x,y,x,y,size,text) command.

I'll throw in a github request for the heck of it.
https://github.com/TheGameCreators/GameGuruRepo/issues/624
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 27th Sep 2019 14:44 Edited at: 27th Sep 2019 14:57
I would do it in a script and not in the engine:

Saves performance
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Sep 2019 17:26
The idea is about handling items on map in testgame mode, now working on listing meshes on the map.

This is what I've got so far



Idea is to get a tablet and thru menues and buttons get control about the meshes, even I'm working on building landscapes thru that table buttons, like work with the sliders to get nice atmoferic ambient, nice water, try different sky, etc.

but now I have a greater challenge, to get the text scroll , since a user can have hundreds of items on his map, therefore the list will be so long that it will leave the screen, and it would be necessary to scroll the text.

I am using code similar to the one I use here.



Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

Attachments

Login to view attachments
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 20th Dec 2019 03:30
That's an interesting idea 3com...
PM
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 20th Dec 2019 11:12
good idea 3com but waht about your horror asset.. ?? did you abandon it?
PC 2 Specs:
AMD RYZEN 2600 SIX CORE @3,70, 64GB RAM DDR4 2400, M/B GIGABYTE AX370
SVGA NVDIA 1660GTX 6GB , SSD M.2 TRANSCEND S110 1TB, 1X HDD SEAGATE BARRACUDA 4TB, 1X HDD TOSHIBA 2TB


PC 2 Specs:
AMD QUADCORE 880K @4.5GHZ, 32GB RAM DDR3 1600, M/B ASUS A88XM-PLUS
SVGA RADEON R9 380 4GB , SSD KINGSTON A400 1TB, 2X HHD SEAGATE BARRACUDA 4TB
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 22nd Dec 2019 14:17
@ GubbyBlips
Yah, would be so cool being able to clone entities at fly in test mode as F9 does, but via LUA.

@ JC LEON
Thanks mate for asking, I wrote some post about, in the horror pack support thread.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-05-01 23:11:22
Your offset time is: 2024-05-01 23:11:22