What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

How to add GUI?

strix

New Member
Joined
Feb 13, 2010
Messages
442
Reaction score
18
Is there any guide on adding GUI into your plugins/customclasses?

I basically created windows form (*.cs *.Designer.cs *.resx files) with attaching values to main file's variables.

I have them in right namespaces, but i cannot figure out how to add those forms into my CC.
Main file doesnt see ConfigForm, and ConfigForm does not see main file.

What do i need to add to main file for it to see configform?

http://pastebin.com/KLcfyM8G
Here are errors im getting
"Previous Version"s are: ConfigForm, ConfigForm.Designer and my main file
 
Last edited:
The best thing you can do is have a look at someone else's CC/plug-in and see what they do.
 
The thing is i tried like 3 ways of other's people and it seems im always missing something important there ;/

attached all my files
 
E:\A\HB 4.0.3a\CustomClasses\ConfigForm.cs

I think this is the issue. I believe they're treated as individual files unless they're in a subfolder of CustomClasses, then they're compiled together.

Have you tried putting all files in the same folder? For example:

E:\A\HB 4.0.3a\CustomClasses\LazyRogue\

-Alpha
 
Look at the overrideable properties of your custom class extension.

You should have at least three main classes:
- your CC class
- a (static) settings class that can save and load settings
- a GUI class

Your CC should create a Form each time you press the 'settings' button. Then you'll be able to easily load and save settings using your static Settings class in both the CC and the GUI. That's the easy way. If you don't like static stuff, you can set a reference of your CC class when you create the GUI one.

Ensure you're dropping every file that comes with your CC in your own Custom Classes/foo folder, including the 'weird stuff' a windows form class needs.
 
Last edited:
Back
Top