#HOwdy howdy people.
1 messages ยท Page 1 of 1 (latest)
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 examplem_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 ?
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.
though i have wrongly assigned something in my DefaultPlayerController.et
I noticed that as well prior but you are correct should have switched it earlier.
will try out
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
your layout script is not correct
or is not initialized. Re import with the plugin if you changed something