[plugin] Menu Aid

Post your work in progress addons and get feedback

Post » Mon Oct 24, 2016 3:46 pm

Image

Current version: 0.5

Menu Aid is designed to help in the hassle-free creation of typical vertical game menus. It can create whole menus from a simple definition and by binding other objects (text, spritefont, sprites) to it via actions.

There is no kind of documentation currently, but you can have a look at the following commented example: Download example capx.

Click here to see a different example menu running (with mouse support).

Download plugin

This plugin is still in development and therefore currently not recommended to be used in serious projects. Please report any issues you run into, especially javascript errors.
Last edited by PixelRebirth on Tue Mar 28, 2017 9:24 am, edited 5 times in total.
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Post » Mon Oct 24, 2016 4:03 pm

Pesky flags.
---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Encountered second <b> before first was closed with </b>

Condition: bold_flag == false
File: Controls\EventString.cpp
Line: 205
Function: void __cdecl EventString::FragmentString(void)
Build: release 238 (64-bit) checked
Component: Construct 2 IDE
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------
Image ImageImage
B
169
S
50
G
169
Posts: 8,285
Reputation: 108,214

Post » Mon Oct 24, 2016 4:22 pm

newt wrote:Pesky flags.
---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Encountered second <b> before first was closed with </b>

Condition: bold_flag == false
File: Controls\EventString.cpp
Line: 205
Function: void __cdecl EventString::FragmentString(void)
Build: release 238 (64-bit) checked
Component: Construct 2 IDE
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------


Oh snap!

I'm still on the latest stable release and haven't encountered this error. Tried the latest beta just now and it greeted me with a different check failure even without my plugin installed (although a couple of different third party plugins).

Did something significant change here? I wasn't exactly in touch lately with what's going on around here... ;)

EDIT: Appears C2 got a bit more anal about stuff lately :mrgreen: . Looked three times over it, but couldn't find any error in the markup in edittime.js. For the moment I just removed any <b> tags and it appears to work fine now with the latest beta. Download the plugin again if necessary.
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Post » Mon Oct 24, 2016 5:55 pm

Looks like it's working now.
The "bind" action is interesting.
I wouldn't have thought you could reference objects that don't exist., but it does simplify things.

Are there any plans for adding more to it?

Nice job btw.
Image ImageImage
B
169
S
50
G
169
Posts: 8,285
Reputation: 108,214

Post » Mon Oct 24, 2016 8:38 pm

newt wrote:Looks like it's working now.

Great! :P

newt wrote:The "bind" action is interesting.
I wouldn't have thought you could reference objects that don't exist., but it does simplify things.

You can select object types and then spawn instances for it. Pretty handy stuff. I wasn't sure how to do basically any of this until I sat down and looked into it (and at a lot of other plugins).

newt wrote:Are there any plans for adding more to it?

There might be a few useful expressions missing. Apart from that I want to add some sort of offset map feature, so the elements of the menu can be spawned displaced if desired.

newt wrote:Nice job btw.

Thanks and thank you for the feedback!
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Post » Tue Oct 25, 2016 3:43 pm

While in the process of creating a bit of a fancier menu with this plugin, a few necessary additions became evident.

New version 0.4

Changelog:

  • fixed expression 'GetDist' not working
  • fixed some wrong descriptions
  • added action 'Set item text'
  • added action 'Set item prop. distance'
  • added action 'Claim last menu as'
  • added expression 'GetText'
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Post » Tue Oct 25, 2016 6:56 pm

Very interesting!! Thanks for this!
B
123
S
43
G
41
Posts: 846
Reputation: 28,204

Post » Thu Oct 27, 2016 3:55 pm

Have been messing around with a new menu example and working on the plugin at the same time.

New version 0.5

Changelog:

  • fixed some faulty behavior with the 'Unspawn menu' action
  • added action 'Select item (in menu)'
  • added action 'Bind text object to all existing items'
  • added action 'Bind sprite object to all exisiting items'
  • added expression 'GetNameBy'
  • added expression 'GetNameBySprite'
  • added expression 'GetIndexBy'
  • added expression 'GetIndexBySprite'
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Post » Mon Oct 31, 2016 1:07 pm

Hello there, i love your plugin! Thank you! But i get an error when i use the function "GetPropState". I found where the error is. At line 1091 you don't instance the variable with a "var" property name.

Current:
tmpIndex = this.itemHandle.indexOf(name);

Correct:
var tmpIndex = this.itemHandle.indexOf(name);
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Mon Oct 31, 2016 1:21 pm

andykenobi wrote:Hello there, i love your plugin! Thank you! But i get an error when i use the function "GetPropState". I found where the error is. At line 1091 you don't instance the variable with a "var" property name.

Current:
tmpIndex = this.itemHandle.indexOf(name);

Correct:
var tmpIndex = this.itemHandle.indexOf(name);


Oh my god, I really do that a lot, hehe. :oops:
Usually I stumble upon it myself at some point, but here I utterly failed.

Thank you for reporting and checking out the plugin, appreciated! :)
B
22
S
6
G
10
Posts: 1,035
Reputation: 7,516

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest