#enfusion_gui

1 messages Β· Page 6 of 1

jaunty sage
#

yep

#

then running

devout cedar
#

You need to relaunch your Workbench

jaunty sage
#

i will attempt this

frozen lynx
#

code seems to be great

jaunty sage
#

this happened on load

#

gonna keep going

devout cedar
#

Okay what is the path

#

Of you config file ?

jaunty sage
#

same as vanilla

#

just in our mod

devout cedar
#

Did you right click and press "override"

#

Or just C/C

jaunty sage
#

hm that might be it

#

you should just dupe right?

devout cedar
#

I right click on the original config and i press "override"

frozen lynx
#

just right click and "override"

jaunty sage
#

imma try inherit

#

i heard from arkensor that override might explode

gleaming notch
#

So duplicating is wrong

devout cedar
#

Maybe just create an other config file

#

Don't duplicate

#

Or override

#

in Config/System

gleaming notch
#

We keep trying, thanks for the help guys!

devout cedar
#

On my side the override work, my menu has been register

frozen lynx
frozen lynx
gleaming notch
#

Ignore the comma XD

#

DayZ things

#

We just tried something

frozen lynx
#

you should have this :

modded enum ChimeraMenuPreset : ScriptMenuPresetEnum {
    VehicleSpawnerMenu
}
#

expect from the comma

gleaming notch
#

we should not need to add the inherited class

#

oO

#

when its modded

frozen lynx
#

"It's work on my machine" issou

gleaming notch
#

I mean yes you can do it but its not needed

#

At least that's how it worked in DayZ but who knows..Everything is different.

#

We got it!

jaunty sage
#

yeah override config was issue

#

you dont need to inherit on modded classes

#

ty dolores!

frozen lynx
#

Oh ok, that's nice πŸ™‚

#

thanks to u BlankieThumbsUp

gleaming notch
#

❀️

median sigil
#

thanks you all my menu is open !!! goood ❀️

wicked wagon
#

Hi all, does anyone have a barebone example of creating a custom menu/UI? Not finding much docs and no samples either.

gleaming notch
#

The workshop has 2 mods from ex0

#

Take a look at them

faint anvil
#

wow you solved my issues as well

#

I have to restart as well?..

vagrant pier
#

So from my understanding to make a simple menu
You use the layoutTool, To make your .layout #enfusion_gui message
Then Override chimeraMenus.conf from ArmaReforger
"Open" it and press the + Here add your .layout and a class
To open the menu: GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.TestMenu);

vagrant pier
frozen lynx
#

I put this code in my ScriptedUserAction, just before the class definition

#

Because I use it in my ScriptedUserAction

vagrant pier
# frozen lynx I put this code in my ScriptedUserAction, just before the class definition
modded enum ChimeraMenuPreset : ScriptMenuPresetEnum {
    TestMenu
}

