Menu highlighting with Xbox controller/Arrow keys

For questions about using Classic.

Post » Thu Jun 17, 2010 2:15 am

Hi, I was interested in this problem, so I took a look at it.

That's a nice way to set up a variable number of choices in a selection menu, lucid.

Anyway, I made a couple of changes to make it work, lildragn. The main change is just what happens when you hit enter:

[code:2pk30t3i]+ MouseKeyboard: On key Enter pressed
+ Blue: Pick by Blue.Value('ID') Equal to global('screenSelect')
-> System: Go to layout Blue.Value('choiceName') with transition "None" lasting 0 MS[/code:2pk30t3i]

This is one way to do it. Note that here it's telling Construct to go to the layout with the same name as the contents of the string in the variable 'choiceName'. As lucid mentioned, if your target layouts were named as "Layout 1", etc., you could very well use "Layout " & Blue.Value('ID') instead of Blue.Value('choiceName'), or some other scheme entirely. The picking of the menu item was the main thing to accomplish there, so you can get the ID or choiceName for it.

The other changes that I made were just things that I would have done differently, to the same result, though. Here is the modified .cap:


Good luck. :)
Posts: 187
Reputation: 1,449

Post » Thu Jun 17, 2010 2:50 am

Haha ok, I don't think I would've gotten that. Thanx for the well commented .cap file, I remember doing something similar with 'loopindex' when I was playing around xCode for iPhone. This actually makes alot of sense to me. It's frustrating at time, I can read code but putting it into a tangible string that makes sense is where it becomes tricky :)

Really appreciate it Silent!

Posts: 61
Reputation: 997


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests