Jump to content

[SOLVED] New Sets Of Widgets via Plugin


photo

Recommended Posts

I'd like to create new sets of widget(i.e. WidgetInventory) via a plugin. Is it possible? If yes, how exactly can it be done? To make things clear, an Inventory Widget consists of let's say, 3 buttons, 1 listbox and a sprite.

 

WidgetButton

WidgetListBox

WidgetSprite

 

There, I need those Widgets to use inside the DLL Project using C++ via the C++ API and produce a plugin. In other words, I want to make a new WidgetInventory by using the default Widgets like WidgetButton in the form of a plugin.

Link to comment

I have linked my C++ project to the C++ API and to the Unigine source. but I think Widgets are not exported out on the .dll right? that's why I can't make a plugin that will add Widgets like for example WidgetInventory.

Link to comment

No, you can't inherit without modifying the source.

 

You can extend widgets/nodes/etc. in four different ways:

 

1. (C++ side, unlikely) Modify engine source and inherit you classes from original Widget/Node

2. (Unigine script) Inherit from extern 'Widget' class provided by C++ part

3. (Unigine script) Write custom wrapper class on one of currently available widgets (for example, buttons in Oil Rush is a custom wrapper on WidgetSprite class)

4. (Unigine script) Inherit from core/systems/widgets Widget class

Link to comment
×
×
  • Create New...