#HOwdy howdy people.

1 messages ยท Page 1 of 1 (latest)

daring charm
#

Layout

  • in your root widget (top widget) add the following component (and configure it) SCR_WidgetExportRuleRoot
  • For every elements in your layout you will want to interact with, make sure they start with m_w. For example m_wTitle
  • Top navbar => plugins => generate class from layout
#

Scripts

  • Inside your custom infodisplay script (inheriting from SCR_InfoDisplayExtended) add the following code:
// Widgets
ref SCR_YourExportLayoutWidgets m_Widgets;
    override void DisplayStartDraw(IEntity owner)
    {
        if (!m_wRoot)
            return;
        
        m_Widgets = new SCR_YourExportLayoutWidgets();
        m_Widgets.Init(m_wRoot);
    }    

You can now interact with your layout from your infodisplay by calling m_Widgets.m_wTitle.SetText("Hello World"); (for example)

    override protected void DisplayUpdate(IEntity owner, float timeSlice)
    {
        // you can then update your UI here for example
    }
#

If we start with this where are you stuck ?

rotund grail
#

better if i jsut share the code I can already see that i probably made few mistakes

#

my layout structure

#

@daring charm

#

all seem in place right?

#

I already had this done.

rotund grail
daring charm
#

also in the layer (your first screenshot) make it as a overlay

rotund grail
rotund grail
#

Virtual Machine Exception

Reason: NULL pointer to instance. Variable '@c00'

Class: 'SCR_StanceInfo'
Function: 'UpdateStance'
Stack trace:
scripts/Game/UI/HUD/StanceInfo/SCR_StanceInfo.c:51 Function UpdateStance
scripts/Game/UI/HUD/StanceInfo/SCR_StanceInfo.c:21 Function DisplayUpdate
scripts/Game/UI/HUD/SCR_InfoDisplayExtended.c:551 Function UpdateValues

#

(I will also get rid of the colouring since it looks odd was just curious how it would look )
heh

daring charm
#

or is not initialized. Re import with the plugin if you changed something

rotund grail
#

wym

#

๐Ÿ˜ฉ ๐Ÿค”

#

compiled

#

double checked both .layout
and player controller

#

(*I understand that there must be a simple mistake but damn)

#

will check again

rotund grail
#

OH

#

MY

#

GOD

#

i misspelled my stance image

#

works

#

@daring charm Ty for help Guillaume

#

i feel hella dumb atm