class GRM_OpenTestMenu : ScriptedUserAction
{
    override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
    {
        Print("Hello Please open my function!");
        
        GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.TestMenu);
        
    }
    
    
    override bool CanBePerformedScript(IEntity user)
     {
        return true;
     }
}```
#

Something like that?

frozen lynx
#

But, I think the best should be in scripts/Game/UI/

frozen lynx
vagrant pier
#

Still cant get it working....

frozen lynx
#

Did you config your chimeraMenus.conf ?

#

and restart your editor ?

vagrant pier
#

and you still open with GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.TestMenu); ??

frozen lynx
#

Yes

dusk finch
#

weirdjet just released a nice basic compass gui mod, like a quarter of the way towards functioning sthud πŸ˜›

knotty hound
#

i created a layout, and opened it via CreateWidgets, but the dialog does not have focus, anyone know a workaround? I looked into it more, and i found that there is the menupreset stuff, is it actually the only way?

olive isle
#

Maybe I'll have a little more luck here, can anyone help me understand how to properly use the string table editor for localization? #reforger_workbench message

queen steeple
#

any idea of how to add label type for EditableEntityCore.conf? cuz atm i use FACTION_NONE and it works but i would like to add my own 'tag'

tulip quartz
#

Could layouts be used as texture? Like GUI on surface.
Asking becuase PIP scope uses that

swift cosmos
#

I heard thats doable but don't know how

teal hollow
#

to create a bank system for an rp server

#

but i don t know how to create

craggy halo
# tulip quartz Could layouts be used as texture? Like GUI on surface. Asking becuase PIP scope ...

Yes PIP is using that. You can take a look a the layout with RTRenderWidget or something like that, and then inside script you can do SetGUIWidget, which should render your layout in the texture. This is just to point out where to search. But if you find something shares it here. It can even maybe added to the official documentation at some point if people want to do some display or something.
And you can check inside {0091FAECFC169506}Assets/Weapons/Attachments/Optics/ARTII/Data/Optic_ARTII_PIPMaterial.emat they are using $rendertarget to be able to display the layouts onto the texture itself

strong karma
#

This is a really dumb question, but is there a better way to make a rangefinder reticle than to manually test character heights & bullet/projectile drops ingame?

dusk finch
#

theres a mod by weirdjet that lets you put a marker on the map and it creates an on-screen in-game objective marker with distance value

strong karma
teal hollow
#

no one know how to create a gui?

vagrant pier
#

In my GUI How do i check if a button has been pressed? via ActionListener(s) ?

sage current
#

you should attach components to buttons

#

ScriptedWidgetEventHandler

#

sorry, ScriptedWidgetComponent

#

...or, you can attach some component which exposes those events via an event handler, to which you can subscribe

vagrant pier
#

The Button already has the BasicbuttonComponent this has a function OnClick would i somehow just be able to override this?

lusty vale
#

does this mean my chimera config is not overriden?

north crescent
lusty vale
#

yeah worked by restarting

zenith shard
#

is there a guide for making a UI and banking system or something similar?

neon python
mystic oxide
#

What's chimera? Been browsing the scrips and discords for a while can't figure it out

versed fulcrum
mystic oxide
#

Self describing code -,-

gleaming notch
#

Like ChimeraCharacter is the player character

sage current
#

What about ChimeraGame, ChimeraWorld, ChimeraAIAgent, ChimeraMenuBase, ChimeraSunAndMoon πŸ‘€

gleaming notch
#

🀣

#

Ok I guess I am wrong

winged vessel
#

Chimera is just the working title of reforger

coarse birch
# gleaming notch Like ChimeraCharacter is the player character

You have to be carefully with the name player. Had alot of frustration yesterday not understanding the definition.
From what I got out of the code the term player means a human controlled a character while ChimeraCharacter is basically just the raw charackter and depending if it is AI or not a ChimeraCharacter has an AiController or a PlayerController.

#

For example getPlayer(int Id) would not work on AI because they don't have a playerId. So you have to find another way to access ai.

#

Kinda annoying because alot of components work on playerlvl instead of ChimeraCharacter so you have to implement stuff differently if you want it to work also for AI.

gleaming notch
tribal echo
#

I see that the engine has a VideoWidget component, what video format does the engine accepts?

gleaming notch
floral root
#

when i overwrite a ui layout in mod. nothing seems to change?

floral root
#

i disable the image from the left of the headers in the menus>inventory .layout files as overrides but still shows them.

worn marten
#

Hi, How can I spawn my GUI (myGuiLayout.layout) using script?

tropic acorn
#

anyone know how to add new font to the game ?!!

snow urchin
#

Hi. Where i can find help page about formatting tags?

#

GUI (E): RichTextWidget: unknown tag 't'.

terse lily
#

theres any way to make radial progress bar? or i need to make a bunch of images of a progress bar with different progresses and change the spray each time the value changes?

#

probably making an image set and just changing the index

vagrant knot
terse lily
#

ooh i didnt noticed that (never played that mode)

#

im gonna check it

vagrant knot
terse lily
#

can you send me image so i dont have to open the game? xD

vagrant knot
#

no example around sry xD

vagrant knot
terse lily
#

just want it radial

vagrant knot
vagrant knot
terse lily
#

i want do something like this

#

left is scum, right is subnautica

vagrant knot
terse lily
#

theres a Radial Progressbar component

#

i did put it to my progressbar but doesnt converts into radial

#

oh i just found that actually exists a .layout that has what i want on reforger addons

#

im gonna duplicate it and modify to look how i want

#

it doesnt uses progressbar

#

uses overlaywidget

terse lily
terse lily
dark jasper
terse lily
#

i just did this, i will check how it looks, and how a bolt looks

#

which is better?

winged vessel
#

Second one imo

split roost
winged vessel
#

instead of a fork for hunger, I would go with a chicken drumstick, seems to be pretty standard for hunger imo

#

like this

terse lily
#

i need to design it

#

and not all people eat meat

#

a fork is more generic

#

the truth is that im lazy xD

#

maybe later i will design a chicken drumstick or a beef

muted shell
dense compass
#

TextListBox crash for anyone else?

median sigil
#

yep 😦

#

TextListbox crash resize, i need TextListbox ! ouin ouin

shut inlet
#

Anyone figure out how to do custom map icons?

worn marten
versed fulcrum
# terse lily which is better?

Some DayZ players would likely at first think the second one is about shock and not stamina πŸ€” that's why I'd say the first one but those triangles should likely be just squares because it looks quite jagged.

gleaming notch
sage current
#

TextListboxWidget is not even used in the game

wild berry
# frozen lynx Did you config your chimeraMenus.conf ?

Regarding this config, is there a way to change this for a specific game mode? I do not want to completly override this in my mod and break other peoples menus they want to add :/ I was unable to find any component yet where this config file is setup? Is it a magic file that is fixed in the engine?

sage current
#

it's referenced somewhere in gproj file (in workbench -> options -> game project -> menu manager settings)
(I didn't try to change it myself πŸ‘€ )

#

but you are not going to break anything with your override πŸ™‚

#

I think that if two mods override this .conf file and add new entries, it's fine, or is it not?
And if two mods change some value like - what layout to use for inventory menu, then it will get broken.

wild berry
#

Well I want to modify the inventory basically, but preferably only in my own game mode. And so far the only option to change it is to either make a new one seperate from Inventory20Menu and mod the scripts to open that menu only when in my game mode or ... I don't know yet. Trying to figure out the best ways.

sage current
#

So, only in your specific world. I don't think engine has a tech like that, as menu manager is one per whole project. So you'd have to hack/script it somehow.

wild berry
#

I want to add an inventory action button at the bottom to do stack mangement. e.g. move whole magazine stack. But those buttons seem to be defined in some prefab or something, and I am going up the traces I can find to see where the inventory is put together, and where the buttons are setup.

sage current
#

Sometimes these buttons are added through code upon menu initialization. SuperMenu has methods to add buttons to the bottom row via code.
So also check script class of that menu.

wild berry
#

Yeah you a probably right. Override does indeed only appear to add. If the enum does not clash when given a unique (prefixed) name then i guess adding custom menus that way would be the way to go

#

So far I traced down the inventory buttions like G to drop to SCR_NavigationBarUI::m_aEntries. Where those are coming from I have no clue yet

frozen lynx
#

Maybe creating a "custom" ScriptMenuPresetEnum with another config file like chimeraMenus.conf ?

wild berry
gleaming notch
#

I also realised that some components are integrated to widgets and you cant rly modify them when they are related to other layout prefabs. You can add things but not rename/delete until you create your own prefab layout (so same behaviour like for all prefabs).

shut inlet
#

Anyone know why the text widget and image widget don't resize correctly when the rootframe is sized in code?

sage current
#

What do you expect to happen and what does the code do?

shut inlet
#

And not shift or more the circle.

shut inlet
#

anyone know why when assigned to an image widget, my image is desaturated?

#

the edds looks fine in editor though

#

Maybe because of the color being applied in the image widget is white, but I don't think I can choose to turn that off

gleaming notch
gleaming notch
# shut inlet

No idea about that one, i use only blank white icons for stuff like that and apply the colour in the GUI editor

shut inlet
#

Probably a color space thing, but not sure.

gleaming notch
#

You may can try working with a SizeWidget

#

And put everything in there

#

And modify maybe only the size widget then instead

#

but i haven't tested that yet

sage current
sage current
mild cloak
#

How can I change text values in a layout from a script outside of the layout?

sage current
#

Find that widget in the layout, and call SetText on it

mild cloak
#

how does FindWiget() work exactly? do i just put in the Widget name?

sage current
#

There are two kinds of this, FindWidget and FindAnyWidget

#

You always start search from some widget in the hierarchy though!

#

So it's typically root widget of your menu, root widget of your hud, root widget of some other element (like root widget of a button which has some other widgets inside)

mild cloak
#

For example i want to select this Widget: https://imgur.com/a/QuJUxdZ
So i would be doing FindWidget("HRearEyePiece.VerticalLayout.SizeRear.Overlay.Rangefinder")?

sage current
#

Yes! Or just FindAnyWidget("Rangefinder") (if Rangefinder is unique widget name starting from that place in the hierarchy)

mild cloak
#

Alright, got it, thank you πŸ˜„

left sorrel
#

I want to open a menu via the ActionsManagerComponent but my class is not displayed. I have already tried different things from the channel. My current code looks like this:

    ATM
}

class NE_ATMUI : ScriptedUserAction 
{
 
    GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.ATM);
    
}```
sage current
#

Did you override chimeraMenus/conf in your mod?
{C747AFB6B750CE9A}Configs/System/chimeraMenus.conf

left sorrel
#

Yes

sage current
#
class NE_ATMUI : ScriptedUserAction 
{
    GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.ATM);   
}

But you must put the actual code statements into some method of a class. Not to a class itself. I am not sure how it even compiles.

In ChimeraMenus you must specify a class which is MenuBase and it will be handling life cycle of your menu.

left sorrel
#

like that?

{
    override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
    {
        GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.ATM);
    }    
}```
sage current
#

Yeah seems to make sense! Check other classes inherited from ScriptedUserAction, I never worked with scripted user actions.

worn marten
#

Hope it helps πŸ˜‰

#

Oh this is how layouts are opened?
GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.ATM);

#

oh I'm going to test it, thx

left sorrel
#

Thanks for the guide. After a lot of trying I finally got it to work

arctic heath
#

Does anyone got any experience with SCR_InfoDisplay or SCR_InfoDisplayExtended? I cannot get it to work.

tropic drift
#

Whats the best method of tracking which buttons in a widget are which

#

basically I made my UI and I got it loaded

#

im programatically populating it with information

#

but I am lost as to how to track each button

#

for example onclick requires an (int button) which leads me to assume its some sort of unique ID but whenever I check the value is always 0 :/

gleaming notch
#

You can define all widgets in script like this:

ButtonWidget button1 = ButtonWidget.Cast(m_Root.FindAnyWidget("buttonWidgetName"));

The root is the main widget of your layout from that you can get all his children widgets and define them by getting them with there widget name from the main root widget.

#

Idk if this is still a thing in reforger but in DayZ SA we could skip the definition part when we just used the same name as the widget in the layout also in script.

tropic drift
#

The main thing is the onclick event because as far as I can see I have no ability to pass the widget to the function thats called with the event

gleaming notch
#

There is different ways depending on the class you are using and you always can hook up on the existing script invokes to add your certain trigger event types.

#

you can use a very basic OnClick event

cobalt sky
#

Hey there. By doing this will it automaticaly override the vanilla one, or do i have to make a script to tell the game to replace the vanilla one by the modded one. This is my first mod on the arma series so im kinda lost

gleaming notch
#

Or you use the ButtonComponets in the game apply that to your button widget and use its events

tropic drift
#

ignore my shitty placeholders

#

so each row is basically the same layout loaded again and again

gleaming notch
#

yeah i get that

#

Add a SCR_EventHandlerComponent to your button on the layout

#

look into that class

#

I think you will get the drill

#

Look how they use it for the Tiles in the load-out manager in the respawn selection menu for example

#

It has all the events you will need i think

mystic marlin
#

Can any of you guys add a textListboxWidget to a rootFrame without workbench crashing on you ?

mystic marlin
#

Mine crashes when i try click around properties and stuff and if i save it i cant load that layout again

gleaming notch
#

Oh

#

yes ok

#

i see

#

same

#

f

#

Hm there is a default ListBoxWidget layout

#

try to use that by dragging the layout into your root of your layout

mystic marlin
#

I will check it out thank you

#

Funny none of the listbox layouts use the listbox widget but i will dig around maybe another layout will have it

gleaming notch
left sorrel
#

How can i close a menu GetGame().GetMenuManager().CloseMenu(ChimeraMenuPreset.ATM) didn't work

gleaming notch
#

try CloseAllMenus instead

worn marten
left sorrel
mystic marlin
#

@tropic drift are you using the ItemPreviewWidget for rendering the AKs on your list and do you load up the model trough a script ?

gleaming notch
tropic drift
#

could never get the sizing, angling and backgrounds working properly

gleaming notch
#

I would say look into the SCR_LoadoutPreviewComponent

#

That is what they use to create the loadout preview in the loadout selection

tropic drift
#

yea im just a little overwhelmed doing all of this so ill just slowly go through everything until it make sense

gleaming notch
#

You can get all the info/data needed to display a preview from the prefab btw

#

even a image (if there is one)

shrewd terrace
#

Hey, i'm trying to get all child widgets from code.
now there is a Widget::GetChildren() but this returns a widget and not a array.

Is there an other function I missed ?

gleaming notch
#

You will need to loop true Children and there Siblings

#

To get them all

shrewd terrace
#

Yikes

#

Thanks

worn marten
#

Hi, I have overwritten the chimerasMenu.Conf And I have added an entry called SPK_myTestGui .
But if I try to open it in some script

  GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.SPK_myTestGui);
```an error is shown saying that `SPK_myTestGui` doesn't exist. What I'm missing here?
left sorrel
worn marten
#

I did but with another name

#

they must be the same?

#
class SPK_myMenuUI : ChimeraMenuBase{
}
left sorrel
#

okay

#

and you load your new chimerasMenu.conf in the addon.gproj?

worn marten
#

oh must be it, I will try

left sorrel
#

and restart wb after you add it there

#

does anyone knows how i add a custom button action like GetGame().GetMenuManager().CloseAllMenus()

worn marten
left sorrel
#

can u send your'r code an error message

sage current
sage current
#

yes, just make a modded enum somewhere in your script

left sorrel
#
    SPK_myTestGui
}```
#

like this

worn marten
#

πŸ‘ 😘

#

thx

#

yep it worked thx

sage current
#

actually even like this works

modded enum ChimeraMenuPreset
{
    AddonPresetDialog
}

without the : ScriptMenuPresetEnum part

left sorrel
#

ah okay nice to know

violet bear
#

so how and where should someone start in modding the ui?

#

like adding a button to an existing ui or creating a new one

worn marten
#

GUI Setup

  1. Create the following folders in your project: UI/layouts/Modded
  2. Create some layout inside the created Modded folder: myNewLayout.layout
  3. Create the following folders: Scripts/Game/UI/Modded
  4. Create a .c file inside the created Modded folder: myScriptedUI.c
  5. Go to ArmaReforge/Configs/System/chimeraMenus.conf and rightclick/override in yourAddon
  6. Go to your automatically created path Configs/System/chimeraMenus.conf and add your new GUI at the end with some ID name (myTestGui_ID).
  7. Assign the Layout (myNewLayout.layout)
  8. Assign the Class (myNewLayoutClass)
  9. Return to the previously created: myScriptedUI.c
  10. Add this:
modded enum ChimeraMenuPreset {
    myTestGui_ID
}
  1. In the same file you can add your class to (I will put the code later to make it more clear):
class myNewLayoutClass: ChimeraMenuBase
{
  //your GUI code ...    
}
  1. With this done you will be able to Open the GUI using this code somewhere:
GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.myTestGui_ID); 
#

Adding functionality to your new created GUI (Hint on Button Click)
13. Go to your layout: myNewLayout.layout
14. Add one ButtonWidget and rename it to: SendHint
15. In SendHint/Script add one component called: SCR_ButtonTextComponent (and leave it with his default values for now)
16. Return to your previously created class: myNewLayoutClass and do the following code magic:

class SPK_myMenuUI: ChimeraMenuBase
{    
    protected Widget m_wRoot;    
    protected SCR_ButtonTextComponent comp;
    IEntity myCallerEntity;  // (Added) this variable will be used only to show how to transfer parameters to the GUI.            
    
    //------------------------------------------------------------------------------------------------
    override void OnMenuOpen()
    {
        m_wRoot = GetRootWidget();
        
        // SendHint
        comp = SCR_ButtonTextComponent.GetButtonText("SendHint", m_wRoot);
        if (comp)
        {
            GetGame().GetWorkspace().SetFocusedWidget(comp.GetRootWidget());            
            comp.m_OnClicked.Insert(myCustomFunction);
        }                
    }
    
    // myCustomFunction called when SendHint Button is pressed
    void myCustomFunction()
    {
      SCR_HintManagerComponent.GetInstance().ShowCustomHint("This executes when pressing SendHint Button (Using OnClick)", "MY GUI", 3.0);
    }
};
  1. (Added) You will need to change the code in step 12 if you want to be able to pass some variables to the GUI:
MenuBase myMenu = GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.SPK_myTestGui); 
SPK_myMenuUI myMenuUI = SPK_myMenuUI.Cast(myMenu);
myMenuUI.myCallerEntity = pOwnerEntity;  // pOwnerEntity is the variable we want to be able to use in the GUI on this example.
violet bear
#

thanks, will try it out

worn marten
#

This is the basic GUI that I managed to learn with some people in this channel, hope it helps.

violet bear
#

should create a tutorial or something on github for it

#

like it was done for mission making

worn marten
#

I don't know how to do that hehehhe

#

I hope that all the GUI stuff will be in the wiki some day

violet bear
#

create a project on github, add examples to it, switch to wiki tab, write up wiki or I can do it on the run as I learn it from you and others πŸ˜„

worn marten
#

Of course feel free to use my description to do whatever you want with it. Community doc are always good

#

It's a good combo with this GUI stuff in order to Open It

primal marsh
#

can someone please help me

#

I'm trying to load a menu layout i've created

#

i've added an action to chimeraInputCommon.conf in project

#

and i've added a menu entry to chimeraMenus.conf

#

with the relevant layout field filled, but it doesn't work 😦

mystic marlin
#

Any ideas why i am getting : GUI (E): Menu preset 'myTestGui_66' not found! I followed the tutorial above and it feels that the chimeraMenus.conf does not get loaded

sage current
mystic marlin
#

yeah

#

I think that is what is throwing the error

#

Ok so i changed the value to some random value and it threw error that it can not find variable so both the ENUM and the chimeraMenus.conf seem to be loaded

mystic marlin
#

@sage current it started working when i removed the confing setting from the project file and loaded it again

eternal anvil
#

how can i add my own markers on the map? i havent had any luck with tasks with map descriptor components

floral root
#

how would i go about showing my UI layouts straight from the start? ie: making health/stamina bar etc show up always.

rare jay
#

How do I add my ui element to the base map?

#

@shut inlet

latent tangle
#

Not sure if this is correct place, but I am looking for help on an inventory issue. Made a helmet mod and it will put on if selected from the ground, but inside the inventory it will show as applying to the helmet slot, but it ends up disappearing. Anyone know of a fix to get it to enable inside the inventory onto your character?

twilit token
#

Hello I am looking for a tutorial how to create a physic as well as how to operate my car get into it etc.

arctic heath
floral root
#

how would i get a widget thats 2 or more deep in the root widget? m_wRoot.FindWidget only seems to get the child thats 1 below root. ?

sage current
#

search FindWidget through whole reforger code, you will see how to specify a path

#

or you can use FindAnyWidget

floral root
#

ta

#

sorted now thanks again.

#

is ther no getHealth like there is getStamina?

arctic heath
#

No.

floral root
#

how i get the players health or blood?

floral root
#

nm worked it out πŸ˜„

mystic marlin
#

Do you guys know how to position HUD relative to the resolution the player is running the game in ?

sage current
#

What are you trying to achieve? Where should the element be positioned?

mystic marlin
#

Here the FrameWidget is set to 1920x1080 so when i load it in 4k it is sort of off the middle

sage current
#

You should have your root a Frame widget.

#

Ok show the slot properties of the panel please

#

most likely anchors and sizes are wrong

mystic marlin
sage current
#

I mean properties on the right

#

and the hierarchy as well please

mystic marlin
sage current
#

Ok I see. You should add a VerticalLayout into root of the frame. Then put those horiz. layouts into the vert. layout:

Frame(root)
  VerticalLayout
    HorizLayout0
    HorizLayout1
    ...
#

Then click on vert. layout, set its anchor to xmin, xmax = 1, ymin, ymax = 1
Play with pivot and offset values, set width and height.
I think you will get what you want πŸ€”

mystic marlin
#

Ok got it thank you

sage current
#

Make sure you know how to use all values in frame widget, it's very powerful for positioning.
Second is overlay widget. It's simpler but OK for most common cases like centered, aligned to left/right

native cipher
worn marten
silent zenith
#

The Problem is still the lag of information. Hopeful BI is giving us more Input in the next days.

#

Most we do now is try and error as well back engineering

wild berry
terse lily
#

how can i access to character or charactercontroller from OnStartDraw (orUpdateValues) from a subclass of SCR_InfoDisplay?

arctic heath
#

@terse lily do you mean like this?

||class whatever: SCR_InfoDisplay
{
private SCR_CharacterControllerComponent CController = null;

override event void OnStartDraw(IEntity owner)
{    
    CController = SCR_CharacterControllerComponent.Cast(player.FindComponent(SCR_CharacterControllerComponent));
    if (CController) Print("Found character controllerc omponent")
}

}||

terse lily
#

yeah

#

i think i found a way

#

SCR_ChimeraCharacter character = null;
if(owner.Type() == SCR_PlayerController){
SCR_PlayerController player = SCR_PlayerController.Cast(owner);
character = SCR_ChimeraCharacter.Cast(player.GetLocalControlledEntity());
}

#

but not sure if it works correctly

arctic heath
#

What exactly are you trying to achieve?

terse lily
#

player health

#

with that i can do
float health = character.GetDamageManager().GetHealth();

arctic heath
#

Ah, I see. Yesterday someone asked if there is a "getHealth" Variable or something like Stamina has. He found a workaround, might as well contact him if you are not able to manage to get it.

arctic heath
floral root
#

i just pulled getHealthScaled from the damagemanger dont rely on what i do tho. am newb lol

terse lily
#

thats similar to what i do

#

gethealth from damagemanager

#

which gives health as float from 0 to 1

floral root
#

yeah should work then i guess?

arctic heath
floral root
#

yeah friend told me if it works it works. and not to worry if its correct or not lol

terse lily
#

i think healthscaled is alive or dead?

#

idk

floral root
#

doesnt say. just says returns it from 0 to 1

terse lily
#

but its a bool xD

floral root
#

above that

#

the get not the set πŸ˜›

#

miss snipped lol

terse lily
#

ahah has sense now

floral root
#

where can i pull blood from?

#

doesnt seem to be on DamageManager like health is

#

mm blood says it is on damagemanager. cant seem to pull it must be tired lol

coarse birch
# floral root where can i pull blood from?

I'm really confused how the blood system works. I found all kind of blood stuff in the actual Hitzones there are like more than 10 of them.
Is blood the actual health? So if you would set it to zero the character dies or is it more like a health modifier?

floral root
#

no idea. i guess if u run out of blood u die like with health?

coarse birch
#

so lets say you have 100 blood and 100 health are they completly unrelated?
So you can play with 1 health and 1 blood?
And when one of them reaches 0 you die? hmmmm

floral root
#

no idea tbh. cant find anywhere that explains it lol

coarse birch
#

Yea same. I found some blood modifier on each hitzone and set it to 0 so now characters don't bleed out at least I survived >5 minutes while having the bleeding UI which also is weird because why is the bleed ui shown when you don't bleed.
But thinking of it as two seperate systems makes sense I think.

versed fulcrum
# coarse birch so lets say you have 100 blood and 100 health are they completly unrelated? So y...

They're somewhat separate. Though not 100% sure how it goes in AR. Likely that you lose both health and blood when something hits you, it also causes a wound, so you lose blood over the time. If you don't patch up and blood goes low you lose health again. If you patch up, blood loss stops and blood probably regains back to full. Health likely remains low. Not sure does AR have health regen yet.

You can get a grip if you look for how those work in DayZ.

gleaming notch
#

In dayz SA every hit zone of the player character has its own blood/health

#

Not sure but this could be the same case in Reforger

coarse birch
gleaming notch
#

It was possible to get the overall health by not adding the hit zone index as param. There should be a similar method

#

πŸ€”

#

But thats all theory

#

I haven't looked into the way they do it now. It just sounds very similar

twilit token
terse lily
#

someone knows how to import fonts?

floral root
#

why would equip show as unavailable but on a grenade it allows u to put in hand?

gleaming notch
#

Conditioning. There has to be a method that checks if the action is usable by going thru conditions. If the method returns false. This is the result.

crystal zenith
#

Hi, do you know how to get ref to text widget ?

inland ruin
#

You know of any tutorials for the UI?

mystic marlin
#

@floral root How did you manage to access the damage component from your script ?

floral root
#

using those. no idea if its proper way am noob at coding. but it works.

crystal zenith
floral root
#

how would i go about creating a ui widget by script?

neon python
#

do you want to simply render it

#

or have the focus on the widget

#

Without having the focus you can't interact with buttons and stuff

#

For simply rendering it's as easy as GetGame().GetWorkspace().CreateWidgets("Widget Resourece Name");

#

For making it a menu, it's requires little bit more effort but still extremely easy

#

You need mod ChimeraMenuPreset enum and add your own menu

#

Same with chimeraMenus.conf, you need to override and add your menu there as well

#

Creating a class that inherits from ChimeraMenuBase can be helpful as well

#

After all the setup is done, GetGame().GetMenuManager().OpenMenu(Your Modified ChimeraMenuPreset Enum goes here);

#

It will return a MenuBase. You can get top parent widget within that by doing newlyCreatedMenu.GetRootWidget();

#

After that you are ready to rock'n roll

#

You have a refrence to the menu and a reference to the widget. Everything you are mostly going to need to interact with an UI is going to be within those 2

#

Much like entities, widgets follow a parent child relationship. So if you want to modify a text or an image within a widget you can utilize that hierarchy to get that text or image and modify it via code

#

And that hierarchy is going to based on your .layout

floral root
#

ta πŸ™‚

mystic marlin
#

@floral root Thank you for the screenshots from above.

floral root
#

is there an easy way to fade UI in and out or point me in the direction if so?

coarse birch
#

Is it possible to only show part of an image as imageWidget?
I want to display the US flag image that already exists in the game but the lower 50% of the image is black. Is it somehow possible to only show the upper 50% of the image?
Went through all the options but could not find it.
https://imgur.com/a/Sp12rF6
I also tried wrap and none but then I can't scale the image only the widget.

neon prism
floral root
#

so what does deployment points relate to? as it cant be spawn points as i have some in the map. Anyone know?

deft zenith
floral root
#

its linked as far as i know. it shows up on map on the spawn screen. and can select it on map and spawn at it if ur the faction. not sure if thers anything special i need todo it to "link" it to a faction.

#

factioncontrol component on the spawn point is set to the faction

deft zenith
floral root
#

yeah shows up in GM mode aswell

#

it works fine. apart from just doesnt show on deployment points screen lol

#

shows up fine on end selection screen

floral root
#

dam just tested with peer tool. seems my ui doesnt update on other players either lol

#

argh

winged vessel
#
void OVT_MainMenu(OVT_MainMenuWidgets widgets, Widget root)
    {
        m_TownManager = OVT_TownManagerComponent.GetInstance();
        m_Widgets = widgets;
        
        SCR_ButtonTextComponent comp;

        // Map Info
        comp = SCR_ButtonTextComponent.GetButtonText("Map Info", root);
        if (comp)
        {
            GetGame().GetWorkspace().SetFocusedWidget(comp.GetRootWidget());
            comp.m_OnClicked.Insert(MapInfo);
        }
    }
    
    protected void MapInfo()
    {
        Print("Map Info button was clicked");
    }

Any clue why this m_OnClicked handler isnt being called? All the other events are working fine (hover, click sound is played)

#

the handler is definitely being inserted, but "MapInfo()" is never called

winged vessel
#

I think my class was getting GC'd, storing it as a ref fixed it

winged vessel
#

does anyone even know how "Priority" is even supposed to work in ActonContexts? If I set anything higher than 1 it will override everything else that is 1. Selecting "Cursor visible" shows the cursor all the time, even if my context isnt active.

#

and if i set 1 then obviously all the other contexts are active, so you can still move around and esc shows the pause menu

floral root
#

i thought it just puts them in the order of priority in the menu list

winged vessel
#

has to be more than that, because of what I said

#

setting anything but priority 1 makes the flags active even when the context isnt

floral root
#

not sure then sorry πŸ™‚

floral root
#

How would i get a component on a character from a script based on SCR_InfoDisplay?? everyway ive tried to get the character didnt work on a peer client.

regal fjord
# winged vessel does anyone even know how "Priority" is even supposed to work in ActonContexts? ...

higher priority means the context is activated sooner, if your context has prio 2 and has no overlay flag (aka overlaying other contexts), it means no contexts with priority below it (1 or less) will be active, which seems to be your case

non-overlayed contexts are used when you do actually want to ignore all other inputs (lets say when you open a map, you dont want to be able to move around and shoot)

winged vessel
#

I do want to ignore all other inputs as it's a menu but I'm not using the menu manager as I feel adding it to the enum of menus is silly

#

So I don't choose overlay and set flags to show cursor, with priority > 1 but as soon as game starts the cursor is shown and can't control the character even though ActivateContext hasn't been called

regal fjord
#

that doesnt sound possible πŸ€”
you could check how it looks with debug in WB
dbg menu (WIN+ L ALT), -> GameCode-> ShowInputManager will show you which contexts are currently active/suppressed

winged vessel
#

Ok I'll have a look thanks

coarse birch
#

Hi,
how to get a list of child widgets from a parent?
I have a GridLayoutWidget and I want to get an array of rows and columns but the GridLayoutWidget itself has no such functions.
The Widget class has a GetChildern() which returns for some reason only one widget instead of a list.
proto external Widget GetChildren();
I want to access the cells by row column numbers, but I can't find any method that allows to do that.

winged vessel
#

which seems weird

#

my contexts arent active

#

which is correct

#

but no idea why character general would not be

#

I guess I can just force it active

#

but shouldnt have to

regal fjord
#

0_0 something very strange is going on

#

is this ingame with spawned character?

winged vessel
#

yes

#

this is once I set my priorities back to 1

#

so all the character contexts disappear

#

action menu, weapon, movement, general

regal fjord
#

afaik those contexts are activated by gamecode, they shouldnt just disappear

winged vessel
#

interesting

#

well this at least sheds some more light, Ill have a dig

#

thanks for the help

regal fjord
#

I wonder if you're doing anything which could suppress active flag or frame mask for the player entity, which would stop it from activating the ctx πŸ€”

winged vessel
#

so in the case of the ActionMenuContext this is whats suppressing it:

#

thats always null

#

so it doesnt activate context further down

#

this is SCR_InteractionHandlerComponent.OnPostFrame line 403

#

removing the SetEventMask(owner, EntityEvent.FRAME); from my component didnt change anything

#

worth a shot

regal fjord
#

Would probably have to ask someone who knows how those contexts are activated, possibly @fossil sorrel ?

winged vessel
#

I just noticed that when my priority is > 1 the GadgetContext is active

#

so whatever is happening is also activating that (shouldnt be afaik)

fossil sorrel
winged vessel
#

I know

#

but if you scroll up, none of the character specific contexts are being activated

#

the gadget ones are

#

all im doing is adding custom contexts with priority > 1 nothing else

#

well that I know of

fossil sorrel
#

Maybe some of the context has the exclusive flag set? think_turtle

regal fjord
#

that would suppress them and show them as yellow in dbg (if not overlayed)

winged vessel
#

these are my contexts

regal fjord
#

this looks like something straight up deactivates them

fossil sorrel
winged vessel
#

oh ok

#

they shouldnt be overlay though

#

they are inactive

#

only activated later

#

ill keep digging unless you can point me in the direction of an input master hehe

regal fjord
winged vessel
#

ok so it seems to think I have a gadget raised

#
if (m_InputManager && m_HeldGadgetComponent)
#

maybe

#

no thats not breakpointing

#

but i have no idea why gadgetcontext is being activated lol

regal fjord
#

shouldnt be relevant in grand scheme of things because gadgetcontext isnt suppressing things either

winged vessel
#

hmmm

#

is inheriting from chimeraInputCommon.conf the right way to add my contexts?

regal fjord
#

good question, you could try overriding instead πŸ€”

winged vessel
#

looking into that now

floral root
#

for a ui for the player am i best putting it on the SCR_HUDmanagerComponent thats on the player controller or the SCR_BaseHUDComponent thats on the character??

regal fjord
winged vessel
#

ok

regal fjord
floral root
#

so like a health bar? better on controller or character? ive got it on controller but trying to think if its better off on the player.

regal fjord
#

it will work with both, neither is 'incorrect'

floral root
#

k kl πŸ™‚

winged vessel
#

BINGO

winged vessel
#

thanks man

#

theres one for the docs

#

and for future reference @fossil sorrel, inheriting from chimeraInputCommon.conf is bad, overriding good

#

well sort of.. now I get no CharacterMovementContext but everything else works

#

but its an improvement, might be something else im doing

winged vessel
#

yeh just need to restart WB any time the conf is changed or weird stuff happens

#

all working good now

floral root
#

Why is this ALWAYS saying no deployment points? cant it find the spawn points or bugged? Ive added editble spawn points in with faction key etc. but nothing.

rough yoke
floral root
#

Yeah. thing looks identical to us/ussr etc apart from with own faction.

deployment points show up on the map to select for each faction on last screen. but yeah never show on the faction tiles.

rare jay
#

trying to view the properties of a TextListboxWidget instantly crashes Workbench

#

help 😦

rough yoke
floral root
#

@rough yoke ive tried it with PrefabEditable/ spawn points, also with the Prefabs/MP/Spawning/ faction ones edited to say my faction key instead on any component/section that has the faction key part. Is there somewhere else other than on the spawn points prefabs/components that it needs to be told ?

ancient marlin
#

Idk where to ask this but... Does Enfusion have vector support for something like a crosshair in a scope? I would have no idea how to even search for this. Basically, can I use an SVG within Enfusion somehow?

winged vessel
#

pretty sure, although im only just starting on canvas widgets myself

ancient marlin
#

Can it be used to make something like this?

winged vessel
#

If you know the math, then pretty sure yeh

#

its just some lines and circles

ancient marlin
#

Know the math..? Yep I think I'll stick with a texture then lmao. Very much appreciate your help though, I'm just not technical enough to make something like that.

worn marten
#

I should add this now:

class SPK_myMenuUI: ChimeraMenuBase
{    
    ... 
    IEntity myCallerEntity;
    ...
MenuBase myMenu = GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.SPK_myTestGui); 
SPK_myMenuUI myMenuUI = SPK_myMenuUI.Cast(myMenu);
myMenuUI.myCallerEntity = pOwnerEntity;
prisma stratus
#

So helpful, thank you so much

rare jay
#

Does TextListBoxWidget crash anyone elses workbench

#

when they try view the properties?

winged vessel
#

Yes everyone

#

Its broken

dawn olive
#

Just filed a bug report for SCR_EditBoxComponent throwing a NULL-pointer error when attached to EditBoxWidget, maybe someone has figured out some workaround for it at the moment?

rare jay
#

until the listboxwidget is broke

winged vessel
#

you could write one yourself

#

just add textwidgets to a layout container

#

Ive been using the gamemaster asset selection screen which is just a grid of repeated elements with image etc

#

fill them with info and turn off the ones I dont need

#

around line 53

worn marten
worn marten
#

I don't know how to populate it by script yet. But hope this images help you

#

There is a ListView prefab to but I don't know the diference

rare jay
worn marten
#

Anyone knows the difference between SCR_PooledListComponent and SCR_ListViewComponent. For example let's say I want to make a list in which all the players appear and that I can select one, which should I use? And how I must clear, add items? I think that the workflow is to create a new class inheriting form one of these and override the FillEntry() method, am I right?

worn marten
#

I keep trying to generate a very basic list using SCR_ListViewComponent. I have come up with the following:

class SCR_HintListComponent : SCR_ListViewComponent
{     
    protected ref array<SCR_HintEntryComponent> m_aObjectsEntries = new array<SCR_HintEntryComponent>;    
    
    //------------------------------------------------------------------------------------------------
    //! Empty functions for setting up widget entry beavhior actions, callbacks, etc.
    override protected void SetupEntryBehavior(Widget entry) { }
    
    //------------------------------------------------------------------------------------------------
    //! Empty function for filling entries with data 
    override protected void FillEntry(Widget w) 
    {            
        Print("FillEntry - In");
        int id = m_aEntryWidgets.Find(w);
        Print(id);
        SCR_HintEntryComponent objectEntry = m_aObjectsEntries[id];
        
        if (!objectEntry)        
            return;
        
        ARU_ObjectEntry myEntry = new ARU_ObjectEntry();
        
        myEntry.SetId(id);
        myEntry.SetName("myEntryDefaultName");
        
        objectEntry.SetObjectInfo(myEntry);
        
        w.SetVisible(objectEntry != null);
        Print("FillEntry - Out");
    }
};

This component is placed in the "FrameWidget" prefab WLib_ListView.layout. When I'm in the workbench it shows something, but ingame the list is not filled. I have seen that SCR_ListViewComponent has some lines comented but not cleary why.

#

Tring to override the OnUpdate method to call FillEntry results in errors ... so I'm stuck here XD

worn marten
#

@deft zenith hi, sorry for mentioning you . It seems like nobody know about this and Im blocked. Do you know someone that can help with this? πŸ˜…

deft zenith
# worn marten <@110113662080937984> hi, sorry for mentioning you . It seems like nobody know a...

I am no expert in this, here are answers from our UI devs

Simply pooled list is iteration of list view, so there is this old SCR_ListViewComponent left over. Its purpose is to reuse minimal amount of widget and just to change data inside widgets.
If anyone would want to do just small list there is no need to use it. Only thing needed is to put list items into ScrollLayoutWidgetin layout editor
Or SCR_ListBoxComponent

worn marten
#

Ok will try this afternoon/night. Thx

worn marten
#

I made this little tutorial it will be useful fore someone else πŸ˜‰

#

How to create a ListBox in GUI - Layout
0. Place an OverlayWidget and resize it as you wish.

  1. Search the ArmaReforger Prefab: ArmaReforger:UI/layouts/ListBox/ListBox.layout
  2. Place the prefab inside the OverlayWidget created at Step 0 and change the Horizontal and Vertical Align to the 4th option.
  3. Get sure that the new created ListBox0 (by default) has the component SCR_ListBoxComponent.
  4. Get sure that the new created ListBox0 has a ScrollLayoutWidget ("ScrollLayout0" doesn't mater) and a VerticalLayoutWidget ("List" as name, required) created.
  5. Steps 3 and 4 should be fine by default if you have used the ListBox Prefab.

How to create a ListBox in GUI - Fill and GetIndex
6. Create a menu class script with the following:

class SPK_myMenuUI: ChimeraMenuBase
{    
    protected Widget m_wRoot;            
         
    //...    

    OverlayWidget m_ListBoxOverlay;
    SCR_ListBoxComponent m_ListBoxComponent;

    //...
        
    //------------------------------------------------------------------------------------------------
    override void OnMenuOpen()
    {
        m_wRoot = GetRootWidget();                            
        
        //...

        // MyList
        m_ListBoxOverlay = OverlayWidget.Cast(m_wRoot.FindAnyWidget("ListBox0"));
        m_ListBoxComponent = SCR_ListBoxComponent.Cast(m_ListBoxOverlay.FindHandler(SCR_ListBoxComponent));
        if (m_ListBoxComponent)
        {            
            m_ListBoxComponent.AddItem("MyItem0");
            m_ListBoxComponent.AddItem("MyItem1");
            m_ListBoxComponent.AddItem("MyItem2");            
        }

        //...            
    }

    //...

};        
  1. In order to get the ListBox Index you can use this: m_ListBoxComponent.GetSelectedItem();
charred oyster
#

Ok, so here's a difficult one:
We have overriden the chat layout to display it in another position on screen and resized it.

It shows and works just fine if playing from camera position in editor and then possessing the character.

#

It does NOT work when creating a spawn point and spawning in. It just doesn't show up πŸ˜„

#

It works on characters I place down via GM, but not when I use a spawn point to spawn.

worn marten
#

If you don't override the chat it works?

#

(to get sure that isn't some configuration missing)

charred oyster
#

yep

charred oyster
#

Interestingly it works for regular players who spawn in on a server via a created spawn point

#

It does not work in spawn menu, nor while in GM mode

#

You can type and hit enter and it gets sent to chat but you don't see it πŸ€”

#

At the current moment my best guess is that it has to do something with a renamed/deleted/changed (formatting) widget.

compact prawn
#

I tried to post this in other channels but I want to try to get the people here to take a peek, since some of the GUI plays with the string table.

I have edited my string table to include some of my custom additions. my problem is in workbench and in game, The id (#AR-FieldManual_Page_Intel_Title) shows up instead of the Target translation.

empty tusk
#

omg. The layout editor has been crashing like crazy for me today. It even has reverted files I've saved TWICE. I'm done

#

Anybody else have problems or am I screwing it up?

#

Most of the time it has has the "send debug" window but the last few times it just went straight to desktop

winged vessel
empty tusk
#

Nope, just lots of FrameWidgets, VerticalLayout/horizontalLayout, Overlays, RichText and a couple of ImageWidgets

#

This is what it has reverted back to after crash. I've had to make a header for the item/cost header three times now. It usually crashes soon after adding a few more elements

#

Oh look! It just did it again

worn marten
empty tusk
#

I'm going to have to put it aside for now. It doesn't crash nearly as much in other parts of the editor.

empty tusk
#

Going to install latest GPU drivers and report back

empty tusk
#

Nope. Still an issue

#

So here's what happened this time. I went in and fixed up that one that kept reverting and saved it a million times and even grabbed a snap shot here.

#

I then switched to another layout and it crashed right after. Messing up this one, which now looks like this.

#

So it isn't exactly reverted. There's just some elements that got corrupt

worn marten
dull nebula
#

@fossil sorrel question, do you know any samples/tips for setting up simple radial menus like you have in your reloading mod? I'm just trying to setup one with some static actions in it right now

empty tusk
fossil sorrel
empty tusk
#

Thoughts?

worn marten
#

Looks great πŸ‘

empty tusk
#

Nothing to cancel. Maybe the purchase buttons should have a confirmation

worn marten
#

Cancel/Exit Menu

empty tusk
#

Ok serves same purpose

worn marten
#

How do you exit if you dont want to purchase?

#

By the way i was testing with layouts prefabs they are quiete useful.

empty tusk
#

Yeah, I found them. At first was using dialogs and working them manually but the prefabs cut that workload down a lot

worn marten
#

The background and all the visible widgets are another layout an then I can use this on all layouts

empty tusk
#

There's great prefabs for most buttons and other elements. Works best if you have a container like a horizontal or vertical layout to put them in. Then duplicate after getting them to fit just right

worn marten
#

Then I can add the content and foter on another layout

empty tusk
#

I'll need to make one of those too. There'll be a few menus for my mod

worn marten
#

I will share the layout herarchy this afternoon maybe it is more clear

empty tusk
#

Coding for it might take a week for me to figure out thought. I wanted to have the menu layouts done before tackling too much of the rest of the mod so that I can also do custom debugging and playtesting.

#

It's off to other UI elements after this.

worn marten
empty tusk
#

Your tagging game is on point.

worn marten
#

yep I like how it ended

worn marten
# worn marten

As you can see here I just dragged my standard DialogBackground and then I added stuff on Content (manually) and Footer (another buttons standard layout)

#

I'm having some problems with localization, this is why the # is missing on those texts, to avoid engine to search for it

empty tusk
#

There's still a few bugs in the system. I think the reason I was crashing before was the dialog I was using as a base.

#

Every time I went back to start a fresh one it would crash eventually

#

I started fresh with some other base layout and haven't crashed since

worn marten
#

Ye there is a lot of bugs with the layouts 😩. But i cant replicate it consistently to make a ticket on feedback tracker.

glass ivy
#

@worn marten I haven't messed with GUI stuff yet, but how difficult would it be to create some GUI menu with multiple sub menus, and have back option where it'll go to the previous menu? πŸ€”

surreal rover
#

++++++

dawn olive
#

Has anyone managed to get EditBoxes to work properly with SCR_EditBoxComponent? The component has a bug at the time, so I don't think it's usable, but may there be some other way to attach a "text changed" handler to an EditBox?

worn marten
dawn olive
#

EditBox itself works fine, but when I attach a SCR_EditBoxComponent it keeps spamming null-reference errors to debug log, so I don't think it's usable at the moment

#

The bug I filed in the feedback tracker was moved to "Assigned" status today so I hope the issue is resolved soon

worn marten
#

ok

#

I hope they finish some TODO stuff that they have on SCR_ListBoxComponent XD

empty tusk
#

Oh no, so list boxes don't work yet?

worn marten
#

They work. And in the meantime your can do you oun method for cler and setCurrentItem. but i hope they finish this soon because I would like to use it to

glass ivy
#

First time messing around with GUI stuff, probably messed up big time peepoLaugh

neon python
glass ivy
worn marten
glass ivy
glacial vault
#

where should I start with learning gui creation? any tutorials or other stuff?

glass ivy
# glacial vault where should I start with learning gui creation? any tutorials or other stuff?

I just started tinkering with it yesterday so I'm still trying to get my head around it. But the best thing to do is just open layouts from the game and inspect how they work, a few posts in here are very useful too. Such as #enfusion_gui message #enfusion_gui message https://steamcommunity.com/sharedfiles/filedetails/?id=2814814735

This is a simple guide on how to create GUI/UI/HUD addon's for Arma Reforger....

dull nebula
fossil sorrel
quaint rune
#

Is there a way to use the button widgets that are already created by BI? Like if I wanted to use this

worn marten
quaint rune
#

So that would be placed on a richtext?

#

in like a initialization script for the layout

worn marten
#

yes, they use it on a RichTextWidget

quaint rune
#

Thanks!

glacial vault
#

How am I able to close a menu? I tried with a Cancel Button which executes the following but I get an error:

    { 
        GetGame().GetMenuManager().CloseMenu( ChimeraMenuPreset.SARO_MHQMenuGUI_ID );
   }```
