Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Visual editor for image type and custom functions

edited June 2013 in Suggestions Posts: 1

When you use the sprite() function, the first parameter (or even lack thereof) highlights blue and if you click it then it opens the visual editor for sprite graphics. Pretty awesome.

However, if I have my own custom function and want to take a sprite graphic as a parameter, I don't think there's a way to get it to give the blue highlight and the visual editor.

I think the easiest solution is for the image() function to behave like the sprite() function, and highlight the first parameter when it is using the single-parameter overload, or just highlight the empty parens when it doesn't have any parameters yet, and to use the visual editor in that way. Then the image instance can just be passed and the visual editor is still available when using custom functions. (I think this is consistent with the way the color() type works with its constructor function.)


  • SimeonSimeon Admin Mod
    Posts: 5,434

    You can use readImage() in this way, but you make an interesting point. The image() constructor could accept a sprite key to load.

  • Posts: 1,976

    I made a sprite picker class.

  • Posts: 257

    with last version of codea, i have
    error: [string " ..."]:60: Invalid buffer name

    and copy/paste function in print area does'nt work, before it's work, is'nt it ?

  • Posts: 257

    sorry SkyTheCoder my project's name was Sprite Picker with space between.
    It works fine, it's a good idea, thanks for share

Sign In or Register to comment.