SDK textbox intellisense

0 favourites
  • 10 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Ashley

    So with the new Function Feature, the user experience of adding a new function is great, when typing in a description, you get intellisense for all previous descriptions you have typed. this is a great feature and could be something very useful for other 3rd party addon's to adopt. is there currently a way to implement something like this through the SDK? If this is not currently supported in the SDK, will there ever be a plan to implement this or something similar?

    Tagged:

  • The description is just a plain text input element. If the browser autocompletes that for you, it's the browser doing that and isn't something done by Construct. Note we use a datalist on the category field to suggest other categories already used; again that's just plain HTML stuff.

  • so that data list element, you guys must be populating that because no other text field in construct behaves like that.

    here is an exmaple :

    This text box element does not have the list attribute on it.

    but when we look at the function

    It has that list attribute, where you are passing "function-category-list", i am assuming this binds to an array on your controller or model

    as of now there is no way to populate that array from the sdk, my suggestion/request is have a different type of parameter where we can attach an array of strings to that list attribute on the text box to achieve the same effect of having intellisense.

  • You want autocomplete for parameter strings? What for?

    The category field uses a datalist, but the expression field uses contenteditable, and I'm not sure if that supports datalist. If it doesn't it makes it harder to support.

  • Okay, so lets examine the root cause of what i was trying to achieve, in a way to goal is to setup a combolist that the user can populate at runtime (c3 runtime, no game run time) having the prepopulated list does not really ensure this.

    Let's take a practical example I have a finite state machine behavior, right now the states are defined as strings

    so there are ACES like go to state "string", on state "string" entered... it's up to the user to keep track of these dynamic strings. and they could remain strings but when typing them out it would be a better experience to have previously mentioned strings populated in the data list, the same purpose as function description.

    the same (but a bit more limiting) could be achieved with a dyanmically populated combo box

    where the user could do something like

    Add state "string", then in the addon code we can populate a data list array, then on a separate condition it could be on state "combo box" entered where that state it defined

    both of these approaches try and solve the same problem of helping the user manage user defined sets of values.

    a cleaner way of handling this situation would be some sort of Enum type, but that still would need to handle dynamic population of that data (not just hardcoded).

    I hope this illustrates the point i am trying to get across.

  • Well the parameters dialog doesn't use datalists and this is quite a lot more complicated than the simple autocomplete elements you previously highlighted, so I doubt this would be quick to do. The feature suggestion platform is there as always.

  • yeah i figured it would not be so simple, but it's always worth asking the question. In my opinion the best solution for this would be supporting enum type, https://construct3.ideas.aha.io/ideas/C3-I-207

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not clear that enums are the same thing - I imagined those would be set up in the editor, whereas an autocomplete for similar strings would be derived from other existing events.

  • Yes I see your point, I was think more of the user setting up that link, but getting the data from events would put the responsibility to handle that on addon dev. I will go back and create new suggestion, with more details about that specific use case. thanks

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