Jump to content

Made hiper plugin in CodeLab, don`t know how to create UI


Recommended Posts

Ok, I've corrected some layout issues that should make it work fine using IndirectUI. If the controls overflow the working area of the screen, then it will introduce a scrollbar automatically.

I still cannot reproduce the Ctrl+F issue you claim to have. I changed your "mode" property to use a StaticListChoiceProperty, and everything worked perfectly fine.

So please, give back your source, I will have THE example from the Master! ;) It will be a great help for me.

Link to comment
Share on other sites

I didn't do anything special. I just used StaticListChoiceProperty.CreateForEnum. I already deleted the modification, it was very trivial. I don't know how it isn't working for you.

private enum SomeEnumYouMake
{
   FirstChoice,
   SecondChoice,
   ThirdChoice
}

...

props.Add(StaticListChoiceProperty.CreateForEnum(PropertyNames.Whatever, SomeEnumYouMake.SecondChoice, false);
...
SomeEnumYouMake seym = (SomeEnumYouMake)newToken.GetProperty(PropertyNames.Whatever).Value;

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I didn't do anything special. I just used StaticListChoiceProperty.CreateForEnum. I already deleted the modification, it was very trivial. I don't know how it isn't working for you.

private enum SomeEnumYouMake
{
   FirstChoice,
   SecondChoice,
   ThirdChoice
}

...

props.Add(StaticListChoiceProperty.CreateForEnum(PropertyNames.Whatever, SomeEnumYouMake.SecondChoice, false);
...
SomeEnumYouMake seym = (SomeEnumYouMake)newToken.GetProperty(PropertyNames.Whatever).Value;

What I'm not happy with is FirstChoice when I would like First Choise (with a space)... So I'm trying to use texts and then I'm having this troubles...

@pyrochild: From what I can see, it's a hyper coloring plugins IMO.

Link to comment
Share on other sites

Are you having trouble with setting the text you want, or with getting the right functionality? You're just confusing me now.

To set the text, just do what Clouds does. First, you have to retrieve the PropertyControlInfo in OnCreateConfigUI(),

PropertyControlInfo pci = configUI.FindControlForPropertyNames(PropertyNames.Whatever);

Then, you need to associate display names with values.

pci.SetValueDisplayName(SomeEnumYouMake.FirstChoice, "First Choice But I Want This Text Instead");

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Wow! Thanks you all, especially MadJik.

It works much faster now, and I really like the UI you created, but I think, that I should create UI myself.

And one more thing, can you tell me how other blending modes work?

Sorry if you wasted time for me, but I prefer if my work is completly mine, but I`ll keep the changes you made for optimization.

And I have some new ideas for my plugin, so I`ll wait with UI a bit.

Logo-1.gif

The Asmageddon is coming.

You better prepare... or you won`t survive

Link to comment
Share on other sites

Wow! Thanks you all, especially MadJik.

It works much faster now, and I really like the UI you created, but I think, that I should create UI myself.

And one more thing, can you tell me how other blending modes work?

Sorry if you wasted time for me, but I prefer if my work is completly mine, but I`ll keep the changes you made for optimization.

And I have some new ideas for my plugin, so I`ll wait with UI a bit.

That's ok... at least it made me learn something new for my own plugins...

BTW, what is really this effect for and what's name could it have?

Link to comment
Share on other sites

First it was supposed to be just weaker version of Edge Detect.

But later I made some more things, added four various modes of extracting colors by reading difference between pixels.Then blending modes, blur, changing angle while in middle of loop, inversion, colors opacity.

I even have plans for setting center point in image, that Angle will be set so it come out of the center plus then rotating them so you can get something like radial blur, but this one is a bit too hard for me.

But it`s still very great plugin(I think so).

With this one you can get various effects, like:

-Motion blur

-Frosted glass

-Emboss

-Edge detect

-Outline

-Relief

-And many many more...

And you even can sharpen picture with it by setting some combinations of values.

There are thousands of effects in one!

And the only way to use them is to experiment.

And can you compile the source with created UI, I don`t have anything to compile it for now.And I sometimes want to use it without just modifying values in CodeLab(with is my only tool for programming for now).

Logo-1.gif

The Asmageddon is coming.

You better prepare... or you won`t survive

Link to comment
Share on other sites

First it was supposed to be just weaker version of Edge Detect.

But later I made some more things, added four various modes of extracting colors by reading difference between pixels.Then blending modes, blur, changing angle while in middle of loop, inversion, colors opacity.

I even have plans for setting center point in image, that Angle will be set so it come out of the center plus then rotating them so you can get something like radial blur, but this one is a bit too hard for me.

But it`s still very great plugin(I think so).

With this one you can get various effects, like:

-Motion blur

-Frosted glass

-Emboss

-Edge detect

-Outline

-Relief

-And many many more...

And you even can sharpen picture with it by setting some combinations of values.

There are thousands of effects in one!

And the only way to use them is to experiment.

And can you compile the source with created UI, I don`t have anything to compile it for now.And I sometimes want to use it without just modifying values in CodeLab(with is my only tool for programming for now).

Download Visual Studio C# Express 2008. The design tools are great, and you'll have tons more control over your design, especially seeing how this design is extremely complicated to say the least.

Link to comment
Share on other sites

  • 2 weeks later...

/.../

And can you compile the source with created UI, I don`t have anything to compile it for now.And I sometimes want to use it without just modifying values in CodeLab(with is my only tool for programming for now).

First version as now there is a lift for long UI. :!: You must have V3.20 beta 2!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...