Combobox+player controller

This forum is currently in read-only mode.
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • 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.

  • I have the same issue when I was trying to make a level editor. :(

  • To my knowledge you'll have to create/destroy the combobox as you work; there's no way to unfocus it.

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

    Thank you for your help.

  • 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.

  • 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

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

    Thank you for your help.

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

    Combo box

    Hope this works.

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

    Combo box

    Hope this works.

    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.

  • 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.

  • 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. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • I may be wrong here, but I think that's one of the MFC plugs, and that would probably complicate any fixes for it.

    However, sglorz's Gui Plug, might offer a solution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Omg this is great. It works with player movement. It can unfocus and besides all of them it's already a cool plugin which gives amazing options.

    Thank you very much for sharing this. I wonder how many more plugins/addons are there which I haven't noticed yet.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)