error:
```only NULL assignment is allowed```
```can not convert 'int' to 'MenuBase' for argument '0' to method 'CloseMenu'```
#

CloseMenu needs a BaseMenu class object. I guess the question is how do I get this?

glacial vault
#

searching Discord helped^^
this works:
GetGame().GetMenuManager().CloseAllMenus();

#

but would be better to have a solution for one menu in case you have multiple menus open at the same time...

regal fjord
#

there are so many ways to get it, MenuManager has FindMenuByPreset() / GetOwnerMenu(), you can also just cache it or use "this" if you are calling the cancel from within the menu

glacial vault
empty tusk
#

I've got a different issue with closing a particular menu. I've modded the map and using it to launch other menus, closing it however leaves your character with the map item still in hand. It's a minor issue since you can just switch to a weapon but the UI will then display the fadeout animation that closing some menus does. I have no idea where to start looking for what code is being run here.

regal fjord
# empty tusk I've got a different issue with closing a particular menu. I've modded the map a...

Map when used as a character is opened using the GadgetMap action, when it is opened all lower priority inputs (character stuff) is disabled, so map has a special context with reference to the GadgetMap action so it can still be used to close it "from" the map
My guess is that you close the map in a way that skips the closing logic from triggering on the character level, which is fine for things like respawn map, but not for this case

