Jump to content

Dialog or Menu system?


photo

Recommended Posts

Is there a dialog-box or menu-system in Unigine?

 

Use-case:

Let's say I make a controllable character, when I go next to a NPC, I want it to popup a 2D dialog box. How do I do that in Unigine?

 

Link to comment

Hi polywickstudio,

I use C# components I hope this helps.
Create a ObjectGUI

CreateMenu.thumb.png.dc25e3f8cce77af9124e4582a9d53cf0.png

Attach a component with this Init function.

    Gui gui;
    private void Init()
    {
        gui = (node as ObjectGui).GetGui();
        WidgetDialog dialog = new WidgetDialog();
        WidgetLabel label = new WidgetLabel();
        label.Text = "test";
        gui.AddChild(dialog);
        gui.AddChild(label);
        label.Flags = Gui.ALIGN_CENTER;
    }

If you want more.

Look at Samples 
- Unigine inteface
- Unigine objects gui_07
- C# Widgets

Also today i finished this post on UI 

 

 

Link to comment
×
×
  • Create New...