-
Having some fun with code generation
[C#] public void ConfigureCheatDeathBuffFeederPlugin() { - Pastebin.com
This is fully generated (reflected) by TurboHUD, so basically it can generate C# code from the actual state of a plugin.
(NOT everything, but basic datatypes and fonts, brushes, etc)
the idea:
- add some UI support to allow the user to change those values
-- nothing fancy, but a list of plugins on the left, and a list of keys/values on the right. hopefully with some support for basic data types,like integer, float, bool, Key (enum), -- DashStyle (enum), etc
-- not sure how to handle brushes/fonts yet on the UI
- apply the changed values to the plugin instances, so the changes are visible realtime
- "persist" the changed values as a special C# plugin which is responsible to apply these changes so it will be loaded every time HUD starts
Of course this UI would not replace the freedom of writing customizer plugins (whose affect other plugins properties), but for the newbies it would be an awesome start.
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Post Thanks / Like - 5 Thanks
-
Contributor
wow great idea!
one quick question:
while you are at persisting data, would you consider providing the user plugins with a way to persist some informations? could be as simple as one string per plugin that gets saved when thud terminates and is loaded and set when it starts.
maybe add it to the baseplugin interface so each plugin can access its own string/object that gets persisted
-
Post Thanks / Like - 1 Thanks
greatscott (1 members gave Thanks to prrovoss for this useful post)
-
even better after I added enum indexers:
public void ConfigureOtherPlayersPlugin()
{
var plugin = Hud.GetPlugin<OtherPlayersPlugin>();
plugin.DecoratorByClass[HeroClass.DemonHunter].Enabled = true;
plugin.DecoratorByClass[HeroClass.Barbarian].Enabled = true;
plugin.DecoratorByClass[HeroClass.Wizard].Enabled = true;
plugin.DecoratorByClass[HeroClass.WitchDoctor].Enabled = true;
plugin.DecoratorByClass[HeroClass.Monk].Enabled = true;
plugin.DecoratorByClass[HeroClass.Crusader].Enabled = true;
plugin.DecoratorByClass[HeroClass.Necromancer].Enabled = true;
plugin.NameOffsetZ = 8f;
plugin.Enabled = true;
plugin.Order = 0;
}
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
ingame UI for realtime plugin customization (yes it looks shit, I spent ~35 minutes with it...) and only bool/int fields are supported currently
https://i.imgur.com/Zs9YkoK.png
https://i.imgur.com/YZ3CM3D.png
Last edited by KillerJohn; 09-12-2017 at 02:17 PM.
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Post Thanks / Like - 1 Thanks
greatscott (1 members gave Thanks to KillerJohn for this useful post)
-
wow, so much reaction
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Post Thanks / Like - 1 Thanks
greatscott (1 members gave Thanks to KillerJohn for this useful post)
-
Contributor
Originally Posted by
KillerJohn
wow, so much reaction
im very curious to see this in action^^
I allways thought about an ingame menu but it makes no sense without the possibility to persist the changes
-
Member
As a noob and not so savvy for this stuff I appreciate the work. Would it be possible to add a default button in the bottom just in case we/I screw something up? Or perhaps change the color of variable (true, false,disabled, enabled) we adjusted. Just cause I'm so forgetful lol. This is nice tho, sort of reminds me of someones theme who had the options in the paragon tab(forgot who it was).
Any who thx for your work and thud.