#enfusion_gui
1 messages ยท Page 3 of 1
ty for the link, thought we had no wiki pages for the widgets
I was just wondering what the panel widget did tbh
idk I feel like its a widget that is not a layout widget but also not a text widget or something
it has border styles tho
so maybe encompassing things in like a border is the use case
edit box filter has a max length limit, character validation, reverse character validation, numeric and ascii validation, but doesnt have minimum length validation 
Are image widgets special in that they can't coexist with other widgets in size layout widgets?
Its solved by more nesting, but it seems odd idk
Hello, where are the files for this description?
How do I get a slot from a Widget? I made a prefab of a widget, which is just a RichTextWidget with a UniformGridWidgetSlot attached (picrel). I want to populate a uniform grid widget component & change the row values of each widget, meaning I need to somehow get the UniformGridWidgetSlot so I can call its functions
wait, might've figured it out. didn't notice they were static methods
I'm learning though osmosis ๐
@warm junco is their an easy way to tell what "widgets" are from prefabs?
Only way I know how to see when a widget is from a prefab is in this screen
if its from a prefab that prefab column will have something in it
I just noticed that wasn't the name of the thing - eventhough it matches ๐
but "prefabs" here actually just means .layout
so you can paste layouts into layouts and its considered a prefab then
Man, blind as a bat. My bad ๐
Yea, I'm trying to edit and getting yelled at, because they are nested.
I'm guessing thats also why some things wont delete?
unsure, I haven't encountered that
I only modified one original prefab while testing before I've now moved onto just making my own, since my widget has little complexity
GUI doesn't look like it should be too hard. Did you ever find a master widget list? I tried searching.
wdym, like all the possible widgets?
Like what they all do
oh.... no
after staring at it all day its started to make sense
something about GUI editing with a hangover
not sure why but it let me lock in
I'm a few days in, but I think its coming along as well.
Drinking and coding is dangerous behavior ๐
that's weird, I never edit it sober
First thing i'm doing as a scrum master is requiring pre-scrum shots
That would have improved my workplace
Bacon is on the sauce ๐
this isn't right but this isn't wrong... I've at least gotten somewhere with this
Not even sure where the hell 0 came from
Better then me. I'm fighting with the inventory screen ๐
we're so back, once I get this layout sexy I can actually do the fun part which is coding again
This is all for your master stats stuff?
Ideally yeah, I want to make it look cool, but I forgot how much I had hated UI design in college
loosely basing my design decisions off of the COD4 stats screen
Well this also painful UI that doesn't render until your ingame.
Yeah you can use the live preview but its kinda jank
I would suggest trying to keep to the arma reforger style
Have you seen the career stats menus they are going to come out with at somepoint it seems?
or dont, actually
Probably? I can't remember it though, I think i've opened 80-90% of the layout files
maybe you can make it better
in my other projects I like using widgets with icons for stats
The "reforger" version that I had taken from the debriefing screen is just lines of text
Yeah, I want to add icons but I have yet to figure out how the image sets work, atm I'm getting the formatting right
but I do intend to have some pics in there
something like this but in Reforger I would not put border inbetween them
I want to do similar widgets for my next admin tools version
They look intresting ๐
something like this would be something like
- HorizontalLayoutWidget
- VerticalLayoutWidget (or) PanelWidget (size fill/auto)
- ImageWidget (align to top)
- VerticalLayoutWidget (size fill/full)
- TextWidget (label)
- TextWidget (value)
could wrap the whole thing in a panelwidget or framewidget for padding I guess
so without border inbetween I want to do something like this actually
better example than the last one
whether my idea will work in reforger or not we'll find out soon enough
also why is success notification blue and not green
Just realized I don't need to restart my workbench client if i'm creating the widgets on runtime....
so much time saved
Looking sexy
Yeah once I fix them floating points, convert to km, and then work maybe on the font
Comic Sans baby
Papyrus MS
RIP wildlife ๐
Unacceptable ๐
I want my BTR going through a cow to count.
all the entirys & even how stuff is tallied is configurable in the attributes
the total kills & K/D widget are the same, just toggled most of the flags off
Forgot to show the medical one as well, which I think a few ppl probably deeply care about and most care none at all
which of those are global and which are server?
You might as well load up all the stats. People love stats.
Later when I finally get somewhere with my code, we can make these global stats in my game mode ๐
All the stats are sent from the server during OnPlayerKilled atm. At least in my workbench, the client doesn't seem to keep accessible records of its events. I found it easier to just process the data & send the array<float> back to the client
I still need to test and make sure all the ones i'm referencing actually get updated. The ones that don't I'll probably end up doing the math client side or dropping/substituing the feature
I need to investigate the Infantry/Logistic/Medical points specifically.
SPPOINT0-2
This'll all be free to use, either just plain apl or apl-sa I think
Regardless pretty cool.
Are those lines generated in script or is everything manually placed by hand?
this should ideally given an idea of what its strucuted like
the base widget
line-item / entry in the base widget
Then I have two prefab richtextwidgets that I insert as Fields & Values in that Uniform Grid
I may have to change the base widget a bit though, I need it to be spread a bit horizontally as theres a vertical limit to the comp the jounrals are inserted into
There shuld be more below that red line + padding so that the dark doesn't meet the light like that
If this ends up being usable for others I would hope to add more datacollectormodules to try and get new stats from players
And I guess in code you're just making new instances and they end up just stacking on themselves based on the params locking the view?
//! Build the individual stat row widgets
void FillStats(Widget wStatsLayout)
{
STH_ClientComponent client = STH_ClientComponent.Cast(GetGame().GetPlayerController().FindComponent(STH_ClientComponent));
if(!client)
{
Print("STH_JournalEntry::FillStats could not find STH_ClientComponent", LogLevel.ERROR);
return;
}
array<ref STH_StatisticBaseClass> statistics = {};
array<float> stats = client.GetStats();
if(!stats)
{
Print("STH_JournalEntry::FillStats stats == null",LogLevel.ERROR);
return;
}
//TODO: store the stat widget classes in the config rather than the clients. Same with the tile layoutss
int statisticsCount = client.GetStatWidgets(statistics);
if(statisticsCount <= 0)
{
Print("STH_JournalEntry::FillStats No stat widgets received", LogLevel.ERROR);
return;
}
ResourceName statLayout = client.GetStatLayout(); //TODO get m_sEntryLayoutCustom?
foreach (STH_StatisticBaseClass stat : statistics)
{
stat.InitWidget(stats, wStatsLayout);
}
}
stats inserted in the foreach at the end
void InitWidget(notnull array<float> stats, Widget containerWidget, bool lastWidget = false)
{
Widget entryWidget = GetGame().GetWorkspace().CreateWidgets(GetStatScreenLayout(), containerWidget);
m_mEntries = new map<string,string>();
CalculateStats(stats);
SetupWidget(entryWidget);
//TODO insert stat separator prefab
if(lastWidget)
Print("STH_StatisticsBaseClass lastWidget!!!");
}
CalculateStats will populate a map with formatted strings which are then inserted during setupwidget
So its all just prefabs
So I'm a lot closer than I think I was okay. I'm pretty much at the same place. But I wasn't getting the results I wanted, but I have to fight with containers more.
Thanks for the info. Maybe tomorrow I'll actually have a breakthrough
gl, the UI stuff has become weirdly fun once it clicks a bit
its toggleable whether it only shows friendly bandages, friendly (self) or friendly + self
I bet. I'm not there yet ๐
After this then it's modeling learning ๐
modeling is a pain, I don't think I can ever get into it
I heard liquor helps ๐
I used to do UV maps for friends when I was in highschool, but anything beyond that had me grinding gears
I think i've come to the conclusion that a horizontal<vertical> layout beats the gridlayout component
What's the difference? Grid as far as I know is made for inv?
Uniformgridlayout is nice, it does what it says, aligns everything & has them size themselves nicely. Problem is that widgets that need less space are given all the space they can take. (expected and good behavior)
But not what I needed, so I jumped for the grid layout and its honestly just a pain to setup. Couldn't get it to left align & fill for the contents of column 0, and then right align the contents of column 1 while only auto sizing it. I'm sure its got its own uses, but it was a bit opaque when trying to figure out how to leverage it properly
Unsure if its 'made' for inventory, its there because its a common/necessary widget I figure
You would know better then I ๐
But a vertical layout that I insert horizontal layouts into gives me the sizing solutions that are basically what i'm looking for. Although I did love the uniform grid layout, there are something that I want to be a bit less uniform
There are times you just want uniform columns or uniform rows
Vert and Horz layouts are just containers with props to control the aformentioned, right?
They just ensure the order between your widgets really, but it can be made to work for what i'm doing.this is one row (horizontal layout) in my v layout (breakdown container)
but when you setup your sizing slots right it functions similarly enough
what do you mean "the order"?
Item0,
Item1,
Item2,
you set Z order (misleading name) to set their order in the widget
so a vlayout item 0 appears at the top (competes with other order 0 items), order 1 is below 0 &c
lol, that is confusing ๐
top->bottom left->right
probably not explaining it clearly, it makes more sense once you've fiddled with it
I guess they fight for space, and the result, is proper order.
and if you set the "fight order" they align properly. makes sense
They just have code that says "don't draw on top of each other" so the result is ordered
I needed this type of spacing in my rows in the grid, couldn't figure out how to accomplish that with the grid layout
With the uniform grid layout, this widget would've just been split equally in half meaning my field text got cutoff
I think I feel ya. I'm going to pour over your info from last night and see if I can't get my refinery operational this weekend ๐
Thanks again. Appreciate the effort and info.
lol np, this channel is gonna hopefully just turn into the non-existant wiki page for ppl to search through
I might breakdown and build a proper semantic modding wiki for Reforger, if I really get into it. I'm trying my best to avoid that, and just focus on my own learning ๐
Yeah I thought about keeping some clear notes, but I figure the BI dev who wrote the gui widgets or has worked on the system will one day provide a clear breakdown of widgets. Atm it's partially guesswork about whether I'm doing things 'right'
I have no freaking clue how the grid layout widget is supposed to work
but I think if you have two elements with size set to fill and equal weight then they should take equal space
ong its terrible, I sat there for 20 minutes trying different ways of getting what I wanted out of it
so to change the ratios youd change the weight
i'll never fw this again
nvm hated on the grid component too quickly, might get it now
we ball
"I'll never touch it again"
"NM we best freinds now"
Only thing I can say is I have never appreciated my git history more than now
99% of my commits just say update
I've been naming most of mine, but all the early commits just say Update/Comments/Formatting with no info
classic 'note'
GitHub Desktop really hasn't come far since they released it, still can't believe the app is this limited
still worse than the githubcli they made tho
anyone had this happen? size layout is just being disregarded in the grid?
Gridlayout, not uniform
Found the panel widget works best in an overlay, not as as a wrapper for another element.
Only thing to be desired would be control over the type of border? I guess at a point I'd have to use an alpha mask
there are several styles
theres a dropdown
you can make your own styles but I forgot how
yeah I went through them all, meant more the pixel width
I was just looking for how to do that
or maybe Custom not Default
override it and add a style to panelwidget
see if you can do it without crashes
I think i've crashed nearly 6-7 times already today, won't feel any different
those are rookie numbers
surprisingly not that hard, UI could definitely be improved for making styles, but it works
never change
love you workbench
The jedi don't teach you this, but if you right-click in the image set while editing a style it will fill in the currently selected entry with whatever you have selected last
Anyone know a method for setting the widgets style during runtime? I can make 9 different layouts, but if I could just call a Widget::SetStyle(...) it would be cool. We have string Widget::GetStyleName()
Getting a button to work should be just a call to action manager? GetGame().GetInputManager().AddActionListener("CloseINV", EActionTrigger.DOWN, Action_CloseInv);
What is needed for Slot_VON (When inserted by HUDManager)?
It constantly throw error, but everything in UI is works:
WORLD : UpdateEntities
RPL : rpl::Pip::ProcessNetToGame
SCRIPT (E): Virtual Machine Exception
Reason: Index out of bounds.
Class: 'SCR_VonDisplay'
Function: 'Get'
Stack trace:
scripts/Game/UI/HUD/SCR_VonDisplay.c:162 Function GetWidget
scripts/Game/UI/HUD/SCR_VonDisplay.c:190 Function OnReceive
scripts/GameCode/Network/SCR_VoNComponent.c:73 Function OnReceive
And it's throw error only on Server in Workbench (At least in Workbench)
Somebody was saying the other day that VON was locked down and not able to be enabled or something like that.
But it works
It just spam with error on Workbench only (Peer clients don't spam) on begin of receiving
So i think i can ignore this...
Maybe. I wouldn't know without looking at it. Perhaps what the person was talking about is background code engine is locked? Are you saying it transmits and everything is good and dandy?
@warm junco some menu inspiration. Very Reforger mod like ๐
until we get the ability to set styles in a panel widget, this is how you do selective bordering btw
enum STH_BordersUI
{
STH_LEFT,
STH_RIGHT,
STH_TOP,
STH_BOTTOM,
STH_ALL
};
protected void DecoratePanel(Widget panel, STH_BordersUI border, bool Do2px)
{
panel = panel.FindAnyWidget(layers[border]);
if(Do2px)
panel = panel.FindAnyWidget(px2);
else
panel = panel.FindAnyWidget(px1);
panel.SetVisible(true);
}

at this point I don't even remember what I was trying to make it look like yesterday, might not ever even use this I was just frustrated that we don't have a basic feature office 1997 had
Making something with a click drop down probably is a bad idea for console players. What's the equivalency? Tabbed windows? some type of button to flip something? I'm not a console person.
Also how bad is typing on a console/in reforger?
for some of the imagesets there is already a texture made that can be used in the imagewidget; however, some of the imagesets do not have an edds already made that hsa the image separated. How do I go about making one part of an imageset into an image... Or better yet, can I use an image in an imageset in the imagewidget?
Right now i'm specifically asking about Medical-icons.imageset's Bandage_UI
ImageWidget.LoadImageFromSet();
@primal phoenix I'm implementing what you see into reforger. Its a refinery, but its PC style from 2014. I'm just trying to remind myself of how console players interact with menus, to get a feel for how it needs to be designed to fit the Xbox community.
Alright gimme some time to think and imma post you an answer when im on console , then i can tell you accurately how the menu work on Xbox
rgr. no rush
how do I find which UI layouts use a script?
hey there,
using the Localise Selected File plugin on a .layout file, I'm getting a CTD.
Should I do it another way ?
Thank you! I was looking in the GUI editor instead of in the code lol
Anyone know what 'num' means in this? Does each image widget keep eight images cached and I choose which index to save it into?
GUI pic added for engagement
I think that is the usage yes, you can have one image widget that is used to display a few different images
Baller, ty
I dont know what the use case is though
maybe a status icon?
that changes depending on something
I'd imagine something like loading icons, or yeah status icons
something like bleeding, bleeding glow effect, bleeding holo image &c
Hey, if i create a Widget from the original MapLayout:
GetGame().GetWorkspace().CreateWidgets("{0651202E9F2646DE}UI/layouts/Map/Map.layout");
It will render as usual. But if i copy the MapFrame and MapWidget to my own Layout, the map stays black. Any knowledge about this?
Copying doesn't carry over content and properties well - that or, it needs to "Refresh" as its dynamic content maybe?
i double checked the properties and they are all the same ๐ฆ
@primal phoenix Heres your xbox powered window we talked about. Gernades are placeholders. Resources in the left, better resources on the right. I'll figure out quick keys for xbox for "maximum" add and remove.
Is there any Docu or Sample how to make a RenderTarget which use the mouse cursor? My Cursor always using the whole Screen size and not only the Render Target. So, also the cursor positions are wrong.
Was thinking about doing the same, how bad is it?
Haven't looked into the notification code yet.
they are hardcoded lol, so the way I worked around this was to create my own hardcoded notification that then gets the data I want from the packet injected into it when its needed to be created
so now I just send color, text, resourcename of the imageset and icon name
BI should add something like this
If I want 3 items to share the screen, a Horiz layout will "float" them left, right, all, small, center. But if I want them not floating (due to small screen overlap behavior) I use a modified grid layout?
would anyone potentially know why I have a random Text Widget popping up here? the one in white. It appears when I call my layout but I dont have a second text widget
If something is dynamically showing up, then it's probably being spawned by a code. You'll probably find that whatever your inheriting from or using, The text is dynamically set (So you don't need to add a text like you're doing) or something like that.
A lot of the UI is built-in code.
Ill have to take a looksies once again but I dont believe im spawning the extra text via code, and im not inheriting from anything that should.
I have item preview widgets, being dynamically created (like inventory) what's the easiest way to embed data into the dynamic UI elements, so I can query a dataset/know what button was clicked.
Since this is a strongly typed lanuage the ideal way I assume is to make a subclass and add a value, then call "myCustomWidget of parent widget" and update the member element. A more hacky/simpler way is to just edit the widgets name dynamically and embed the data. Additionally: PreviewWidgets are sealed so you can't make children. Which would create more class complexity as you would need to make a encapsulating parent and then calls like "is Inherited" will start failing - ect.
Anybody knows why reforger brokes UI image coloring?
Color become more pinky
Fancy artwork
color space is srgb ? (check in import tab of the edds)
thank u, To sRGB helped โค๏ธ
any reason why this is not default @static raven ? every time you import an img you have to do this or it has a washed effect
not everything uses SRGB
do you know what specifically ? (plz educate me)
decals alpha masks, Normals, etc
any kind of mask texture actually
i see thx
My guess is then, that what is mostly going to be having them in mass was decided for default
To reduce file size of the paks
yeah it make sens i just dont know shit about it so was wondering as my use case was only simple images shown in gui ๐
use the _BC suffix
probably should have asked before I went and did it, but is this how your supposed to make button gui's? just layers of img widgets and text? or is there a better way?
The way the interface for the inventory menu does it is by swapping out the icon and the text I believe. This would probably be the manual way. And you would just hide and unhide what you want displayed.
well I would want all of those up at the same time on the ui, gonna make it look a little better but that is part of the controls for my build system
dunno why I put wasd though, meant to be arrow keys. I was tired when I threw it together I guess
oh also, how would I go about making my text here take up 2 columns in my grid layout?
oh neat, found it
not the prettiest but itll do for a 15 minute creation
honestly might remove that outline from the text and just make the text white, might look better
Yeah I tried to match the look and feel when possible. but you're doing better than me. You got this figured out quickly
Use the Center thing in slots, and disable all the children from forcing their will. GUI is though hierarchy
how should I be setting up my chimeraInputCommon.conf context? I havent even activated the context yet and it seems to disable most other input, atleast movement, it also doesnt display the users cursor
I managed to code myself into a bit of a corner. I have a system that manually interacts with widgets, based on the name of the button, within an InventorySlotUI structure, via/using "under cursor".
Works fine for adding. But to enable drag, the code (InvMenuUI) wants a m_pSelectedSlotUI or m_pFocusedSlotUI, which is done by a SCR_InventorySlotUI which needs a SCR_InventoryStorageBaseUI which is a "loot storage /container grid".
I now realize I should be using SCR_InventorySlotUI, but I only need one property and its a sea of bloat, but if I want dragging, I'll need it's few more props. Not a huge deal.
The big problem is the loot storage. My central UI elements are orphans unconnected and visually no place for this grid either.
It looks like I can just hack the requirements to bypass the need for the SCR_InventoryStorageBaseUI, but its a lot of overrides, so I figure I'll ask before I go down this long road, or before I go and try to "virtualize" with a custom SCR_InventoryStorageBaseUI ๐
@oblique vale perhaps you know?
is there a guide on how to add my own hud to vehicles?
I'm interested in the part that tells me how to get my layout to show up and how to get it from script
I added it as an scr infodisplay but onstartdraw doesnt seem to be called when i get in vehicle
Do i need a car controller component?
ok looks like I do, unfortunately the game crashes when I press play if I add a car controller component I got this to work but SCR_InfoDisplay.GetRootWidget() returns null now, even though I can see my layout on the screen
centering larger image in smaller container with clipping is not possible?
I want N to stay in the center when resized
with tiling?
yes
There was a nice way to do so in DayZ Enfusion Layout system, can't seem to find the same in the newer system here
unfortunate
You will need to do it on scripts I guess
Have the image set as
Then wrap it in an horizontal layout with
if you then tile it
You can use the padding values on the image to move it around
You can also do it with a frame as container
hmmm oke I will try that thank you
@worldly sphinx Otherwise you can script UV changes on the image widget with ImageWidget::SetUV
Which will move it around, taking into account tiling
first I need to figure out how to make it stay centered when UI is resized
then I can worry about making it work
what I mentioned will do it ๐
great, should be all I need then
still not centered
do not use size to content if you have that enabled
yeah its not enabled
tiling is set to none
Just to be sure, you want this right?
yep
did you set the fill origin to center?
this is what I see in preview
this is what I see in game
maybe problem is in parent slot?
on the image
also make sure that under transform group, in slot the size mode is auto
and in the layout widget, for clipping to be true for the clipping
its centered in preview but not in game
well, it's not centered in game and in live preview, in the edit window it is
Maybe I should just bake this out of text widgets and panel widgets instead of using an image
I can't really tell you what is going on unless I have the layout itself
Because of all the scripted chaos that is common with the components
And how some, affect their children even when appended later on dynamically
forgot what I pressed but I lost the alignment options for the horizontal layout widget
I put it in an overlay widget to get those back but it doesnt matter, it never centers anyway
FINALLY
@sweet heron hello can I use the way you have your widgets laid out for my heading compass thingy?
yay!!! scrolling image!!!
Do whatever you like, @worldly sphinx ๐
This could be a perfect FPV drone!
FPV drones are not bigger than cars and do not have human pilots sitting inside them ๐
human? shit. I was hoping it was aliens.
I piloted them as a human, but you can use those characters if you want 
I mean that this could be perfect for made an FPV drone! My bad!
no problem, people seem to be quite starved for drones, and it reminds them of drones
Cause BI chose to set the game in the Middle Ages while most people are looking for contemporary equipment and weaponry. Anyway yes, if I have to be honest it reminds me a lot of the drones from Ghost Recon Wildlands and Breakpoint, which in my opinion is a compliment! Anyway it's a nice job, especially for how it's piloted, it seems much more interesting than the helicopter piloting system, which is definitely limited.
Is there a good way to make the item preview
or is it a constant struggle to adjust x y z until the thing is the right color
got it good enough for government work
Some sort of hardcore hax0rs fixing color with xyz 
obviously preview world should include an 8K HDRi environment
What mod is this ?
is there a wiki or anywhere that lists what each subwidget in the gui editor is meant for?
for instance, PanelWidget? WindowWidget?
If you haven't seen it, this is cool https://enfusionengine.com/api/redirect?to=enfusion://ResourceManager/~ArmaReforger:UI/layouts/WidgetLibrary/Showcase/WidgetLibrary.layout
I just stumbled upon it yesterday
this is cool, especially that tabview class, that looks useful. Is the menu/background literally just an image though? lol
oh neat, there is also SCR_PagingButtonComponent, will also be useful in the future
Yea the backround is a image, mostly faded in most UI's. There is a menu widget starter, that gives you the whole base structure to start with.
These aren't just images.
https://enfusionengine.com/api/redirect?to=enfusion://ResourceManager/~ArmaReforger:UI/layouts/WidgetLibrary/Showcase/LabeledWidgets.layout
Oh, what delicious things there are here!
SCR_ComboBoxComponent "{546B1D464BC32853}" {
m_bUseLabel 0
m_aElementNames {
"Everon" "Kolgujev" "Malden" "Nogova" "Sahrani" "Chernarus" "Takistan" "Zargabad"
}
Old map names. Nothing spooky or indicative.
would anyone know what m_wList is? or what it should be? SCR_ListBoxComponent is complaining about it being null
Iโm having trouble trying to find how to change in-game faction name, everything I have seen or tried isnt working or is a bit vague. I simply want to take the โUS Armyโ faction name and make it say โUS Marinesโ instead, everything I see seems to be more for attribution of assets like weapons, loadouts, etc. Does anyone know what core or faction manager is needed to edit?
If you want to change it everywhere. you can override US.conf and change the UI Info Name #AR-FAction_US to US Marines
It's the vertical layout widget. ARe you using the {94CAAE4A601195D3}UI/layouts/ListBox/ListBox.layout as prefab?
no I dont think so, I added my TextListBoxWidget via the create panel
oh hmm
I do create my own component that inherits SCR_ListBoxComponent and attach it to my TextListboxWidget, perhaps I need to instead have it inherit a TextListBox component? I dont see any class for that though
Yo just need to dragg and drop the ListBox.layout to your layout
lemme try messing with that instead
alright, looks like m_wList is no longer null, hooray, but now I have no clue why my widget isnt being created.
Widget newWidget = GetGame().GetWorkspace().CreateWidgets(selectedLayout, m_wList);
I checked, selectedLayout isnt null, neither is m_wList.
However for some reason newWidget is null. Any reason CreateWidgets would fail with good params?
we need more context show me your layout hierarchy and whre are you calling CreateWidgets, pls
this is my hierarchy
im duplicating _AddItem to be called _AddLobbyItem from SCR_ListBoxComponent.
Only change I made to the logic was adding a bool for eanbling the added item, and a float to set the font size.
int _AddLobbyItem(string item, Managed data, out SCR_ListBoxLobbyElementComponent compOut, bool clickable, float fontSize, ResourceName itemLayout = string.Empty)
{
ResourceName selectedLayout = m_sElementLayout;
if (!itemLayout.IsEmpty())
selectedLayout = itemLayout;
Widget newWidget = GetGame().GetWorkspace().CreateWidgets(selectedLayout, m_wList);
SCR_ListBoxLobbyElementComponent comp = SCR_ListBoxLobbyElementComponent.Cast(newWidget.FindHandler(SCR_ListBoxLobbyElementComponent));
comp.SetLobbyText(item, fontSize);
if (!clickable)
comp.SetEnabled(false);
comp.SetToggleable(true);
comp.SetData(data);
int id = m_aElementComponents.Insert(comp);
comp.m_OnClicked.Insert(OnItemClick);
string widgetName = this.GetUniqueWidgetName();
newWidget.SetName(widgetName);
if (m_aElementComponents.Count() > 1)
{
Widget prevWidget = m_aElementComponents[m_aElementComponents.Count() - 2].GetRootWidget();
prevWidget.SetNavigation(WidgetNavigationDirection.DOWN, WidgetNavigationRuleType.EXPLICIT, newWidget.GetName());
newWidget.SetNavigation(WidgetNavigationDirection.UP, WidgetNavigationRuleType.EXPLICIT, prevWidget.GetName());
}
compOut = comp;
return id;
}
7th line newWidget is the one that seems to be coming back null
I also inherit SCR_ListBoxComponent and duplicate these functions into my own class SCR_ListBoxComponentLobby
I just disabled the original comp on the prefab
Ok, im out of pc now. I Will try to take a look into It tomorrow afternoon. Maybe someone can help you earlier.
Alrighty, taking a break myself but ill keep fiddling with and, will let ya know here if I figure it out
@wooden moss put a breakpoint before and check on the widget. Your creating the widget which can be empty it seems.
Can someone show me the exact place to look to take a base game huey variant and make it a separate prefab from the base games, I duplicated it off of being the override prefab but cant seem to figure out how to make it show up in the game as a separate item so to speak (sorry if I use terrible terminology)
I dont think I follow, what am I looking for with that breakpoint?
To see if your widget is being created and you're getting a pointer. And then you're going to look at that widget to see If you're indeed referencing the right one. Because it's looking and not finding the component.
I was just curious if the widget was working properly
if I was getting a pointer it wouldnt be null right?
Correct. Once it's created, it should not be null, it should return a handle to the widget. It returns null if it fails vs a "error"
yeah its returning null, kinda wish it threw an error so I had some idea why
oh wait
this layout doesnt exist, where is it getting this from I wonder?

for some reason it added some random text to the front of the real layout
Hahahah ๐คฃ Well I'm glad we solved it.
I fully agree. There's probably some reasoning behind it, but silent failures is poo/a dark pattern.
On a side note, just throwing it out there. If anyone's a. GUI expert and wants to put their mark on RF/A4, I have a series of buildings that need interfaces - and I'm holding back my urge of throwing my laptop off of a balcony. Would love a teammate on this ๐ญ๐
Can someone explain in a very simple way of what I need to do to take my copied UH1H variant I made and make it its own prefab to spawn it separately from the original (not overriding the original)
Yeah well since the resource name I was providing it technically didn't exist I guess it makes sense, totally possible it was throwing a warning about that and I missed it, I should check.
I don't think it warns, just a silent null. It nailed me as well ๐
Oh unfortunate, yeah would definitely would like some sort of notification "hey, that resource name you gave me? Can't find it bro."
Save me a few hours of confusion lmao
Weird though, don't they load and validate the resource names before creating? Youd think something would throw in that process
Cast to whatever it's supposed to be and do a null check
cast the resource name? thats a thing?
No but the prefab is some sort of class.
oh well once I attempt to create the widget, it comes back null regardless so no need to really cast right?
attempt to create with the resource name that doest really exist of course
Oh, in that case no. Just do a null check after
or
if (Resource.Load(ResourceName).IsValid())
GetGame().GetWorkspace().CreateWidgets(ResourceName);
a null check after is better
yeah I can definitely do the check myself, I just kinda figured the CreateWidgets would check or throw a warning/error somewhere in its own process of creation
But
TextWidget TitleText = TextWidget.Cast(GetGame().GetWorkspace().CreateWidgets(ResourceName));
TitleText.SetText("This Is The Title");
Will give and error when TitleText is null.
an*
If you're just calling GetGame().GetWorkspace().CreateWidgets() without casting to a class then you're doing it wrong in the first place....
I literally just realized that you're talking about this being null, correct?
yeah
really? whats wrong with using the Widget class and then casting specific widgets later if/when I need them?
You're adding them to a list?
yeah but the next line basically I cast to the specific widget, technically thats base game/vanilla code though
I just added to it
A RichTextWidget with it's text set to <username/>, when I load a menu it displays my name. Is it possible to display a particular players name instead?
I'd also like to know if it's possible to load a particular players ProfileImage as well. We have a ProfileImageWidget that isn't exposed. I'd really like to make use of it.
Widget newWidget = GetGame().GetWorkspace().CreateWidgets(selectedLayout, m_wList);
``` is fine
GetGame().GetWorkspace().CreateWidgets(selectedLayout, m_wList);
this isn't, in most cases.
but if you're doing a cast right after why wouldn't you just cast as it's created?
not sure, I didnt write that code like i said I just added a few lines to a vanilla function ยฏ_(ใ)_/ยฏ
In their case, they're getting a component from newWidget after so they have no need to cast really but, if you're gonna cast after it would make more sense to just cast as you create.
oh, my first need to actually work with replication, yippee
also realized I made my menu wrong on accident ๐ฆ
Pro Tip, do NOT be lazy and use a window widget as if it was a frame widget, you can click and drag those around. Since ya know, "window"
wonder if there is an easy way to replace those...
How do I initialize a layout for a vehicle? I'm extending SCR_InfoDisplayExtended in a script, but where would my component go? The vehicle prefab itself I'm assuming? I have an idea of how to actually draw my desired layout on a texture in my vehicle, but how do I make sure my script is working with the right layout to begin with? From what I've seen and searched, m_wRoot is how I can do operations with my layout like finding widgets, but where does that come from?
I'm assuming that it's initialized for every layout so my class would potentially run on every layout that exists - which is not a great approach. Just stumped trying to find the proper configuration for this.
text editor
Ah so that's what "window" is all about. Neat.
Finish up your project so you can save me from GUI hell ๐
soonTM, probably not what anyone wants to hear but uh, I might have created a fresh project.
My original project I created when I first started learning and have been messing with/progressing ever since so for me it felt very messy and was starting to feel all over the place.
With this project I'm hoping to avoid that, I'll be updating the GitHub once I get it back to similar functionality as the original. Which having most of the code and experienceshouldn't take long however I'm moving in about a week so it's gonna be a tad delayed
Looks easier to just right click an element in the hierarchy and select convert into > layouts > frame widget
search and replace would take 5 seconds
Oh all the gui and stuff I've done in the last week or so are still related to the new project
It's all good, I have no right to tell you what you should and shouldn't do. I'm just casually dropping the seeds of suggestion, in a vain effort to feel like I will survive the gallows of GUI hell ๐
Yeah so far it hasn't been horrible, I think I was able to create the spawn menu with a single class, and overriding a config iirc.
All the issues so far have been my own fault.
Next big step in regards to the gui is replicating the changes, zelik wrote me a bit of a step by step but sounds like he also isnt 100% that's the problem. Probably another thing I messed up lol
Well, its how we learn. Once more into the breach. I'm doing some multi-inventory witchcraft. Its not too too bad, but not fun by any means ๐
He is 100%
Ah I assumed since you said
Still not exactly sure why the host doesn't have it's UI update correctly
In that instance I'm not sure. In the game mode component/script invoker I am
I am unable to get any widgets from my custom HUD display class. The class extends SCR_InfoDisplayExtended. Root is not null but using m_wRoot.FindAnyWidget("VerticleLayout0"); is null. Not sure what is going on here, kind of lost on how to fix this.
quick question, how can I get my child widgets to adjust there size with the parent widget/s?
probably need to instead use a gridlayout or something huh
interesting, switched my FrameWidget to a GridLayoutWidget, 2 rows, 2 columns. rows are 1 and 1, columns are 1 and 10 in size
my image is in column 1
both text are in column 2
whats with that space at the end?
another question, this time a bit bigger probably.
I want am making a group layout that will house a bunch of character slots dynamically.
I want to make it possible to open and collapse the slot part of the layout so that the overall height of the group layout shrinks.
The layout size needs to shrink because it will be in a listbox with multiple instances of itself.
How do I disable the slotlist so that the height shrinks?
basically trying to make the layout go from this
to this
back and forth whenever
havent tried anything yet, but im thinking ill probably just get the parent widget, in this case group_base and setting the height to whatever group_header's name is whenever the header is clicked. Curious if there is a simple way to get the height of my group_header. Id like to think there is, I havent looked at the widget class yet just got home from work
I thought I replied to this and I guess I didn't. So the GUI should automatically expand to the content placed in If it's set up properly. Then you just refresh it when the new content comes in or the new content leaves,
well I dont believe mine are set up properly then
but heres more progress
now I just gotta force the slots into each of those groups, and add the join/leave/open/close functionality
and make it prettier
and find out where in gods name that duplicate set of roles is coming from in the top left
Pixel_corners
Pixel corners panel type broken or is it just me ๐ค
How would one move an image widget via scripting? I'm assuming I might need to nest this in another widget type, not sure what though.
when you are using for example frameslot
FrameSlot.SetPosX
Depends on what kind of widget your widget is inside of
Yeah everything I tried with FrameSlot had no effect. Kind of stumped on what I need for the configuration.
Iโm sure itโs because of how sticky images/layouts are.
if it helps at all, I was moving my map markers around like so:
bool UnitAlive = IsAlive(unit);
vector UnitPos = unit.GetOrigin();
vector UnitAngles = unit.GetAngles();
float screenPosX, screenPosY;
float mapZoom = m_MapUnitEntity.GetCurrentZoom();
m_MapUnitEntity.WorldToScreen(UnitPos[0], UnitPos[2], screenPosX, screenPosY, true);
ImageWidget m_UnitImage = ImageWidget.Cast(m_UnitMapWidgets[currentIndex].FindAnyWidget("Image"));
screenPosX = GetGame().GetWorkspace().DPIUnscale(screenPosX);
screenPosY = GetGame().GetWorkspace().DPIUnscale(screenPosY);
if (m_UnitImage)
{
m_UnitImage.LoadImageTexture(0, "{067F7C2D05D49085}UI/Textures/Icons/iconman.edds");
m_UnitImage.SetColor(Color.Red);
m_UnitImage.SetVisible(UnitAlive);
FrameSlot.SetPos(
m_UnitImage,
screenPosX,
screenPosY
);
m_UnitImage.SetRotation(UnitAngles[1]);
}
TextWidget m_UnitText = TextWidget.Cast(m_UnitMapWidgets[currentIndex].FindAnyWidget("Text"));
if (m_UnitText)
{
m_UnitText.SetColor(Color.FromRGBA(0, 0, 0, 255));
m_UnitText.SetText("");
m_UnitText.SetVisible(true);
FrameSlot.SetPos(
m_UnitText,
screenPosX,
screenPosY
);
}
What did your layout look like? Might give me a clue on how to fix
Trying to add hud elements to the game master menu, but since I built it around SCR_InfoDisplayExtended I have no way to trigger the script I attempted to tie just the hud element to the player with show in editor enabled but it wont show up but works as a normal hud and in pause menu
Could anyone tell my why my onclicked doesnt seem to cover the entirety of my layout?
Red is my header, not clickable. Green is over my listbox, clickable. Red is elements in my listbox that have their own on clicked events.
layout looks like so
to get the on clicked events I grab the component from lib_lobby_group_layout and insert a function to its onclicked scriptinvoker
Using SetGUI with any index causes my render target widget to render on all render targets despite them having different render target indexes, any fix for this or am I boned?
Dug a bit and realized I might be better off separating my meshes with render target materials into slots via slot component #1050079312977596426 message
pressed ctrl + z a few times = crash
how do I make size widget fill space between min and max?
ie. replicate block html elements that have min-width and max-width
where do I define gap size for grid layout/their children?
why does my canvas widget log spam with this error when a different widget in the layout updates?
GUI (E): DrawPolygon triangulation failed, is the polygon degenerated?
Yes 
Hello, I am trying to adds buttons on top of the inventory UI, I need it to trigger only in certain scenarios.
I've got the UI drawing but my current issue is that it doesn't overlay on top of the inventory UI but opens before it
Is there anyway to make overlays like this currently
You can see the white button in the top left, if I close it it then opens up the inventory UI
why are user actions rendered on top of dialogs?
this feels like a bug
also the multiline input has no indicator for how many characters you can type? wtf
now when I confirm my dialog I get instant crash with no logs 46f46452-261a-4b44-92f2-5beb1fdc6f83
Most menus close all other menus when they open. If you want something to display over the inventory UI then you have to make it display over the Inventory UI. If it's a menu, it's not gonna ever do that.
I got it rendering over it now as a dialog, but I can't interact with the inventory under it
Is there a way to turn off widgets if I where to override the default inventory
how do I make a multiline input field work on xbox?
the standard one doesnt show the keyboard
ok I had to do ActivateWriteMode โ
my dialog closed instead of focused on input box because A closes the window
Is there anyway to change the font size in a TextListboxWidget
Currently adding an item gets me that lmao
Nvm got it
Had to set lines
New issue
In this list box when there's a bunch of entries like this the select area starts to shift from where the text is
theres no table widget right? should I use grids?
You figure this out? I'm about to just throw image widgets on top of what I have and create a pseudo mask using that
Nope, dont get it to work
A hacky way is creating an image with desired mask affect but have the masked portions be white. After importing as EDDS, you can select the image widget and change the color to black, with blend operation. Seems to be the rest way to accomplish a picture frame.
i tryed both, Alpha in Black and Alpha in White but the Alpha did never handle the layers below.
Why is adding a hud to the character a giant convoluted mess? I can't even get it to work anymore.
lol I made my own hud for my vehicle rather than messing with the hud manager bs
Can I get rid of the doll in the loadout screen? Or would that be problematic?
Oddly enough I got one to work with a vehicle but can't for the character.
๐ค my year old koth hud still works which just had a infodisplay to the SCR_HUDManagerComponent of defaultplayercontroller prefab
would not call that a mess at all but i guess you are talking about a different context
I never added them to the player controller. I always added them to the component on the base character. Seems they have changed a bit since I last made one. All my prints indicate that my hud is showing but, it's not and I can't quite figure out why.
@ BI answer time i guess
I'll look into the player controller stuff and see about doing it that way.
random thoughts about this is about context same logic as keybinds, context will show this or that UI (ngl this if very very far memories)
One of the first things I did was create a hud for my character to go along with my metabolism system. Simple info display. Class and layout is all i needed back then.
yeah then same as koth just always show this hud whatever
It may be the same for the player controller, but it's not the same setup for the character. Not now at least
at least not in my experience recently
how do I use TimeBasedGraphWithAxesWidget in experimental?
I wanted to make my own chart but using Math3D.Curve has the side effect of it curving into wrong places like under or above axes min/max lines
alternatively is there a way I can fix this with knots array?
for now I can just clamp it but it doesnt look as pretty
like there will still be those lil bumps when I clamp it
and now the chart is lying
afaik this would be fixed in some upcoming update
cool
is there a widget that can handle pagination input for me? especially on controller
I guess I can just use action buttons and activate them on focus of the element with content
How do you link scripts to GUI.layout files? I cant seem to access it
anyone know how to get the UI widgets to update?
is there any way to add more than two slots to charachter without having the UI double itself?
any time you go past 12 the equipment slots glitch out and theres two rows of equipment slots. wondering if theres any way to get past that
why does WrapLayoutWidget grow vertically with each object added to it horizontally?
and in grid layout widget everything goes into column 0 row 0
unless I MANUALLY set it where it needs to be
any tips? I am adding items from script and want them to go left to right and wrap, and wrap layout widget is broken
I knew the exact answer to this and forgot ๐
I will refresh my mind later and tell you if no one has to before
I wrapped it in a sizelayout and am scaling the sizelayout with every child added
this sucks so I'd like something that works without me having to write any scripts
is there a quick way to temporarily lock all UI input or something? lets say I want to show a loading icon and block the user from interacting with anything until its done
Is it possible to disable DPI UI scaling for RT widgets?
I need to render it in screen space.
rn I manually compensate DPI scaling through script.
100+ widgets fun
UIWidgets.EditBoxMultiline doesnt work in config editor?
need some kind of sortable table widget
editbox widget has no minimum length for validation
I wish I could set colors in UI editor to a constant available in script
Anyone know why I can't import PNG images that only have black? Importing images with different colors and changing to sRGB works fine. If I add a little white to this it works fine. But if the only color is black it turns the whole image black. Below is an example. In the photos window you can see what the png should look like.
Try increase ConversionQuality, it's some times messed up with transparency.
why dont configurable dialogs stack?
I mean visually, only one seems to be visible at a time
In this modding series, will GUI creation be covered?
it is lacking on the biki, from what ive seen anyway
would be cool to have docs on how to do all this nonsense correctly
because I feel like I'm pushing circle shapes through triangle openings successfully somehow

Totally agree on that
Not an option
Yes
still need help on this btw
also how do I set widget tooltip from script
Has anyone seen this error before? It happens after I run my game once, then recompile, then play a 2nd time.
Hi does anyone know of any tutorials out there to help with making gui I'd prefer them to be as simple as possible because when it comes to gui stuff I'm a fucking moron I can make it even show up never mind work with my scripts
widgets sometimes resize themselves depending on settings, for example edit box component is bigger when it does not use label, and combo box widget is wider but not taller when set to not use label, annoying inconsistency
content padding shouldnt change based on whether there is some text on the left or not
any tools out there that can help me generate an atlas and imageset with quads defined? no way I'm defining quads manually for 100 icons its built in nvm
so padding in UI editor is actually margin
why do images with imageset icons scale like they were nearest neighbor in play mode but filtered in GUI preview
Some script probably sets the WidgetFlags.NOFILTER on the widget
How do I import a png with opacity
Trying to import this and it turns into this
Got it
Just changed my export settings for the PNG
Does it matter that much? I haven't thought about trying to use semi-transparent overlays but I have battled the .edds system to do masks for my layouts haha
For gui modding not so much but, if you use a png for BCR/NMO textures good luck trying to alter the roughness/AO, in photoshop or gimp.
Ahh try using a resolution divided by 2
1024x512 for example
So i know there is SetRotation() for ImageWidgets but is there any member for SetPosition() for a widget?
I figured out you can through a CanvasWidget however it seems it doesn't have an alpha channel?
Top left regualr image widgets, middle image drawn in a canvas widget
Nvm it was as easy as
FrameSlot.SetPos(compass, 500, 1.5);
Is there a way to hide parts of a progress bar widget and customize the shape?
Hi everyone!
Iโm facing a small issue with my UniformGrid: the item on the right gets "cut off."
Does anyone know how to fix this?
Thanks in advance! ๐
Perhaps posting in the right channel will yield an answer as this has nothing to do with modding gui.
I looked around for the right channel. Perhaps pointing me in the right direction would make your response a little more helpful
appreciate it! I didnt see those channels before you linked them
So I've got the map drawing but I can't seem to manipulate it in anyway
Any idea
void OpenMap()
{
GetGame().GetCallqueue().CallLater(OpenMapWrap, 0); // Need two frames
}
void OpenMapWrap()
{
BaseGameMode gameMode = GetGame().GetGameMode();
if (!gameMode)
return;
SCR_MapConfigComponent configComp = SCR_MapConfigComponent.Cast(gameMode.FindComponent(SCR_MapConfigComponent));
if (!configComp)
return;
MapConfiguration mapConfigFullscreen = m_MapEntity.SetupMapConfig(EMapEntityMode.FULLSCREEN, "{1B8AC767E06A0ACD}Configs/Map/MapFullscreen.conf", GetRootWidget());
m_MapEntity.OpenMap(mapConfigFullscreen);
}
Is there a way to rotate a group of widgets?
I tried putting them in FrameWidget but don't see any option to rotate it
Me thinks only image and text widgets can be rotated
Well that's a boo boo. Thanks
I wonder if you can put widgets inside an image widget 
Is there any documentation on creating lists with custom items?
River is back, curious to know what are you cooking
I think some kind of MFD
Yeah, but what he used the MFD for is what interests me.
๐
"OUT", many bugs, probably he is playing more Stalker
stalker probably has 5x as many bugs tho
I was going to guess that you're working on the UI for your old Javellin's screen, but that screen was already done, so either he's making an MFD for a solo vehicle of his own or helping the RHS on the Venon chopper.
that javelin was cool
And the modern optics ๐ , He was the first before you to do the Magnifier, Old good times
@rotund hinge hello ๐ was just wondering if you had any plans on adding tiger stripe to your planned camos on your camo pack? Apologies if this is the wrong thread.
This is the actual thread #1246846132194119720 As for the tiger stripe, yeah, can do.
Hello fellow creator, i came here to seek for help regarding UI layout for a potential plate generator to help fix the script from the everon life team
here my probelem in order to be clsoe to the licence plate prefab from the vanilla game i want to change the font used in my layout
For that i have see that yo ucan set the font in the layout text propreties but it seems to only take .nft file rather thant my ttf font format
things i have tried:
- use the improt button from the WB to import the .tff and hope that it onvert to .nft (did not work) (instant error with log)
- import manualy the font by placing it inside my mod foler (i see the font but still cant put it in the font properiteis because it take .nft file
i have attached screenshot in #1308926193109700609
Thanks in advance
โ Solution found by bacon (it was the generate bitmap in my ttf font to create the nft)
i use the previous message to ask if any of the bohemia team did know wich font is used to replicate the palte prefab i stil dont have find the perfect one ^^
i have found this one also https://fr.ffonts.net/License-Plate.font.download
edit box changes background color on hover even when background color event is disabled and background magically appears in the widget when I disable the background widget
got it it was enabling itself from component
when dropdown is used with keyboard or gamepad focus goes back to nothing instead of remaining on the dropdown
can recompiling scripts stop expanding my whole UI widget hierarchy? incredibly annoying
actually I dont even know what it is, I collapse it and then it opens itself shortly after
heyo
anyone know why changing the font size in a overriden .layout file doesn't actually change the font size ingame? it does work for opacity, padding and all that that but fontsize just doesn't want to cooperate lol
Changed by script at some point then
yeah figured as much.. gotta go and find the script then I guess ๐
can someone help me? im trying to give enemy ai (ussr) bigchungusShotguns and it keeps giving me this message everytime i pump the shotgun, can i ignore this?
Hello,
it's there a possibility to find an ui source (.layout item in resource browser) with debug menu inside the world editor ?
Any idea why the default AddItemWithIcon doesn't let me select it?
m_cPlayerListBoxComponent.m_OnChanged.Insert(SelectPlayer);
I've added this when the menu opens but for some reason it's not calling the member?
copy pasting widgets in layout editor doesnt copy their attributes
not all of them anyway
I added the list box component to it, works fine on the list box to the left with my own custom items but the default one isn't working for some reason
Its cause it was updating on each frame
I put a panel widget inside an overlay widget and its invisible wtf
if the panel has bigger z order than text widget it shows but if text widget has bigger z order than panel it doesnt show
why does this work in other layouts but not this one?
ah ok it breaks when its nested under a button component
but now border and background inside button are not shown on hover, I give up
Folks, how do I draw an ellipse/circle on the UI?
use an image or use canvaswidget I guess
vertical and horizontal align of my layout is ignored when it is added to a dialog? wtf
then after adding it to a dialog content area
me when UI in reforger
I have several words for the UI dev team
text widgets do not support break-word wrapping?
It did not work with the canvas widget. Surprisingly it can not draw circles. The only option I found was using an ImageWidget with a round mask.
how do I set tooltip of a widget from script
seems like there would be some SetTooltip function idk
.GetContent().SetMessage("message") ?
hm this doesnt compile
compile in your head or in the workbench? lol
yes
works for me void Foo() { SCR_ScriptedWidgetTooltip testTooltip; testTooltip.GetContent().SetMessage("DOG"); }
okay but lets say I have a Widget
I want to give it a tooltip from script
wat do?
If you look at SCR_FilterPanelComponent it does something like this override void HandlerAttached(Widget w) { SCR_ScriptedWidgetTooltip.GetOnTooltipShow().Insert(OnTooltipShow); } void OnTooltipShow(SCR_ScriptedWidgetTooltip tooltip) { tooltip.GetContent().SetMessage("DOG"); }
this works if the widget has a tooltip defined in the UI layout, which is fine, but I was hoping I could dynamically create a tooltip from script for a widget I am also creating dynamically
do we have to make our own debounce (ignore rapid presses) function for UI buttons?
I think so because
Hi, I'm trying to draw a custom shape on the map. I created the required layouts and script components. The shape renders, but it overlaps the task icons.
https://s3.amazonaws.com/i.snag.gy/SipVYj.jpg
How do I fix that and move task icons above the custom shape?
does anyone know how to make sure that popup window will be always drawn on top overlapping the icons?
seems that you're puzzling essentially on the same layering problem, have you found the solution?
add it as a child of something that is not on the same level or under the container that has those icons
alternatively give your window a priority of 999 (Hacky)
you mean in the layout? I'm using the slightly modified BaseElement.layout from the conflict
you can think of priority as z-index from CSS
and having things on the same parent being the same as in the context of html and css
yeah
You can also change it in code
same thing for you
Both yes and no. My class is a descendant of the SCR_MapUIElementContainer.
class My_Class : SCR_MapUIElementContainer
{
override void OnMapOpen(MapConfiguration config)
{
super.OnMapOpen(config); <<--draws tasks UI
DrawMyStuffOnMap();
}
}
I can technically arrange my UI elements' Z-orders correctly. However, because super.OnMapOpen(config) was called before DrawMyStuffOnMap(), there are still render issues..
One would ask why won't I write:
DrawMyStuffOnMap();
super.OnMapOpen(config);
and have my stuff drawn on the map "under" the tasks.
The answer is inside the BIS code of super.OnMapOpen(config);
Widget child = m_wIconsContainer.GetChildren();
while (child)
{
Widget sibling = child.GetSibling();
delete child;
child = sibling;
}
To paint its own items, SCR_MapUIElementContainer removes everything off the map when it is opened.
In response to your question, I am aware of what I need do to get things to function, but I am unable to do it without rewriting an amount of BIS code.
๐คฆโโ๏ธ
So, the root element has z order 1 (I guess z order affects the things only in the same container, so it means nothing for multiple instance of same layout?), text wrapper/container has 0 z order index, so, to add it as a child of something that is not on the same level or under the container that has those icons - so, I'm trying to wrap my head about it ๐
so, to add as a child of something that is not on the same level (as icons)
eaxct same behavior as in HTML/CSS
only difference
Is that on layout widgets (Wrapper, Scroll, Grid, etc) priority will handle it's arrangement there, to some extent
So the z-index behavior is not applicable on direct children of those
In that case it serves as order index
the strangest thing is that sometimes it works and sometimes it doesn't
interestingly, previously services popup window in conflict was a widget c with z-index 10 created with a overlay widget as parent, now it's already part of a base element icon and it works just fine
and more interestingly, it doesn't work with the conflict BaseElement.layout too, and I don't see any manipulations with the z-index in the widget components either
Any way to preserve order of elements when extending base game layout? Trying to add a button to pause menu but it always ends up at the top.
Same as the others I answered to in here lol
Priorirty field
omg I kept calling it priority, as in old enfusion
Z Order I meant
It does not work, the element has 0, all vanilla entries have 0 too
If I have 0 my entry is at the top, if I have -1 it's at the top too, with 1 it's at the bottom.
While editing the layout I've added my entry in the middle.
so I guess the only way would be to also edit the ZOrder in vanilla entries in my prefab override
What kind of widget are they contained in?
Vertical layout
I put my AFM_ServerSettings widget in the middle of the list, and after every restart it comes up back on top.
So I guess it's some sort of an issue with merging of the layout files?
Its the same thing i told arkensor on that eeplu way back then
Merging of container/config files is always append or replace
Moving things around is not a thing
Layouts use the container system
That is the same system prefabs and config files use
If you check the text on the layout file
You will see that is an array of containers
So you wont be able to do what you want except for either messing with the z order or slapping a scripted component that does it for you by moving the widgets around
How do I load my healthbar layout i made onto my screen and make it work? I don't really want it to be an entity, as map changes will make it disappear
mod the map GUI layout and create a container for your stuff that will always be on top of everything else - then draw stuff into that container
What changed in the update to GUI that made panel widgets invisible until their Z Order is higher than 0 despite being of parent's size?
Which changelog entry is related to this?
I now have a lot of my UI broken and zero motivation to fix it because I have no idea wtf is going on
Could you share your .layout file or provide more context ?
The context is this worked before the recent update and it does not work after
So something changed in rendering of those elements or somewhere related and I'd like to know what
Whats the hierachy in this layout ? Is this panel widget a child or a overlaywidget for example ?
I doubt someone will know during the holidays, I cant reproduce your issue with just a framewidget, panelwidget and textwidget. Hence why I asked for more info like the layout to at least see if its a combination of specific layers causing it (for example)
here you go
Drag a TextWidget into Frame0
Then panel appears
Remove it and panel disappears
I am 100% positive this worked before the update in a way where the panel would Just Workโข๏ธ
(using reforger experimental)
I can see the red panel just by opening the layout, adding or removing a text widget doesnt make the red panel invisible.
I am missing something ?
This means it is a bug on main branch that is fixed in exp
So it gives me some hope
Thank u 
No worries~
I'll just wait until update before continuing because some other things may be borked also that I don't realize yet
and its christmas anyway :b
Can I actually just draw/render onto a specific material in a prefab or do I have to work out the correct position and start rendering from there?
I have an RTTextureWidget created in a layout but I can't actually see where I "stick it on"
It can be done through RTTexture and RenderTargets but it is a bit difficult to explain quickly
If there's any resources around I'm happy to read
In your material (emat) go to the BCR for example and in the name of the texture you can select rendertargets
Once you have that setup you need to call the relevant functions in script that I forgot the names of
SetGUIWidget ?
perhaps
Had to manually edit the file but seems to be working, thank you
@eager hollow
#enfusion_scripting message
Also read here and below
#enfusion_gui message
Hello guys, trying to create Display on player spawn ( Like HUD ), can u give me some advices where scripts of opening display need to be called?
Check the pinned message. This would be for a menu. There are also info displays, for example your gun's ammo count
#enfusion_gui message
Done this with another way, overriding of OnStartDraw event, and adding in DefaultPlayerController my class with layout
๐ teach masking entire UI like how masking on imageWidget works
Teach how to use UI editor without crashing
Teach how to report crashes so they get fixed faster XD
I think my weakest area is understanding how the postion systems work for widgets.
It's not very clear. I get it's the parent based etc.
How:
- Make a widget that always takes 20%x20% of the screen
- Widget and text that scales correctly with screen sizes
I like how I can setup a slot for my widget in a layout prefab and then when I add the layout prefab to any widget it changes the slot it uses

Or when I save, then WB crashes, I open my project again and my supposedly saved changes are reverted
I also like the feature that crashes WB when I copy something 5% of the time
Or UI layout hierarchy not being collapsed and just opening everything randomly
Don't let me into that boot camp
๐
They could really use a UX/UI pass all over the workbench (hopefully at least for for A4)
Just let UX/UI team make something with workbench and then improve the UX
But the devs are using it, do they have special dev version where none of this happens?
Special dev version with advanced interface and ease of access, 0 bugs ๐
The UI should automatically scale as long as it isnt a wierd super stretched resolution. If for your resolution a widget take roughly 20% of your screen it should also take 20% on a 4k monitor. Same goes for the text
In this example, the UI scale automatically based on the resolution
I think they are talking mostly of when parent slot takes over and how to avoid it
Why can i not delete these buttons? I've overridden the pausemenu layout but can't modify the existing buttons
Probably best you can do is Override the layout and then set it to not enabled or not visible. If it's controlled by script it might override it, so in turn you could override the script.
Both approaches break the APL-ND license of the mod though but that's how you'd usually do it.
basically i just want to add and remove couple of buttons. But we use your server admin tools as well
Well the Server Message and Admin Tools buttons are controlled by scripts in the mod. The Server Message button doesn't appear if your configuration file has no server welcome message defined (empty message) I think.
๐
unless you replace the layout completely with your own mod agnostic of any other mods installed, lmao
Is it possible something with the game master UI "AttributeCategories > Character.conf" is not right?
I'm using it for some additional GM stuff but somehow everything below the vanilla settings will not be saved/loaded when using the save state of GM.
The "AttributeCategories > Group.conf" which i'm using too works properly and changed settings added by my mod get saved and loaded properly by using the GM save states.
This:
Maybe i should have ask in configuration... ๐คช
Did BI mess up? Y does the latest mbc video link in announcements say modeling? But yet it should be for GUI 
nah, the video uploaded is from the mbc before the gui one
gui video will come soon
Hey Maria,
Will you send a ping when this becomes available on Youtube. Very excited to see this one
Well, I enjoyed the bootcamp, but I can not get a scoring system off the ground.
where are you stuck ?
Initializing the hud. I have it all written out and stuff, but can't initialize.
'test'
test
`class KOTH_TeamScoreHUDClass : ScriptComponentClass
{
};
class KOTH_TeamScoreHUD : ScriptComponent
{
protected Widget m_Root;
protected ref KOTH_TeamScoreDisplayObject m_TeamScoreDisplayObject;
// Initialization method
void InitHUD(IEntity owner)
{
Print("Initializing HUD...");
// Load the layout
m_Root = GetGame().GetWorkspace().CreateWidgets("Scripts/UI/Layouts/TeamScoreHUD.layout");
if (!m_Root)
{
Print("Failed to load layout.");
return;
}
Print("Layout loaded successfully.");
// Initialize the display object with the root widget
m_TeamScoreDisplayObject = new KOTH_TeamScoreDisplayObject(owner, m_Root);
if (!m_TeamScoreDisplayObject)
{
Print("Failed to create display object.");
return;
}
Print("Display object created successfully.");
// Example initialization with a faction
Faction faction = GetGame().GetFactionManager().GetFactionByIndex(0); // Replace with actual faction
if (faction)
{
m_TeamScoreDisplayObject.Initialize(faction);
Print("Display object initialized with faction.");
}
else
{
Print("Faction not found.");
}
}
// Method to update the score
void UpdateScore(int score)
{
if (m_TeamScoreDisplayObject)
{
m_TeamScoreDisplayObject.UpdateScore(score);
}
}
// Method to update the player count
void UpdatePlayerCount(int count, bool in_zone)
{
if (m_TeamScoreDisplayObject)
{
m_TeamScoreDisplayObject.UpdatePlayerCount(count, in_zone);
}
}
}`
what is calling InitHUD ?
InitHUD is the name for the debugging process.
But, when I run the game, nothing pops up in log or anything.
Allow me to simplify my question. How do you initialize a hud in the engine?
- Create your HUD layout
- Create a class which inherits SCR_InfoDisplay
- Add an entry to SCR_BaseHUDComponent to the character base prefab
- see image
Got it, thanks!
You'll have access to these base events from BaseInfoDisplay:
event protected void OnInit(IEntity owner);
event protected void UpdateValues(IEntity owner, float timeSlice);
event protected void OnStartDraw(IEntity owner);
event protected void OnStopDraw(IEntity owner);```
As well as a few other functions in the SCR_InfoDisplay
I'll keep that in mind.
Hey! I got it to work, Thanks!
FYI: if you want vehicle specific HUDs check the same component on vehicle prefab
Hi guys, is it possible to have a EditBoxWidget in which you can type in different lines, basically like you know it from any textfield.
Once you reach the end of line it jumps into the next line or when you press Enter
I did this somehow in GM editable Intel mod but dont remember how
you mean the limits?
I could download the mod if its on the ws and have look
Thank you for the Info
This Modding Boot Camp seminar was originally held on the Arma Discord Server on January 9th, 2025.
TIMESTAMPS ARE WIP
0:00 - Introduction
00:20 - Presentation
1:10:08 - Outro
Modding isn't just about custom assets. With Arma Reforger Tools, you can completely modify widgets, HUD, menus, and other aspects of the user interface!
In this...
Thank yooou!
I have a question and Iโm hoping someone can help.
A few friends and I are creating our own third person camera mod and we decided that we wanted some custom crosshairs to go with it.
Unfortunately, weโre at a point where we canโt figure out which one of the SCR_InfoDisplayโs is the SCR_Crosshair. Can anyone give us some guidance?
Does anyone have an idea how to save settings for a custom submenu on a server enviroment? Is there a specific way to do this since AR also saves the settings from the submenu and they are permanent
@worldly sphinx
HUD manager component or whatever
SCR_InfoDisplay classes
Off the top of my head
โค๏ธ
{80CC0413DDBDFCB9}Configs/ControlHints/AvailableActions.conf
Whats the best way to make UI widgets useable for Console Players? 
Its smth about the OnFocus() and the Navigation (eg. Escape) right?
Button widgets work out of the box
You just move between them with left stick or whatever
It works most of the time
Yeah im just trying to make them "visible" so the Xbox user can see where hes navigating.
Is it just e.g the ButtonComponent in which Focus and the color is set up?
I thought I have to implement some sort of logic into my ChimeraMenuBase
- im using EditBoxWidgets and when im adding a SCR_EditBoxComponent it gives me this error
SCRIPT (E): Virtual Machine Exception
Reason: NULL pointer to instance. Variable 'm_wBackground'
Class: 'SCR_EditBoxComponent'
Function: 'HandlerAttached'
Stack trace:
scripts/game/UI/Components/WidgetLibrary/SCR_EditBox/SCR_EditBoxComponent.c:127 Function HandlerAttached
you need to use the layout templates
There's a layout for a button, you drag that layout into your layout
same for editbox
gotcha, will try that, also makes kinda sense lol
I have to rename the editbox to get the text from it, otherwise the second editbox will have the same name.
But It wont let me. If I duplicate the prefab and change it in there, it wont let me type anymore.
Any smart tips?
how to use this am confused
Can't rename child of a prefab.
But can you rename the prefab?
If you are looking for him in the script, find the parent first, then from there the specific button for example
Look at the vanilla ones for a bit, the one the in the picture is VEHICLE_EXIT
Then it has conditon configs, which if they are true, will show the VEHICLE_EXIT action on the bottom left
I can rename the root of the prefab, thats it. You mean like searching for this renamed root and go from there to the child?
GetActualEditBox(string parentName, string childName)
Widget parentWidget = m_wRoot.FindAnyWidget(parentName);
Widget childWidget = parentWidget.FindAnyWidget(childName);
return EditBoxWidget.Cast(childWidget);```
You can just look at the vanilla code in the script editor
I suggest looking at menus that use layout templates like the field manual
Ahh your case is pre-defined.
Yeah you can just do that function you posted
I just did and it worked, thats why I posted it in case someone in the future has the same problem and searches for it ^^
Hi there, I'm trying to emulate what the play button does for an item within the PlayMenu of the MainMenu. However I'm having trouble finding where the it actually tells the game what to do when the play button is pressed. I'm using the PlayMenuTile_Featured.layout file, however the play button within it doesnt actually point to anything. I'm super confused and any help would be greatly appreciated!
look for name of actual buttonwidget (top right). Look for this inside the scripts
Which scripts? There arent any pointed to within the layout.
just search for the name of the widget inside the game scripts (entire solution) and have a look where to find the name
Ok ill check tomorrow, but how does the widget/layout know about the script of it doesnt have any pointers to it?
layouts are linked to classes trough an config file
chimeramenus I think is the name
What would be the process of making the screen black for a couple of seconds?
I tried looking up in the medical system but could not find how BIS did it
Does anyone here know a way to do that?
On what event do you want the screen to go black?
you could use an InfoDisplay or a ChimeraMenu to display an Image (blacked out) to the player for a certain amount of time e.g 5 seconds and close it automatically after the timer run out.
After a certain event triggers it.
I have a useraction that teleports someone and I wanted to do like a blackout, play a sound of a guy dropping in with a parachute and then the screen comes back
It would be awesome if the thing would fade but maybe that is to much to ask for
All executed locally ofc
I think its possible to "fade out" probably a wonky way of doing that but my spontaneous idea would be to use an imageset of eg 20 pictures, getting less transparent each time. You could do it with an SCR_ImageFrameAnimationComponent
Inside PerformAction() open the UI and play Sound xy. This is def possible
I think its smarter to put the timer and fade out in front of the teleport, so the player doesnt see where hes teleported before its blacked out
agreed
i made this ```class BlackoutMenu : MenuBase
{
override void OnMenuOpen()
{
Print("OnMenuOpen: menu/dialog opened!", LogLevel.NORMAL);
Widget rootWidget = GetRootWidget();
if (!rootWidget)
{
Print("Error in Layout Tutorial layout creation", LogLevel.ERROR);
return;
}
}
override void OnMenuClose()
{
}
}
modded enum ChimeraMenuPreset : ScriptMenuPresetEnum
{
BlackoutMenu
}and then in the performaction i have
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
{
if (m_wDisplay)
{
delete m_wDisplay;
return;
}
GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.BlackoutMenu);
}```
its just a layout where the rootframe color is black
little bit based on this https://community.bistudio.com/wiki/Arma_Reforger:Layout_Creation
cant get it to work
did you override chimeraMenus.conf from base game and set up the menu?
yes
like this
when you perform the action what does the console say?
is there a specific widget i need to use?
WORLD : PostFrame
ENGINE (E): Can't find menu preset with ID = 56
GUI (E): Can't open menu 'unknown preset'```
rn your not using any widget, but im trying to figure out if set up the other stuff correctly
yea thats what I thought lol
one sec
xD
your also using (inheriting from) MenuBase instead of ChimeraMenuBase
ah it worked and i have a little black thing in the top left corner now
but i think it is better to do a displayinfo bc if i do a menu i have a mousecursor in screen
now set up ur UI correctly and then setup a timer or for debugging a close button to close it again
you probably can turn that off, not sure tho.
Generally I would say using InfoDisplay is for UI thats shown most of the time to the player and ChimeraMenus for "one time" events. But maybe im just alone with this thought and its not right lol
if ur using InfoDisplay make sure to set it up in the HUD comp on the player
๐
I actually used a widget so I could change the opacity to create a fade-out and fade-in
Thanks for the help
Could someone explain how an entire submenu is "instanced" within a layout from just its component and a pointer to the item layout? This screenshot shows it. When I try and duplicate the setup with a parent that has the component and a child, literally nothing happens.... The parent is an overlayWidget and the child is a gridLayoutWidget
I have a SlotMarker that I want to change the colour of using:
which works on initialization, but doesn't run after cap, despite being called.
well, everything but the actual line where the colour changes seems to run fine
ie mapMarkerCustom.m_eMapMarkerColor = SCR_EScenarioFrameworkMarkerCustomColor.RED; isn't running after init/on capture
figured it out -- I had to delete and re-create the map marker to update it lol
(using a modded method on the map marker class that called both funcs since one is protected)
Has anyone or does anyone know the .layout file displaying the task markers on the map?
This one ? TaskElementNew.layout
Ill check it out.
Thank you. I have no idea why I didn't try that one. I overrode every other one.
No worries, tbf I havent worked on this feature so I wasnt sure myself xD
Has anyone got any tips/youtube channels on where the hell i can learn how to do gui stuff
You can probably start with this video
https://community.bistudio.com/wiki/Arma_Reforger:Layout_Creation
This explains the basics
Now all GUI styles are broken
All I want to do is get rid of the opacity change when my panel widget goes disabled :/
how can i make a background image that is always the size of the parent?
also is there a description of what each of the layout widgets does? not seeing much self descriptive docs in the code
thanks (sorry for late reply got muted for 3d for offering to send feet pics to community manager)
e.g overlaywidget, for the anchor go into the presets and use the one that takes up the whole space or just drag and drop the overlay urself
- add an imagewidget to the overlay
- inside slot, inside the overlay make sure offsets are 0
- add your image to the image widget in the texture tab thing
Size to content doesnt work with text widgets if they are wrapping. Only with explicit newlines.
Seems like widgets only extend horizontally when they feel like it
Can you make FT ticket?.
I will point it to enf directly.
You probably have to force update the parent
Be advised OverlayWidgets are kinda broken, if you are unable to make this layout visible insert the overlay inside a frame...
Yeah I had some issues with panels etc in them but they are fixed in 1.3 apparently
Hmm, might be worth checking on monday if I can uncurse my layouts
Is there a way so when a menu is open no other displays get shown, like the chat menu and such
Make your menu full screen and show it on top lol
For example on main branch
On 1.3 exp
Same project no changes
Of course there's also a background imagewidget there that doesnt work at all
Hmm it was a different issue for us, but it match the level of brokenness we had to deal with
All them hours will be worth it, looks ๐ฅต
How do I turn off the feature in UI editor that randomly expands the whole hierarchy to troll me?
bump
How do I make parent element ignore size of child element?
Seems like my framewidget expands itself to the size of a size widget inside that I want it to ignore
Ok wow my size layout widget is not actually sizing anything
wow my framewidget had unidentified slot
I had to notepad it to an AlignableSlot
How do I make it full screen
send me your layout if you are still having issues
You have a few ways you can achieve this.
In your layout you can specify which slots to use/display. (see HUDManager_Root.layout and RespawnMenu.layout for examples)
Or if its causing issues for you and how you designed your mod you can also tell specific layers to be hidden. Ideally I would do what I explained above, but in case if you have to go option B here you go. This is one of the old (scrapped) systems so it might not work as intended
// ================================================
// When you open your menu
SCR_HUDManagerComponent hudManager = GetGame().GetHUDManager();
if (!hudManager)
return;
// Hide all (assuming your layout isnt dependant of the HUD Manager)
hudManager.SetVisible(false);
// OR
// Hide all layouts excepts the ones meant to be always on top
hudManager.SetVisibleLayers(EHudLayers.ALWAYS_TOP);
// ================================================
// When you close your menu
SCR_HUDManagerComponent hudManager = GetGame().GetHUDManager();
if (!hudManager)
return;
hudManager.SetVisible(true);
// OR
hudManager.SetVisibleLayers(-1);
// ================================================
How do you make a UIinfo display when in a vehicle?
How do you make a UIinfo display when in
I've done something similar to this, however when making the HUDManager not visible it still keeps available actions and the warnings at the top right.
I've checked to see if there's another menu open from the camera and it returns nothing.
There can be multiple workspaces

If you do GetParent() on the workspace you got, then you will see another widget
What's the reasoning behind setting the visibility of the workspace to 0 completely breaking the game?
I am not sure if it still works that way. But before Enfusion, with the older engine Enforce. Even the game RT was a widget.
And you could access it that way
That it makes no sense
No
As I said, there can be multiple workspaces
and a workspace within a workspace
It's just a way to handle some logic for child widgets
Really fucking complicated haha, I see why there's no way to consistently hide the ui
It's just another widget
Just go GetParent() until you find the upmost parent
Just beware, that when you reach that, there are other widgets under the same level
But iirc it's only debug widgets
But doing anything on the workspace literally bricks the game
Like no input control, it flickers in and out
When you set to 0.0. Iirc it stops being processed
Works fine in the workbench but completely breaks the game in dedi tools
So all inputs handled through it are gone
Hmmm
Visibility is the same way I'm guessing
I wonder
Frame.SetPosY(WorkspaceWidget, -1920)


Why do you want to disable the entire UI, including the game settings and all that?
Photos in my spectator menu
We might actually disallow that in the workshop, unless blocking your mod to PC.
Wasn't there a game setting already for this?
ArmaVision
We run pvp so we don't want players having access to that
but here
m_InterfaceSettings = GetGame().GetGameUserSettings().GetModule("SCR_InterfaceSettings");
I can just manually set and disable the interface settings ig
You could copy it
and restrict it
No need to reinvent the wheel
How would I open up arma vision then, it seems quiet convoluted to open cause it seems to be merged with the editor
They are separate things, they just use the same free cam stuff
uh, nothing game breaking can be done from ArmaVision

