Help on texts and lists needed

Get help using Construct 2

Post » Tue Apr 23, 2013 10:47 am

Greetings.

I have two questions:
1) Texts. I need some kind of logging in my rpg, but default text plugin has no scrolling (as far as i see). Is there any way to create, keep updated and show log file with vertical scrolling?

2) Lists. Player`s inventory is a default list plugin (little bit mad, yeah). Now i have a problem with long names - they doesn`t fit list box.
Looks like "| A very strange stone with scratches on the surface and some carv|".
I thought problem can be solved with 'white-space: nowrap;' in custom CSS, but no, nothing happens. So, what can i do to prevent it? Can items in list have 2 or 3 rows of text?
And: can i set an external css file for list?

Thanks a lot for your help, your suggestions, and your patience while my english is suddenly weak this time.
B
7
S
2
Posts: 49
Reputation: 982

Post » Tue Apr 23, 2013 11:59 am

For number one, did you mean like this?
https://www.dropbox.com/s/o6jiarjxuf70eg4/HUD%20Control.capx

For do like that..
1] Create a new layer, give the layer name(optional), and click that new layer.
For picture: bit.ly/HowDoI1

2]After that, create new text on that layer.

3]And then, click that layer again, and change the parallax setting (in the left pane side)
For picture: bit.ly/HowDoI2


For number two, sorry IDK...

Sorry for my bad english and sorry if I'm do some mistake.ahmadnbl2013-04-23 12:00:29
B
7
Posts: 14
Reputation: 603

Post » Tue Apr 23, 2013 12:36 pm

ahmadnbl, that`s not what i mean. I want large text field with scrollbar. Like chat log or, you know, something like that:
15:31 - You see ahmadnbl answered your question.
15:32 - You download ahmadnbl`s example.
15:33 - You need to update your construct2.
Scroll down to see newest events.

Anyway. Before you posted your example i used "anchor" plugin, but now i will use parallax. So thanks a lot, fellow.
B
7
S
2
Posts: 49
Reputation: 982

Post » Tue Apr 23, 2013 5:36 pm

[QUOTE=Yozzik]
1) Texts. I need some kind of logging in my rpg, but default text plugin has no scrolling (as far as i see). Is there any way to create, keep updated and show log file with vertical scrolling?[/QUOTE]

You can log all events in an array, and display a certain set of these events in a textbox. Take a look at this:
Demo
Capx

[QUOTE=Yozzik]
2) Lists. Player`s inventory is a default list plugin (little bit mad, yeah). Now i have a problem with long names - they doesn`t fit list box.
Looks like "| A very strange stone with scratches on the surface and some carv|".
I thought problem can be solved with 'white-space: nowrap;' in custom CSS, but no, nothing happens. So, what can i do to prevent it? Can items in list have 2 or 3 rows of text?
And: can i set an external css file for list?
[/QUOTE]

I can't think of any way to solve this using the list object, but using a list as an inventory sounds like a terrible idea. I'd recommend looking into alternative methods. Take a look at this inventory example:

Demo
Capx
B
44
S
13
G
7
Posts: 338
Reputation: 10,379

Post » Wed Apr 24, 2013 10:24 am

Perfect!

I did something like your event listener yesterday (giant text field scrolling with mouse wheel), but your example is much better and, well, wiser :)

Inventory example is perfect too. I was trying to do it some harder way, i don`t know why and for what.

So, thanks for you help and advices. I have no more questions.
B
7
S
2
Posts: 49
Reputation: 982


Return to How do I....?

Who is online

Users browsing this forum: PixelatedTrip, Yahoo [Bot] and 0 guests