Combobox+player controller

For questions about using Classic.

Post » Sun Jul 17, 2011 11:29 am

Hi all

I have a sprite with 8 direction behavior. And a combobox. When I select something from the combobox than I can't controll my sprite anymore. I can't deselect that combobox with clicking around. It keeps selected.

Is there anyway to deselect it ? Like maybe "on dropdown closed" do something. Or "on selection changed" do something (deselect combobox)

Thank you.
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Sun Jul 17, 2011 1:46 pm

I have the same issue when I was trying to make a level editor. :(
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Sun Jul 17, 2011 1:49 pm

To my knowledge you'll have to create/destroy the combobox as you work; there's no way to unfocus it.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sun Jul 17, 2011 2:16 pm

Oh, thats bad. Being have to create/destroy for every selection makes it useless. I'll try smth else.

Thank you for your help.
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Sun Jul 17, 2011 3:20 pm

I don't see how that really complicates things. Create and destroy are basically the equivalence of focus, and un-focus.
If you haven't used the function object, you might take a look at it. It makes doing things like this rather simple.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Jul 17, 2011 5:45 pm

Well actually it's not complicated but, I think if I destoy that after player choose something, I should store the choosen one, than when I create it again, I should set selected list again with stored choosen one ? I don't know if I'm right. Plus

I tried to destroy it, and create it, It didn't work. It still keeps being selected. But maybe I couldn't destroy it properly.

As I see same issue exist on listbox too. I searched it, someone has written; if you minimize than maximize the layout fast. Than without a notice you can have control again. I couldn't find how to minimize and maximize the layout with codes too. And I guess if your game runs on fullscreen, everyone could notice it easily.

Thank you for your help
Spider_hip2011-07-17 17:46:54
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Sun Jul 17, 2011 6:33 pm

[QUOTE=Spider_hip] Oh, thats bad. Being have to create/destroy for every selection makes it useless. I'll try smth else.

Thank you for your help.[/QUOTE]


You can do it this way, without having to destroy anything :

Combo box

Hope this works.
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Sun Jul 17, 2011 9:43 pm

[QUOTE=chrisbrobs]
You can do it this way, without having to destroy anything :

Combo box

Hope this works.
[/QUOTE]
Unfortunately, this does not free the keyboard. (Try adding a sprite with 8-direction to see what I mean). Desroying the combobox seems to be the only way for now.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Jul 17, 2011 11:50 pm

@chrisbrobs

Thank you for your help but It seems, it doesn't work with 8-direction sprite either.

I think c++ coders may fix this issue. There should be unfocus option for thoso combobox, listbox, etc objects. Or maybe on system options there maybe set layout focus option.

I don't want to get yell from developers :), I know they already did a great job with this great engine, even they re going to make better with c2. I just wanted to say my opinion with this situation.

I think there was a person who wanted to join c1 development a few days ago on forum. Maybe he can fix these kind of small issues. :)

Thank you all.
B
7
S
1
G
1
Posts: 76
Reputation: 904

Post » Sun Jul 17, 2011 11:51 pm

Just tried it with 8 direction sprite and it doesn't work!

one thing to note.
i put the combo box in a disabled group, everything worked until the group was activated, then the drop down list went crazy.....it filled the screen from top to bottom with the name of the second item?........then sprite stopped moving.
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 11 guests