empty tusk
#

There's probably a way to force close a gadget quietly

regal fjord
#

If you do something like CloseMap() only UI will close, but wont get propagated to character logic

empty tusk
worldly sphinx
#

yo can anyone point me at what I need to do to have a dialog for an editable entity with some properties

worn marten
#

what do you refer exactly with "editable entity"?

worldly sphinx
#

I want exactly that, but with my own variables for my own entities

worldly sphinx
#

no worries

worn marten
worldly sphinx
#

I don't know where this comes from

worn marten
#

yep I'm searching to, the only thig I found by now is that component

#

I've found the health bar on: {5AA8B62B2B33CD49}UI/layouts/Editor/Attributes/Entity/AttributePrefab_HealthWithWarning.layout

worldly sphinx
#

for example you have SCR_AiSkillEditorAttribute

#

but I don't know how it is plugged in to the actual dialog

worldly sphinx
#

getting closer

worldly sphinx
#

I did it CelebratingFrog

shrewd terrace
#

What type of properties can you add to those menus ?

worldly sphinx
#

I've only played with int, float and bool

#

well, the UI elements can return these

shrewd terrace
#

Would love to have array or string support πŸ˜›

#

But not looked into them yet

worldly sphinx
#

there is a dropdown ui element, but I don't remember what kind of values it stores

worn marten
#

I will need it some time XD

worldly sphinx
wild helm
#

Is there a way to assign a UI to a mesh face like a monitor screen?

queen nacelle
#

i think you can add the action on a object but on screen i dont know maybe with layout ?

tacit vigil
# worldly sphinx I did it <:CelebratingFrog:917801297221144586>

Yooo you the 🐐 bro. Can’t wait to use your mods in multiplayer some day. Do you know why the parachute flares and artillery barrages can’t be accessed? I can spawn the smokes, fire, and explosions, but ever since the parachute flares got added I couldn’t find them to spawn in. I’m on xbox btw if that makes a difference

worldly sphinx
tacit vigil
#

Yeah I just updated to the version that includes the artillery barrages, but I still only have access to smoke, fire, and explosions. Stuff added since the flares still ain’t tho.

#

I tried scrolling through the whole entity list, searching artillery, sorting by system etc, they just aren’t in the list lol

worldly sphinx
tacit vigil
worldly sphinx
#

whew

tacit vigil
#

Thanks dawg πŸ™

worldly sphinx
#

sure, have fun blowing things up

#

not that destruction is implemented yet but someday hopefully it will

tacit vigil
#

Yep, now time to spawn in 50 AI, and blow them up while fantasizing about being able to use mods in multiplayer on Xbox.

tulip quartz
#

Hi, I am trying to make scope two color. Using vanilla way with HDR scope map, but I cant make my scope reticle two color, like red/black.
In the script I found that widget uses SetColor to set color of the reticle. How could I make it so widget is two tone?

Edit. Solved it by overriding PIP Sights component and adding second Camera Effect with different reticle

half solstice
#

Wonder why the head doesnt show? lol

quaint rune
worn marten
quaint rune
#

Damn

empty tusk
#

Has anyone used WidgetAnimator.PlayAnimation to do a fade in? I'm trying it OnMenuInit but that doesn't seem to be the right spot

#

OnMenuOpen I'm assuming is too late. After the menu has been drawn

worn marten
#

I haven't used it yet.

empty tusk
#

A la
WidgetAnimator.PlayAnimation(GetRootWidget(), WidgetAnimationType.Opacity, 1, m_fAnimationRate);

#

I slowed the animation rate down to a crawl just to see if I wasn't seeing it but no, it fades out very slowly but doesn't do a fade in.

winged vessel
#

does the localization system not fall back to english when a runtime file isnt available in the selected language? or is that something I need to select somewhere?

queen nacelle
worn marten
worldly sphinx
#

@worn marten any clue how do I add something to display text on hover in inventory?

worn marten
#

A tooltip?

#

I have seen an option to add tooltips y will take a look this afternoon/night

worldly sphinx
#

yes

#

or an action that happens when it's clicked, could be launching a dialog

#

SCR_InventoryMenuUI

    //------------------------------------------------------------------------------------------------
    //! when clicked on item / storage slot using controller or mouse
    protected void Action_SelectItem()
    {
        // Ignore if we cannot interact
        if (!GetCanInteract())
            return;
        SimpleFSM( EMenuAction.ACTION_SELECT );
    }
#

whats this

#

no clue how to connect this to my entity tho

worldly sphinx
#

do editor attributes support strings?

winged vessel
#

any clue how to hide action menu or put my layout in front?

#

tried all sorts of Z order values

wicked zinc
#

Well, it seems to be created and handled with SCR_ActionMenuInteractionDisplay (if I understand the code correctly), so you should be able to hide/destroy it

worn marten
worn marten
worn marten
worldly sphinx
steel apex
#

Custom Intelligence folder says goodbye

worldly sphinx
steel apex
#

true, but i wanted to be able to change the message on the Fly

worldly sphinx
#

you can if it's made out of numbers

steel apex
#

Maybe i'll have to work around by sending a global Textmessage when openeing the GUI

steel apex
worldly sphinx
#

yea I'm not implementing strings in GM so imma just wait for official support

half solstice
#

Any idea to get all the items in a players inventory and show them to another grid?

minor crane
#

Folks, were there any docs regarding the RichTextWidget? What can be put there and what is the syntax?

worn marten
minor crane
worn marten
#

mmm I haven't seen shadow on text in referger (on their own menus) so maybe there isn't. If you place a TextWidget or RichTextWidget and there isn't any option in the propertis windows ...

minor crane
#

Hm.. found something:

TextWidget tWidget = TextWidget.Cast( data.m_aNametagElements[index] );
tWidget.SetColor(stateConf.m_vColor);
tWidget.SetShadow( stateConf.m_fShadowSize, stateConf.m_vShadowColor.PackToInt(), stateConf.m_fShadowOpacity, 0, 0);
worn marten
# winged vessel

Hi, this worked for me. All my UserActions Inherit from ARU_ScriptedUserAction

class ARU_ScriptedUserAction: ScriptedUserAction
{            
    //------------------------------------------------------------------------------------------------
    override bool CanBeShownScript(IEntity user)
    {    
        MenuManager manager = GetGame().GetMenuManager();
        
        if(manager.IsAnyMenuOpen() || manager.IsAnyDialogOpen())
            return false;
        else 
            return true;
    }
    
    //------------------------------------------------------------------------------------------------
    override bool CanBePerformedScript(IEntity user)
    {
        return true;
    }
    
    //------------------------------------------------------------------------------------------------
    override bool HasLocalEffectOnlyScript()
    {
        return true;
    }    
};

Sorry for the delayed response heheh I haven't had time to test it

#

oh and @wicked zinc FYI

half solstice
half solstice
#

Actually this is even better

wicked zinc
#

Actually, I don't get it πŸ€”

worn marten
#

He added more storages to the chimeraCharacter, right? I don't know if they are functional thou

half solstice
#

@worn marten top image has a dogtag in that dogtag slot

swift cosmos
#

Thank you Spyke! That's very not trivial πŸ˜„
Should probably get a page in biki

worn marten
#

you are welcome 😘

agile jungle
#

which tools do you need to setup and script a custom GUI ?

#

Wanted to do something similar to what Tarkov does with mags and being able to check your mag after shooting.

half solstice
#

The modding tools on Steam@agile jungle

worn marten
#

As Zelik has said, you have the arma reforger workbench tools on steam. If your question is more about how to setup a GUI look at pined messages.

agile jungle
#

I know about the tools I'm using the Map tools atm πŸ˜„

#

I used the A3 tools.

#

wanted to test something.

#

where it says: UI/layouts/Modded do i create it this way UI>kayout>Modded> ? or each folder ?

#

iv'e never made a UI beofore.

worn marten
#

No need for the modded folder, you can name it as you want. The UI/layout path isnt compulsory but its recomended

agile jungle
#

what I mean is do they need to be inside each other for the UI to function properly ?

worn marten
#

Nope

agile jungle
#

which file is the .c file ?

#

when I typed in the .c file name and then hit enter it brings up some other menu. Not sure which one to choose.

worn marten
#

Script file

#

Inside the folder do rightclick and select scripted file

agile jungle
#

thanks