#arma3_gui

1 messages ยท Page 6 of 1

spice drift
#

Aye, I'm aware, thanks for clarifying though.

quiet arrow
#

And in case you use 3den Enhanced. It has a tool to export all the base classes as well.

spice drift
#

Understood.

opaque crag
#

Note that if you're basing stuff on the Rsc classes, there are some organisational differences when writing a UI for a mod versus a mission.

hoary estuary
#

ui2t VS normal resampling

#

thanks for your attention

distant axle
#

Huh, ui2tex is smoother you tell me?

hoary estuary
#

Yes

#

Crashes the game randomly on stable though lol

distant axle
willow stratus
distant axle
#

I thought it is about just how Ctrl position works

distant axle
#

Which tex you use and config?

mental trench
#

Scale of the image is a power of 2

mental trench
#

I'm trying to create a custom animation effect for the RscShortCutButton.

distant axle
#

Will check later I guess

mental trench
#

Seems like it might be related to something someone else said about how ArmA 3 handles images.

distant axle
#

...But what is over4_ca.paa anyways?

mental trench
#

Just this pattern.

#

512 x 64

#

it's a replacement for the Over_ca.paa that usually goes with the RscShortCutButton.

#

Very odd quirk.

#

Cracked it.

mental trench
#

autoAdjustTexture = true;

distant axle
#

I don't recall that param tho ๐Ÿค”

desert fog
#

is there a way to disable listbox row in arsenal, to prevent players to pick up weapon/uniform when they select row?
I found in arsenal, there is LBSelChanged event, that is calling [ "SelectItem", [ ctrlParent _control, _control, _selectedIndex ] ] call BIS_fnc_arsenal;

solid gyro
#

Hello,
What events (UI Eventhandlers) I can use with

class GVAR(position) {
     control = "Combo";
     ...

I want check when combo list item is selected.

solid gyro
#

It was

quiet arrow
solid gyro
nova condor
#

Hi, everyone. How do you create a child element for control group in gui editor?

solid gyro
#

hmm,
how i can get

class GVAR(UserDefined): Title
{
    class Controls: Controls
    {

all controls from here?
i can get #control -1, which is UserDefined control, but i want child controls

quiet arrow
#

allControls command

Or controlsGroupCtrl command

distant axle
nova condor
distant axle
#

What magical numbers

nova condor
distant axle
#

What formula

#

What exactly do you see

nova condor
#

For an instance

x = "0 *   (0.01875 * SafezoneH) +   (SafezoneX + ((SafezoneW - SafezoneH) / 2))";
y = "0 *   (0.025 * SafezoneH) +   (SafezoneY)";
w = "53.5 *   (0.01875 * SafezoneH)";
h = "40 *   (0.025 * SafezoneH)";
quiet arrow
#

That's gui_grid it seems

distant axle
#

This is just a macro

solid gyro
nova condor
quiet arrow
#

It's a bit more complicated than that. You might wanna read the Biki page about GUI_GRID

quiet arrow
#

Yes

unkempt cliff
#

personally i dont think the UI editor is too bad. but the control group controls needs to be created via text or script

quiet arrow
#

I think you can create controls groups. Then you need to drag the child controls into it or so.

unkempt cliff
#

oh have to try that sometime

desert fog
#

I have BIS_fnc_holdActionAdd on object to open dialog with buttons.
Often, I hold [space] to open dialog and accidentally pressing first button that has focus in dialog.
Is there a way to prevent this accidental button press ? For now I use ctrlSetFocus on some non-essential button after I open dialog.

strange arrow
#

ctrlSetFocus is the best solution I know of.

quiet arrow
desert fog
quiet arrow
#

KeyDown event handler and the command to get the default action key.

solid gyro
#

@young patio You could share your content and where you are trying achieve?
get or set lbdata and where?

young patio
# solid gyro <@306893295211118592> You could share your content and where you are trying achi...

Currently working within an existing file where lbCurSel is typically set. Sometimes however it will not be selected, like on initialization of the dialgoue itself.

_exampleVariable = lbData[10101,lbCurSel (10102)];

Right now I am trying to create a check for if _exampleVariable does not have anything selected. Just confused on whether this would be -1 per lbCurSel or if lbData would have a default of it's own that perhaps isn't listed on the wiki.

unkempt cliff
#

i think lbData only gives you what you have given it by lbSetData

#

probably empty string otherwise

young patio
unkempt cliff
#

lbData can only contain strings so I assume empty string is default

young patio
#

This menu I am working in right now trying to case for an unselected option is inconsistent in whether a button is selected or not when it is opened. Likely due to some kind of race condition but is a pain since otherwise kind of a PITA to systemChat what it's unselected value would be.

unkempt cliff
solid gyro
#

Hello,
is there way to dynamically load items to Combo box in eden attributes.
if i use onLoad / onattributesload event it doenst save selected item.
When i open attributes again, lbcursel is 0.
So what would be correct place to append stuff ?

quiet arrow
#

If multiple entities are selected it selects nothing by default.

#

Or the common value of all entities

quiet arrow
quiet arrow
#

The function is not returning anything is it?

solid gyro
#

It just list stuff

It works, but when i select an item from the list,
Close attributes,
It doesn't show up as a selected item on the combo list when I open it again.
Like normally

quiet arrow
#

Are you sure you are saving the value?

#

What does the onAttributeSave function return?

solid gyro
quiet arrow
#

How do you expect Arma to know what should be selected then?

solid gyro
#

Though it uses the class Combo attribute save,

Seems that doesn't work on my case.
I need to do something that saves _value.

quiet arrow
#

I see..you wanted to reused the vanilla code.

#

Yeah. That might not work. Better write your own

solid gyro
quiet arrow
#

Whatever the code returns is saved

#

I am at work right now so can't really post code. But you can check out the 3den Enhanced repository.

solid gyro
#

I will, thanks

solid gyro
#

Hmm,
Only saves 0 and 1 , not 2, 3 positions.

quiet arrow
#

What exactly do you want to save?

solid gyro
#

Well nothing, because I do not need that value afterwards,

But the issue is that it doesn't save "value" on Eden, I want it to show the same value that I selected when I re-open vehicle attributes

Is the issue that I create items onload, or what?

quiet arrow
#

If you just need it for the attribute then save it in missionNamespace

desert fog
#

is there a way to disable selected row in CT_LISTBOX or CT_LISTNBOX ( disable user input )

round ore
#

Unlikely, but you can simulate this by using a value.

crude berry
round ore
#

But this command disables the entire control, not a specific row.

crude berry
brave oxide
#

Helloh peeps I need some guidance, I'm working on a mission and want to create a small gui that the players have to enter an encryption code into
I've already made the UI and I can open it fine, but I'm not quite sure whats the right way to 'extract' the text from it? At the moment I've got an editable text field for the players to write in and a button to 'confirm' the action, I assume I can use an event handler or parameter or something to get the text when the button is pressed and then check if its correct?

hoary estuary
#

ctrlText

strange arrow
brave oxide
#

thanku smart arma peeps bongocat

#

so my first thought would be to either use the event handler on its own to check the code, or alternatively to just have it put the text box's text into a variable that I can then use elsewhere

solid gyro
#

hello,
where i could find this error box ?
I have edited editboxes and i want check that added values is correct and display error message if those arent.
Tried dig from a3 configs but didnt find correct functio/ event where like in

#

similar like if i add non numerical to editXYZ editbox,

distant axle
#

AFAIK an engine driven feature

solid gyro
#

Yeah, it pop up when i press OK and values is not correclty.
Maybe i need do my own check and error message box.

distant axle
#

Not sure if it is anyhow possible to detect OK via an EH

#

(Theoretically yes using some config, but there's none as an Eden EH?)

solid gyro
distant axle
#

I said EH meowsweats

solid gyro
#

I have EH on my ok ButtonClick

#

in my own attribute

#

but yeah, i need some how check if OK pressed , maybe on attribute save , and check is values is correct, if not retrun.
Don't know.

quiet arrow
#

Is it an edit box you want to check?

#

Use EditChanged event. Then you have direct feedback.

solid gyro
quiet arrow
#

Can't you provide the parent display to the 3denMsg function?

solid gyro
#

yes i can

#

but seems it doesnt work like it should
parent is 315, return it from ctrlParent

quiet arrow
#

Hmm

#

No clue then..and I can't test right now.

solid gyro
# quiet arrow No clue then..and I can't test right now.

Do I need to do something differently?
Spawn it?
Don't know if something messes up.
Seems it's in the engine side so cannot find how it is done when you press attributes [ OK ], and you have the wrong data type on numerical data boxes.
Or like when you load a saved mission from saves, same kind of error displays on Load screen

round ore
#

What's the problem? Didn't catch.
Wouldn't something like this OK button click EH work for you:

params ["_control"];

_display = ctrlParent _control;

_input = _display displayCtrl INPUT_IDC;

_inputValue = ctrlText _input;

if (_inputValue regexMatch "^\d$") then {
    _display closeDisplay IDC_OK;
} else {
    [
        _text,
        _title,
        true, // OK button
        false, // Cancel button
        "", // icon
        _display
    ] call BIS_fnc_3DENShowMessage;
};

?

solid gyro
#

Noup, it shows up a 3DEN message, but it hides attributes display background.
When I press ok , it returns to the attributes window,
Just trying to figure out why it doesn't behave like the A3's own error message.

Not a big deal, but annoying

round ore
#

Yes, I also noticed, but it's OK for me.
Then try to investigate the function source code.

quiet arrow
#

That the att. window disappears is correct

solid gyro
#

If I remember correctly I tested all displays

#

And then it closes at 315.
Doing test...

solid gyro
quiet arrow
#

Hmm yeah. Doesn't seem to work.

#

The function usually doesn't close the parent display but it does so for the attributes window

#

It's a minor thing so.

solid gyro
# quiet arrow It's a minor thing so.

Yeah, damn I won't give up, but it seems I have to,
Cannot find a way to prevent it
Maybe I just do something else,
Force shutdown Arma if the user save list is full ๐ŸŒ

quiet arrow
#

I mean you can always prevent the input of an invalid character

solid gyro
#

I mean no error, but no input if text is not numerical?
That could be a way to handle that

quiet arrow
#

Isn't there even a property for edit controls to allow only numbers.

solid gyro
#

But the error message, what I tried to figure out, is just notification to the user on other content.
Maybe I just hint or systemChat or Eden

solid gyro
#

I need to check that too

#

Then I just need to build up new controls for those.

quiet arrow
slim shale
#

Im not sure if this is the proper channel but i was wondering if anyone knows how to do these vehicle functional screens

#

on the second pic i know how to display video with pip, but i wanted to add the menu on the bottom

hoary estuary
#

The menus are part of vehicle geometry and they're animated with model.cfg

solid gyro
# quiet arrow So what's the solution you came up with.

Well, maybe i just do hint on save error (when user save array is full) and with editXYZ maybe i just leave it.
I got working edit -> editChangedEH, but dont know do i need that .
User will do once "wrongly" and after that he wont because fnc will error if data type is wrong on position, dir or up values

quiet arrow
#

Does anyone happen to have a reliable way to detect if the cursor position is over one of the checkboxes?

#

The y pos doesn't matter as I have the path that's currently being hovered over.

#

I wonder if it's reliable to just express the start and end of the checkbox by an offset from the left. The offset being % of the total width of the control + a fixed amount for each level.

hoary estuary
#

Yeah, you'll probably need to calculate checkbox area yourself

#

maybe devs can share the hardcoded formula

quiet arrow
#

At least I got a prototype now. Next step is to test it in different display settings

round ore
# quiet arrow Does anyone happen to have a reliable way to detect if the cursor position is ov...
quiet arrow
#

The height is given in the tree control

round ore
#

But not in the listbox control.

#

Anyway, my code is for listboxes, you can adapt it for list of checkboxes.

quiet arrow
#

Thanks ๐Ÿ™‚

quiet arrow
#

I can already get the coordinates with mouseMoving event

#

And the image is not a standalone control.

tranquil iron
#

Yeah. Use the coordinates and ctrlAt to see whats under there.
And if the thing under there is a checkbox, bingo

quiet arrow
#

Huh? Interesting.

tranquil iron
#

I thought I added it to make it possible to fake mouse clicks at a position. For like UI on texture, aim at the texture to click a button and such.
So seems thats exactly what you want

quiet arrow
quiet arrow
hoary estuary
#

Wish all the magic offset formulas for pictures and texts would be released somewhere, its a pain to figure them out by trail and error

quiet arrow
#

Well. Seems my approach didn't work.

#

I changed to pixelGrid and now the offsets are wrong. hmmm

quiet arrow
#
// This is where the checkbox of the first level starts
#define TV_X_START 6.5 * GRID_W

// That's the amount we need to move to the right with each level that we go deeper
#define INDENT_SIZE_X 4.2 * GRID_W

// Width of the checkbox icon
#define CHECKBOX_WIDTH 3 * GRID_W

//...

private _checkboxStart = _indentCount * INDENT_SIZE_X + TV_X_START;
private _inCheckboxArea = _cursorPosX >= _checkboxStart && {_cursorPosX <= (_checkboxStart + CHECKBOX_WIDTH )};

This seems to work now

obtuse plover
#

Hey guys, im relatively new to this kind of thing. Im not sure if its in the right place.

Essentially what Im trying to to is take certain elements from a mod (like RHS).

And remove excess mod files that I have no interest in. And only keep the pbo files I want to actually use.

Because RHS is on my pc, ive made a copy of it and named it something else.

Lets say once Ive removed all the excess stuff. I could then publish the new file folder on the workshop and just subscribe to that?

#

If you guys could @ me with any advice I would be grateful

loud flame
obtuse plover
#

@loud flame where is the correct place to post this.

loud flame
unkempt cliff
#

does anyone know how to create really small text? I use the RobotoCondensed font but at some point it gets really blurry. (Using SizeEx to adjust size)

quiet arrow
#

What size do you use?

#

And what control.

unkempt cliff
#

RscText SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 40) * 1)";

#

i put the 40 there..

#

thats actually not su blurry yet but need smaller text

quiet arrow
#

Can you post a screenshot

unkempt cliff
#

sure this is a WIP screenshot

#

would be ideal to have readable text in those smaller flags

hoary estuary
#

The only way is ui2texture

unkempt cliff
#

that looks good. guess I will be learning to do that then. ๐Ÿ™‚

#

thx!

hoary estuary
#

Another usage example

#

Basically render controls/text in higher resolution, then resample it down as picture instead of text

unkempt cliff
#

ok

unkempt cliff
#

anyone happen to know how to get handle to the hint dialog/ctrl? i just want to change its position a bit

round ore
#

I don't think it's possible -- I even find its display/control and tried to change it, but no luck.

unkempt cliff
#

hmm i tried "RscHintGroup" but wasnt able to get the control via the current display

earnest viper
#

Hello, I'm making a stupid little mod to add a font to my mission to use in titles and such, but it isn't showing up at all in my config file. is anything here wrong?

distant axle
#

it isn't showing up at all in my config file.
How did you made it sure

earnest viper
#

I'm sorry, what do you mean?

distant axle
#

Literally. How do you test it

earnest viper
#

I enter the in-game config viewer and look at cfgFontFamilies

distant axle
#

How do you make a PBO?

earnest viper
#

Addon Builder

distant axle
#

And do you load it?

earnest viper
#

That's it

#

There was no errors when loading it

distant axle
#

Post the config

earnest viper
#

as a file, or just in sqf format?

distant axle
#

config.cpp

earnest viper
distant axle
#

config.cpp.txt

earnest viper
#

yes

distant axle
#

It's config.cpp, not config.cpp.txt

earnest viper
#

I have been told that it doesn't matter, because after you pack it it fixes it

distant axle
#

Also extra invalid comma at the bottom of the config

#

Yes it does

earnest viper
#

I can not find a file converter/opener for cpp, can Sublime text save it as so?

#

Actully, I'll check

distant axle
#

cpp is likely to be binarized automatically

earnest viper
#

So, how do I save the file as .cpp?

earnest viper
distant axle
#

Rename config.cpp.txt into config.cpp

earnest viper
#

did that

#

do i need a C++ application to recognize it?

distant axle
#

No. config.cpp is just a text file

earnest viper
#

Ok, well renaming it doesn't work for me then

distant axle
#

How it doesn't work

earnest viper
distant axle
#

Show the extension in Explorer

earnest viper
earnest viper
#

Wow.. Today I Learned. It's a CPP file now, should it work?

distant axle
#

Try it

earnest viper
#

I can see it in config, good sign!

#

Not in CfgPatches though

earnest viper
distant axle
#

How do you make it sure

earnest viper
#
titleText [ 
    "<t>Hello There!</t>",  
 "PLAIN",  
 10,  
 true,  
 true 
];

Works, can see it! But:

titleText [ 
    "<t font='PirataOne'>Hello There!</t>",  
 "PLAIN",  
 10,  
 true,  
 true 
];

Does not.

distant axle
#

Any error messages

earnest viper
#

No

#

Hmm.. it seems even if I put a vanilla font in, it also doesn't display

#

that's a brand new problem

#

fixed it

#

Any other font other than mine works

#

Ok I think I found out why

#

I'll come back after I fix this thing

earnest viper
# distant axle Any error messages

Okay, so I repacked and used a different font for unrelated reasons, this new font shows up in cfgFontFamilies, and the mod shows in cfgPatches, but it still doesn't display

wicked gust
#

hello guys im editing main menu, when i click on "configure" it end up like this, it overlay the multiplayer button, which code should i edit?

quiet arrow
#

Just don't notlikemeow

half orchid
#

Hey folks, I am working on a GUI and there is a function where the Player can open the Map, choose a Position and the Position is transfered into the GUI.

I was hoping I could leave the GUI open and open the map over the GUI (so I don't need some further magic to save all the other Inputs the Player did before) but the map always opens behind the GUI.

Is there an option I am missing?

idle spruce
half orchid
# idle spruce what is your current config? you can have things like the map on top of other di...

Well, for now I was just trying to open the map onButtonClick with openmap true.

Seems this is not gonna fly as I found nothing where I could determine something like a order in which Displays are shown.

So now I am thinking about creating another Display with the Map over the other display but honestly, I might come back to my initial thought and just "save" the values in a variable and close and create the dialog again ^^

strange arrow
#

@half orchid Here's what I do:

//Add a Mission Event Handler to handle left-clicks on the map:
private _mapSingleClickEH = addMissionEventHandler ["MapSingleClick", {
    params ["", "_clickPos"];

    /* Do something with _clickPos here ... */

    [] spawn {
        sleep 1;
        openMap false;
    };

    removeMissionEventHandler [_thisEvent, _thisEventHandler]; //Prevents the player from marking a new position before the map has been closed.
}];

/* Save existing inputs from your GUI here ... */

//Open the map:
closeDialog 0;
openMap true;
systemChat "Left-click on the map to mark a position.";

//Add a Mission Event Handler to handle the map being closed:
addMissionEventHandler ["Map", {
    /* Create your GUI again here ... */

    removeMissionEventHandler ["MapSingleClick", _thisArgs # 0]; //The player can close the map without left-clicking.
    removeMissionEventHandler [_thisEvent, _thisEventHandler];
}, [_mapSingleClickEH]];
idle spruce
#

Experimenting with separating my modules since they are starting to get up in number. Should I keep them all in one tab, or separate them?

vapid cape
#

Personally, I like the "all in one category" look until the list requires you to actually scroll up and down just to escape it haha

outer oar
#

People can filter by mod if they wanna see all your stuff at once

loud flame
old meadow
#

I'm trying to improve on cTab's TAD map control (https://github.com/jetelain/cTab/blob/master/%40cTab/addons/cTab/TAD/cTab_TAD_controls.hpp) usable on aircraft by implementing a map color scheme similar to that of Enhanced GPS (https://steamcommunity.com/workshop/filedetails/?id=2480263219), with highlighted power lines and terrain that is higher than the current altitude.
Just a small issue:
Enhanced GPS uses the entries altitudeMapColorHigh/Mid/Low to define terrain coloring, but it isn't applied to the cTab RscMapControl. Is there any way to make it so?

proven obsidian
#

I'm sure this has been asked a gajillion times, is there anyway to get an image 100% to scale from border to border in UI, for a 2048x2048 image? I need to be able to center it at all times.

quiet arrow
#

So you want it to zoom in if it would not fill the screen?

proven obsidian
#

yes essentially

quiet arrow
#

Set it to the width of the monitor and calculate the needed height of the control by the aspect ration. Once you have the size of the control set. Center it on screen.

proven obsidian
#

I've sent a DM example, will try to look at what you're saying here ๐Ÿ˜ฎ

uncut apex
#

is it possible to make NVGs PiP

mental trench
#

I am not sure if this the right channel to ask this question, but I need help i keep getting this undefined base class RscPicture even though it on there. what do i need to do to fix this?

#define true 1
#define false 0

class RscTutGUITextures
{

    idd=7801;
    movingEnable = false;
    enableSimulation = true;
    fadein=0;
    duration = 1e+011;
    fadeout=0;
    OnLoad = "";

    controlsBackground[]={};
    controls[]=
    {
        RscTablet
    };
    objects[]={};


class RscTablet: RscPicture
    {
        idc = 1;
        colorBackground[] = {0,0,0,1};
        colorText[] = {1,1,1,1};
        text = "image\40x26px.paa";
        x = 0 * safezoneW + safezoneX;
        y = 0 * safezoneH + safezoneY;
        w = 1 * safezoneW;
        h = 1 * safezoneH;
    };
};
loud flame
#

You're also missing quotes around RscTablet in your controls list

strange arrow
mental trench
#

ohhh

mental trench
unkempt warren
# uncut apex is it possible to make NVGs PiP

Theoretically yes,
I've seen most of the individual pieces required to make it work
You might want to look at the dual render scope from the REAP-IR mod, they successfully got a PiP screen with a menu working in a scope
I can't help much with implementing it though

uncut apex
unkempt warren
#

The laggy issue should be less with some of the new stuff in perf/prof branch
The reap-ir mod seemed to have dealt with lag mostly, at least in the virtual arsenal

mystic thicket
#

hi, is there a guide or any documentation on the rhs pip optics framework?

#

or atleast where could I look for it in the pbo

loud flame
#

If it is their own system, it's probably not documented

mystic thicket
#

alr thanks

unkempt warren
outer oar
#

They do not

brave oxide
wooden jolt
#

I have added an item to the RscGroupRootMenu (the simplified command menu). However, it appears at the bottom. How can I adjust its position?

wooden jolt
brave oxide
wooden jolt
half orchid
#

Hey folks, I have a question regarding GUIs, evne though its not modding, I hope this is the right place.

I have addActions and ACE Interactions to spawn a function that create the dialog but sometimes it seems like the GUI just shortly pops up and disappears instantly.

Anyone has an idea what could be causing this?

quiet arrow
#

Post the code.

half orchid
#

Calling the function


    // VLS Terminal
    _condition = { vlsStatus < 4 && ((vlsRolesCMDR findIf {_x == vehicleVarName player;} > -1) || (vlsRolesCMDR findIf {_x == groupID group player;} > -1) || (vlsRolesCMDR findIf {_x == player getVariable "loadout";} > -1)) };

    _modifierFunc = {
        params ["_target", "_player", "_params", "_actionData"];
            
        // Getting the Status suffix for the Aactionname
        _status = "";
        switch vlsStatus do {
            case 1 : {_status = " (Call in Progress)";};
            case 2 : {_status = " (Executing Strike)";};
            case 3 : {_status = " (Preparing new Strike)";};
            default {_status = "";};
        };
        
        // Modify the action - index 1 is the display name, 2 is the icon...
        _actionData set [1, format ["VLS Terminal%1",_status]];
    };
    
    _vlsTerminal = ["VLS Terminal","VLS Terminal","A3\ui_f\data\map\mapcontrol\Stack_CA.paa",{[] spawn vlsDialog_fnc_vlsCreateDialog;},_condition,{},[],"",0,[false, false, false, false, false],_modifierFunc] call ace_interact_menu_fnc_createAction;
    [(typeOf player), 1, ["ACE_SelfActions"], _vlsTerminal] call ace_interact_menu_fnc_addActionToClass;

#

The function calling the dialog:


if (vlsStatus > 0) exitWith {
    switch vlsStatus do {
        case 1 : {["VLS not available. Another Element is currently requesting a VLS Strike", "Error"] call BIS_fnc_guiMessage;};
        case 2 : {["VLS not available. VLS strike in progress", "Error"] call BIS_fnc_guiMessage;};
        case 3 : {["VLS not available. Readying missile array after firemission.", "Error"] call BIS_fnc_guiMessage;};
    };
};

createDialog "vlsDialog";

_map = findDisplay 99005 ctrlCreate ["RscMapControl", -1];
_map ctrlMapSetPosition [safeZoneX + safeZoneW * 0.316,safeZoneY + safeZoneH * 0.333,safeZoneW * 0.369,safeZoneH * 0.368];

vlsStatus = 1;
publicVariable "vlsStatus";

createMarker ["vlsMrk",[0,0,0]];
"vlsMrk" setMarkerAlpha 0;
"vlsMrk" setMarkerType "mil_destroy_noShadow";
"vlsMrk" setMarkerText "VLS Target";

_menuEntry = format ["Cruise Missile HE (%1 Missiles)",vlsHERounds];
lbAdd [9900501,_menuEntry];
_menuEntry = format ["Cruise Missile Cluster (%1 Missiles)",vlsClusterRounds];
lbAdd [9900501,_menuEntry];

lbSetCurSel [9900501,0];

[] onMapSingleClick {

    _firezoneCheck = false;

    {    
        _fireZoneCheck = _pos inArea _x;
    }forEach vlsNoFireZones;

    if (_fireZoneCheck) exitWith {
        ["Target is in No Fire Zone!", "Error"] call BIS_fnc_guiMessage;
    };
    
    "vlsMrk" setMarkerPos _pos;
    "vlsMrk" setMarkerAlpha 1;
};

sleep 2;

if (findDisplay 99005 == displayNull) exitWith {
    hint "Error when calling Terminal"; 
    deleteMarker "vlsMrk";
    onMapSingleClick "";
    vlsStatus = 0;
    publicVariable "vlsStatus";
};
half orchid
strange arrow
#

Is there any code that closes vlsDialog (e.g. onButtonClick UI EH) or does it stay on screen for eternity? ๐Ÿ˜›

crude berry
#

[] onMapSingleClick { meowhuh oh wow, i don't remember alt syntax at all

half orchid
#

Eventhandler for ESC

//Remove ESC Close Display
(_display) displayAddEventhandler ['KeyDown', {(_this select 1) isEqualTo 1}];

//Add new ESC functionality
(_display) displayAddEventhandler ['KeyDown', {                                            
                                                    //Add new function for ESC key
                                                    if ((_this select 1) isEqualTo 1) then {
                                                        call vlsDialog_fnc_vlsCloseDialog;
                                                    };
                                                }];

vlsDialog_fnc_vlsCloseDialog:

closeDialog 0;
deleteMarker "vlsMrk";
onMapSingleClick "";

vlsStatus = 0;
publicVariable "vlsStatus";
#

There is also an Exit button in the GUI that calls the close function

half orchid
crude berry
#

toString {code} can help with that as well (just to have at least some positive input in the convo)

half orchid
#

And just to clarify: Everything works fine in the dialog. It is just, sometimes it won't open, will change the status but not change the status back. It's weird... very weird. I was hoping I was just missing something about ACE Selfinteract or calling a dialog that could make it somehow more reliable.

half orchid
strange arrow
half orchid
#

Thats whats making me really crazy ๐Ÿ˜„

#

And the brute force control at the end is not helping with it. Seems like somehow, just half of the function is executed.

#

I know, this should not be possible, it's just how it feels to me. And yeah, tried that on dedicated, localserver and in singleplayer. Always the same. Sometimes works like a charm, and then suddenly the one time this fails.

strange arrow
#

So it can fail in singleplayer too?

half orchid
strange arrow
#

That's good, it makes troubleshooting easier ๐Ÿ‘

half orchid
#

At least when testing in Eden editor

#

I have the feeling it could be something about the publicVariable command. I had that now on several occasions on dedicated servers, that the publicVariable was not executed porperly, meaning the variable was not promoted to the server.

#

I am wondering if this would be more reliable when using missionnameSpace getVariable / setVariable.

strange arrow
#

Could be; I never use publicVariable (but the Wiki claims that it is reliable).
Technically, your code is also prone to race conditions as soon as there are at least two players using your VLS Terminal, but I don't think that's a major issue right now (especially considering that you can reproduce the problem in singleplayer).

half orchid
#

Thats why I am trying to block the Terminal when one has it opened.

strange arrow
#

There are a few other things in your code that are known to sometimes cause problems:
1๏ธโƒฃ You use lbAdd [idc, text]. IDC-based syntaxes are unreliable, it is better to use control lbAdd text instead. Same for lbSetCurSel, etc.
2๏ธโƒฃ You use onMapSingleClick. There could always be a mod or mission script that overwrites your onMapSingleClick code. It is better to use a MapSingleClick Mission EH.
3๏ธโƒฃ I don't understand what the if (findDisplay 99005 == displayNull) exitWith { ... } block in vlsDialog_fnc_vlsCreateDialog is for. Have you ever gotten that Error when calling Terminal hint?
4๏ธโƒฃ I'm pretty sure that you can combine your two onKeyDown UI EHs into one:

_display displayAddEventHandler ["KeyDown", {
  private _isEscKey = (_this # 1) == 1;
  if (_isEscKey) then {
    call vlsDialog_fnc_vlsCloseDialog;
  };
  _isEscKey
}];
#

I suggest fixing these potential issues. If you can still reproduce the bug after fixing these things, put a bunch of systemChat / diag_log statements into the code so that you can see how much of the code is executed and what values the important variables have.

half orchid
#

To 1: Okay, didn't know that this i unreliable. Will change that

To 2: Didn't know that either. onMapSingleClick always seemed easiert to manage for me than an EH, but will change that too.

To 3: This was my brute force Idea to catch this weird error that we are talking about, but yeah, does not work for some reason.

To 4: Tried that at first. Didn't work then, but I changed also the closeDialog function, so yeah, maybe this works now. Will try.

#

Thanks so much for the suggestions. I know, its a frustratingly obscure problem so thanks for sticking with me.

mystic thicket
#

how do I create a display on a r2t

distant axle
#

You don't

mystic thicket
#

oh lol ok

#

what can I do then

distant axle
#

Do you mean ui2tex

mystic thicket
#

na just like a picture in picture thing

#

say I have a camera somewhere and that renders onto a screen

distant axle
#

That is r2t display, not display on r2t?

mystic thicket
#

I want to put something ontop of a PiP screen

distant axle
#

Do you know how to make GUI, r2t setup etc

mystic thicket
#

I have my r2t setup

#

and I have made gui before

distant axle
#

Then it is easy. Put controls over r2t control

mystic thicket
#

oh alright, thank you

wooden jolt
#

Is there a function/script to add an item to a command menu (eg. RscGroupRootMenu or RscMenuMove) dynamically?

sudden girder
#

Not sure where to post but I'm trying to make a mod that brings up my tablet i have made. I have the dialog file made and the picture for it. but im having a problem with the game running/bring up the mod. Not sure what im doing wrong.

idle spruce
#

You might need to learn how to use it first. But it's very important to know in the programming world. That link leads to nothing.

wooden jolt
#

Does anyone know the Display ID and Ctrl ID of the commanding menu? The one you get when selecting units.

unkempt cliff
formal brook
#

Good day, I need to make a text with a scrollbar that will keep scrolling down as new info added.
I'm closing on plan inolving CT_LISTBOX and ctrlSetScrollValues, but is there a better alternative?

unkempt cliff
formal brook
#

I'm not sure how it is applicable in my case ๐Ÿค” Could you elaborate?

unkempt cliff
#

isnt it auto scroll you want?

crude berry
#

secndCollumW ๐Ÿคฎ

#

(not related to the question)

crude berry
formal brook
formal brook
vapid cape
#

Is there a way I can execute a script in the main menu to randomize a custom background image control like this? The randomization doesn't execute/work, but I am having a hard time understanding how GUI works in general. This is my class inside of RscDisplayMain->controlsBackground which currently can display a static background image regardless of -skipintro: ```
class my_test_Background: RscPicture {
idc=202412;
onLoad="[_this] call '\testbg\bgrandom.sqf'";
text="\testbg\images\menu_1.jpg";
x="safeZoneX";
y="safeZoneY";
w="safeZoneW";
h="safeZoneH";
};

Where bgrandom.sqf is just this to see if it works:

params ["_display"];
ctrlSetText [
_display,
(selectRandom [
"\testbg\images\menu_1.jpg",
"\testbg\images\menu_2.jpg",
"\testbg\images\menu_3.jpg",
"\testbg\images\menu_4.jpg"
])];

loud flame
#

That's not the right syntax for ctrlSetText if you're using an actual control

vapid cape
#

Oh good catch, thank you. I changed it to _display ctrlSetText _randomPick where _randompick is just the same selectrandom for images but no change. I'm wondering if setting the text in the actual class is somehow overriding it maybe? Still trying some different combos.

loud flame
#

That's not the issue

#

You also need to commit the changes with ctrlCommit if you're not already

vapid cape
#

I was not committing it, another good catch (thank you) but still no change, here's the contents of bgrandom.sqf now:

_randompick = selectRandom [
    "\testbg\images\menu_1.jpg",
    "\testbg\images\menu_2.jpg",
    "\testbg\images\menu_3.jpg",
    "\testbg\images\menu_4.jpg"
];
_display ctrlSetText _randomPick;
_display CtrlCommit 0;```
loud flame
#

Your onLoad doesn't call your script by the way

#

call takes a code block, you're currently giving it a string

#

You'll also need to pull the function from uiNamespace iirc
So something like:

onLoad = "call (uiNamespace getVariable 'TAG_fnc_mainMenuOnLoad')";
vapid cape
# loud flame You'll also need to pull the function from uiNamespace iirc So something like: `...

Sorry for the delay in reply here. I did a lot of testing and moving some thingies around, then defined testbg_fnc_bgrandom, which I changed to select the custom control idc at the bottom:

_randompick = selectRandom [
    "\testbg\images\menu_1.jpg",
    "\testbg\images\menu_2.jpg",
    "\testbg\images\menu_3.jpg",
    "\testbg\images\menu_4.jpg"
];
((allcontrols findDisplay 0) select 0) ctrlSetText _randomPick;
((allcontrols findDisplay 0) select 0) CtrlCommit 0;

If I open the editor and call the function, then return to the menu, I now have a randomly selected bg! However, it still isn't firing off when the game loads or if I return to the menu without manually calling the fnc in the editor debug console.
The background image class in rscdisplaymain -> controlsbackground is now:

class my_test_Background: RscPicture {
    idc=57500;
    onLoad = "call (uiNamespace getVariable 'testbg_fnc_bgrandom')";
    x="safeZoneX";
    y="safeZoneY";
    w="safeZoneW";
    h="safeZoneH";
};

Am I still calling the function incorrectly there? Is this something that can happen in controlsBackground classes anyway?

loud flame
#

Am I still calling the function incorrectly there?
That's correct there

Is this something that can happen in controlsBackground classes anyway?
Not sure, I don't touch GUI often enough to know about potential cases like that

vapid cape
#

Understood. I can just keep trying things from here- thank you very much for your help! It's so close to working.

loud flame
#

You could do a systemChat / diag_log to test if your function is being called when opening the main menu for the first time

#

systemChat should show on the main menu iirc, but diag_log will definitely work

vapid cape
#

The systemchat does show when I add it to the fnc and relaunch

loud flame
#

You could try wrapping it in a CBA_fnc_execNextFrame, it might be running too soon after the display is created?

vapid cape
#

I tried CBA execnextframe and execnextNframes but both didn't do anything at all, not even the systemChat part of the function. It seems like no matter where the control my_test_background goes it can't be changed, but once you load up in the editor and run the function it does do what it's supposed to do and changes the bg when you go back

idle spruce
loud flame
#

Didn't realize next Frame used it

woven lion
#

How come my RscObject isn't showing up in my dialog?

        {
            idc = 1600;
            x = 0.5;
            y = 0.5;
            
            model = "MAA\data\HE 441.p3d";
            scale = 0.35;
            //direction = "";
        };```
#

been scouring the forums for like an hour trying to figure this out

#

Oh shoot does it need to go in class objects instead of class controls?

strange arrow
woven lion
#

Thanks, somehow I never scrolled down that far...

woven lion
#

What do I use to edit the direction of the RscObject in game? ctrlSetModelDirAndUp doesn't seem to be working...

    {
        class RscObject_1600: RscObject
        {
            access = 0;
            shadow = 0;
            idc = 1600;
            type = 80;
            model = "MAA\data\HE 441.p3d";
            x = 0.5;
            xBack = 0.5;
            y = 0.12;
            yBack = 0.12;
            z = 0.22;
            zBack = 0.22;
            inBack = 0;
            enableZoom = 0;
            direction[] = { 0, 0, 1 };
            up[] = { 0, 1, 0 };
            zoomDuration = 1;
            scale = 0.7;
            waitForLoad = 0;
        };
    };```
#

This is the code that I'm using to try to change the direction, via a onSliderPosChanged eventHandler


_yaw = 0; _pitch = 0; _roll = _value;
RscObject_1600 ctrlSetModelDirAndUp [
    [sin _yaw * cos _pitch, cos _yaw * cos _pitch, sin _pitch],
    [[sin _roll, -sin _pitch, cos _roll * cos _pitch], -_yaw] call BIS_fnc_rotateVector2D
];```
quiet arrow
#

maybe ctrlCommit?

woven lion
#

Make it into an animation?

quiet arrow
#

No just update it's position and do
ctrl ctrlCommit 0

woven lion
#

Aha

#

I'll try it

#

nah that didn't work

round ore
#

What's RscObject_1600? The class name? If so, then it won't work.

woven lion
#

yeah it is. What do I put instead? I tried putting just the idc and it didn't like it

round ore
#

You should put your control.

woven lion
#

Oh, sorry. RscObject is the class name and RscObject_1600 should be the actual object

woven lion
#

Is it because it needs to be put in class Controls? I tried that and the model didn't show up

round ore
#

As I wrote, you should pass the control to ctrlSetModelDirAndUp, not the class name:

((ctrlParent _ctrl) displayCtrl 1600) ctrlSetModelDirAndUp [...];
woven lion
#

*cosmic screaming noises*

#

Thank you

plain hearth
#

Hello, is anyone aware how the buttons in virtual arsenal are created and updated?
onEachFrame? It's like drawicon3d but interactable and also like it's attached to certain position?
How would one do that?

Using drawIcon3D obviously can't make it interactive, I've tried doing drawIcon3D on an object and then creating empty display (in order to show cursor) and then trying to get that same position and create invisible button but I'm not getting it to work

round ore
#

It's regular display created on mission display:

#include "\a3\ui_f\hpp\defineResincl.inc"

(findDisplay IDD_MISSION) createDisplay "MyArsenalDisplay";
plain hearth
#

I'm not sure you understood what I meant.
You know the 'icons' attached to the player? Like the one for rifle, headgear, vest... how are they created attached and made interactive?

#

Are they just ordinary RscButton getting the 3d position from selection of player converted to 2d coords and then ctrlSetPosition on that position while the wanted location is updated every frame?

#

If you rotate the camera the buttons follow.

round ore
#

That's regular controls whose position is changed in Draw3D event handler.

plain hearth
#

I'm confused how to use Draw3D to create RscButton

quiet arrow
#

You use the event handler to update their position each frame that's all.

round ore
plain hearth
#

Understood, how to properly get the 3D position of object?
e.g I have a infostand and this "modelToWorldVisual [0,0,0.5]" which is the position I want, kinda in the middle of the white part of it, how can I keep it facing player? What do I need to use? worldToScreen ASLtoAGL getPosASL cursorObject?

plain hearth
#

_kk = worldToScreen ASLtoAGL getPosASL cursorObject,
_sX = _kk select 0;
_sY = _kk select 1;

right and then _ctrl ctrlSetPosition [_sX, _sY]; ?

#

that's not working for me

round ore
#

Play with commands, I can't write working code in my head.

plain hearth
#

yup figured it out thanks

hoary estuary
#

Keep in mind that worldToScreen can return empty array if entity is not even closely visible

devout sparrow
#

Righto, I've hit a wall with a custom main menu I have been working on.
Briefly, I've deleted a3's vanilla main menu ( delete RscDisplayMain;), copied RscDisplayMain and edited it, removing parts of the menu and adding custom UI.
I have a controls group that I can toggle on/off via a button to customise the look of the main menu. The preference is saved to profileNamespace and the controls group is shown/hidden with ctrlShow.
The only way I have been able to have the controls group shown/hidden take effect is upon restart or when clicking the OK button in the profile manager. Both of which initDisplay is run.

Is there a way I can get around this and "reInit" the display from my own script?

formal brook
#

Good day. I must be missing something. How do you define UI that will look relatively the same in all resolutions and aspect ratios?
I was using (straight from gui editor's 'Grid Macros')

#define UI_GRID_X    (0.5)
#define UI_GRID_Y    (0.5)
#define UI_GRID_W    (2.5 * pixelW * pixelGrid)
#define UI_GRID_H    (2.5 * pixelH * pixelGrid)

But still UI get completely different in scale based on player screen resolution ๐Ÿค”

quiet arrow
formal brook
quiet arrow
#

Basically, you want your x and y values be anchored to either GUI_GRID_CENTER_X or GUI_GRID_CENTER_Y. Then you move them by adding or substracting GUI_GRID_CENTER_W and GUI_GRID_CENTER_H for Y. That means your are moving your controls in grids.

#
//--- Okay, will use entire available space:
x = GUI_GRID_CENTER_X + 0 * GUI_GRID_CENTER_W;
y = GUI_GRID_CENTER_Y + 0 * GUI_GRID_CENTER_H;
w = 40 * GUI_GRID_CENTER_W;
h = 25 * GUI_GRID_CENTER_H;
#

The default Arma 3 grid has 40 grids in width and 25 grids in height. That guarantees that even on the largest UI size the UI is displayed fully.

round ore
#
w = 40 * GUI_GRID_W;
h = 25 * GUI_GRID_H;

?

quiet arrow
#

It's a complex topic so don't get discouraged if you don't get it immediately

round ore
#

Also, for new dialogs I would recommend using pixel grid.

strange arrow
# devout sparrow Righto, I've hit a wall with a custom main menu I have been working on. Briefly,...

I have a controls group that I can toggle on/off via a button to customise the look of the main menu. The preference is saved to profileNamespace and the controls group is shown/hidden with ctrlShow.
The only way I have been able to have the controls group shown/hidden take effect is upon restart or when clicking the OK button in the profile manager.
So when the button is clicked you run some code that should hide the controls group but it doesn't (always) work? Can you post the code?
Both of which initDisplay is run.
What is initDisplay?

devout sparrow
# strange arrow > I have a controls group that I can toggle on/off via a button to customise the...

Whoops, initDisplay (BIS_fnc_initDisplay) was not what I was trying to remember. I blame tiredness. ๐Ÿ˜†
What I meant to refer to was this comment in RscDisplayMain.sqf:
//--- Main menu display is loaded at start of the game and when returning from the profile menu

I'm using CBA and it's mod structure.
So in CfgEventHandlers.hpp I have this:

class Extended_DisplayLoad_EventHandlers {
    class RscDisplayMain {
        GVAR(loadMainMenu) = QUOTE(_this call COMPILE_SCRIPT(init_loadMainMenu));
    };
};

Snippet from init_loadMainMenu.sqf:

// _getMenu is the variable saved in profileNamespace for the layout preference.
// Using switch as to choose from multiple main menu layouts.
switch (_getMenu) do 
{
    case 0: 
    {
        // _enhancedMainMenu is the idc of the controls group.
        _enhancedMainMenu ctrlShow true;
        // _emm_button is the button with this EH.
        _emm_button ctrlAddEventHandler ["ButtonClick", {
            profileNamespace setVariable [QGVAR(mainMenuSelect), 1];
            saveProfileNamespace;
            _enhancedMainMenu ctrlShow false;    
        }];
    };
    case 1: 
    {
        _enhancedMainMenu ctrlShow false; 
        _emm_button ctrlAddEventHandler ["ButtonClick", {
            profileNamespace setVariable [QGVAR(mainMenuSelect), 0];
            saveProfileNamespace;
            _enhancedMainMenu ctrlShow true;
        }];
    };
};

The controls group itself is in a .hpp file included in RscDisplayMain.hpp.

#

Additionally, I can click the button, and it does nothing until the game is restarted, or I go into the profile manger and click OK.

solid gyro
#

Something's changed in the editor attributes?
Before (last year, a couple months ago),
CheckBox onLoad ->
Get checkbox cbchecked -> enable x controls from Ctrl grp, disable x controls from Ctrl grp.
Works onCbCheckedChanged event,
But not on onLoad event.
Tested with and without spawn (do I need add some wait ?)

Or do I need to do something else?

hybrid wraith
#

@tranquil iron just how did you managed the Blazer integration?!
Awesome work!

tranquil iron
strange arrow
#

Bonus problem: Let's say QGVAR(mainMenuSelect) was 0 when init_loadMainMenu.sqf ran. Now, the user clicks the button and QGVAR(mainMenuSelect) is set to 1. Next, the user clicks the button again to go back to the other layout - but nothing happens because the onButtonClick EH always runs the same code, even if QGVAR(mainMenuSelect) changes after the EH was added.

solid gyro
small aspen
#

move

elder tartan
#

Could someone help me with getting this to work properly for both 16:9 and 21:9 ratio monitors, right now it works with 21:9, but the width of the RscText isn't wide enough when on 16:9 screen:

class OSDialog {
    idd = 13371338;
    movingEnable = 1;
    enableSimulation = 1;
    
    class controls {
        class Background: RscPictureKeepAspect {
            idc = -1;
            x = safeZoneX - (safeZoneW * 0.675);
            y = safeZoneY - (safeZoneH * 0.675);
            w = safeZoneW * 2.35;
            h = safeZoneH * 2.35;
            text = "\SOG_OS\data\SPEARNET_FX_Monitor01_CA.paa";
        };

        class OS: RscText {
            type = 106;
            idc = 1338;
            x = (safezoneX + (safezoneW - ((safezoneW/safezoneH) min 1.5))/2);
            y = safezoneY + (safezoneH * 0.0825);
            w = ((safezoneW/safezoneH) min 1.5);
            h = safezoneH * 0.825;
        };
    };
};
distant axle
#

Can you show me how it looks in 16:9 and 21:9?

elder tartan
#

First Image is 16:9, second image is 21:9:

distant axle
#

So the issue here is usage of safeZoneX/W, which is not an absolute something but related to screen ratio etc. I would use Y/H to calculate the absoulte square, and convet to X/H. Multiply and/or divide with pixelW and pixelH could be a solution

elder tartan
#

Thanks for the info, I was able to get it to work using the pixel grid

solid gyro
#

How to resize RscControlsGroupNoScrollbars onLoad
Because if I want to ctrlShow false for 2 ctrls and set h size 2 Ctrls smaller.

round ore
solid gyro
round ore
#

But I assume you have a markup of your dialog, if so what is the problem with setting the right size in the markup?

round ore
solid gyro
#

Depending on the selection from the combo box I enable those 2 Ctrls

round ore
#

So you need to change the size in onLBSelChanged EH of the combo control, not onLoad EH.

round ore
solid gyro
solid gyro
solid gyro
#

Well figured out , but not easy solution.
I need setup my entrire rcs again.

strange arrow
#

As I understand it you have a structure like this ...

ControlsGroup G {
  Control A {}
  Control B {}
  Control C {}
  Control D {}
}
```... and you want to be able to reduce the height of `G` when you hide `C` and `D` without making `G` scrollable.
I'm pretty sure that `C` and `D` still take up space in `G` and force the controls group to be large enough to accommodate their (`x` and `y`) coordinates, even if the controls are invisible. So I think what you have to do is this:
```sqf
private _hG = (ctrlPosition G) # 3;
private _hC = (ctrlPosition C) # 3;
private _hD = (ctrlPosition D) # 3;

G ctrlSetPositionH (_hG - _hC - _hD);
G ctrlCommit 0;

{
  _x ctrlSetPosition [0, 0, 0, 0];
  _x ctrlCommit 0;
} forEach [C, D];
```Another option would be deleting and recreating `C` and `D` as needed (i.e. `ctrlDelete` and `ctrlCreate`), then you don't have to deal with the sizes and positions of controls that are disabled and invisible anyways.
solid gyro
# strange arrow As I understand it you have a structure like this ... ``` ControlsGroup G { Co...

Yes.
But that is created with Zeus attributen onload,
And yes.a
The second solution is better, that is what I took to use.
But still title, backround, content and ok/ cancel button need re-set.
Didn't realize where my issue was.
So structure is

class Controls: Controls {
        class Background: Background {};
        class Title: Title {};
        class Content: Content {
            class Controls {
                class GVAR(scroll): RscControlsGroupNoScrollbars {
.....

So I need do my own or just do like it done in

"\a3\ui_f_curator\ui\displays\RscDisplayAttributes.sqf"

spice drift
#

Hello. Is there some way of highlighting specific rows in a CT_LISTNBOX even when the control is disabled? I want to lock the CT_LISTNBOX and navigate through it via separate buttons.

spice drift
#

No joy.

distant axle
#

So do you mean you don't want users to use mouse, but only keyboards?

spice drift
distant axle
#

So entirely disabled input but only scripted ones

spice drift
#

Basically I want to scroll through the lower part of this screen using the four directional button in the lower part.

spice drift
spice drift
solid gyro
spice drift
unkempt cliff
#

have you defined colorSelectBackground colorSelect etc?

spice drift
#

Tried, doesn't work.

spice drift
#

Might have to just overlay another element on top of an enabled ListNBox... Didn't work.

unkempt cliff
#

have you tried clicking the row? sounds like theres something funny going on....

spice drift
#

Yep, I have, multiple times.

unkempt cliff
#

and no selection colors?

spice drift
#

Nope, because it's a disabled control.

unkempt cliff
#

oh right

#

enable it for moment?

spice drift
#

Just did, works perfectly fine when enabled, selection colors show up and all, but not when it is disabled.

unkempt cliff
#

ok hmmm

#

so you dont want it to be clicked thats why you disable it?

unkempt cliff
#

ok what if you override the click event instead and leave the control enabled?

#

dont know if thats possible though

spice drift
#

Hadn't considered that actually, but I doubt it's possible.

unkempt cliff
#

but i guess it doesnt allow override, some events allow that

spice drift
#

Let's find out.

#

Nope

unkempt cliff
#

:/

spice drift
#

I'll have to have a mighty think about this some other time, approach it with a new perspective.

#

Thank you anyways fellas

unkempt cliff
unkempt cliff
#

i thought so

#

oh its onLBSelChanged for LNB

#

hope you dont endup in inifite loop though if you reselect the item via script command

quiet arrow
#

Just create your own highlight with a frame build from some CT_STATIC controls.

#

You can get the position in the mouseMoving event.

spice drift
#

Yeah, I figure that'll be the best solution at this point.

empty token
#
_w = safeZoneW * 0.5;
_h = safeZoneH * 0.5;
_x = (safeZoneX + safeZoneW) - _w;
_y = ((safeZoneH - _h) / 2 + safeZoneY);

Need help making this ctrl box centered vertically and stick to the left side of the screen.

distant axle
#
_x = safeZoneX;
_y = 0.5 - _h/2;```
empty token
empty token
#

i wonder if theres another way to vertically align

crude berry
#

i'd assume vertically aligning the entire control could do that blobdoggoshruggoogly

alpine topaz
#

Hey i am trying to add a custom video on main menu using this class videoOverlay : RscVideo { idc = -1; x = "safezoneX + (safezoneW / 2) - (4 * pixelW * pixelGrid * 2)"; // Center horizontally y = "safezoneY + (safezoneH / 2) - (4 * pixelH * pixelGrid * 2)"; // Center vertically w = "16 * (pixelW * pixelGrid * 2)"; h = "16 * (pixelH * pixelGrid * 2)"; autoplay = 1; loops = 1; video = "gac\video\intro.ogv"; text = "gac\video\intro.ogv"; };

#

but i am unable to see it, while in pbo there is inside the ogv file

alpine topaz
#

why isnt a thing anymore to play a video on main menu? only static image

unkempt warren
#

Do you have the static background launch parameter on?

alpine topaz
#

nope

#

i see this is a thing but i cant find any solution a week now

unkempt cliff
#

have you tried with existing videos?

alpine topaz
#

yes

#

i would like to get an example config although just to be sure i am doing this correctly

unkempt cliff
#

use config browser to find the GUIs

alpine topaz
#

Managed to play my video but in the spotlight so i guess i have to work also with sqf to make it work correctly

alpine topaz
#

Oh ok i am totally totally dumb, my mistake was on Addon builder, i forgot to add some extensions...

#

Anyone knows which class refers to the grey image when static background is selected?

stoic delta
#

Hey guys, is there any tool out there besides the vanilla GUI editor that is easy to use for creating more complex GUIs? I'm trying to make essentially a tablet that has "tabs" which will display certain control groups. I know how to do what I want i just want to know if there is a tool out there that makes creating the GUI configs easier so i don't have to constantly reload my mission every time i make a correction to the GUI

quiet arrow
#

No Tool for that.

#

You don't have to reload your mission. Just save it and create the UI in eden editor

stoic delta
#

how would you go about creating multiple overlapping control groups then?

#

also the GUI Editor doesn't seem to have all available types/styles. Ex: toolboxes

unkempt cliff
stoic delta
#

So i have created a CT_TOOLBOX control and can not get any events to fire on it. I have done both class definition of the event onLBSelChanged and tried applying the event via code ctrlAddEventHandler and neither seem to be working. I have also tried the alternative onLBListSelChanged w/o success

stoic delta
#

@crude berrymy hero lol. Wiki says that they take LB events which makes no sense seeing that lol

steady badge
#

Hey, Im looking into getting the camera to change to the selected unit but it seems to choose one and then never change. Any hints?

_cam = missionNamespace getVariable "_cam";
_index = lbCurSel 1500; //reference to RscListBox containing units
_unit = playerListArray select _index; 


if (isNil "_cam") then {
    _cam = "camera" camCreate [0, 0, 0];
} else {
    camDestroy _cam;
    _cam = "camera" camCreate [0, 0, 0];  
};


_unit = playerListArray select _index;

_eyeDir = eyeDirection _unit;
_cam setVectorDir _eyeDir;
_cam cameraEffect ["INTERNAL", "BACK", 'soldierCam1'];
_cam camSetFov 0.7;
_cam attachTo [_unit, [0.12, 0, 0.15], "Head", true];


missionNamespace setVariable ["_cam", _cam]; 


and the RscPicture:


        class RscPicture_1201: RscPicture
        {
            idc = 1220;
            text = "#(argb,1024,1024,1)r2t(soldierCam1,1)";
            x = 0.52686 * safezoneW + safezoneX;
            y = 0.5 * safezoneH + safezoneY;
            w = 0.0805814 * safezoneW;
            h = 0.132 * safezoneH;
        };
distant axle
#

What to choose and what never changes

crude berry
#

prolly this

little stratus
#

hi, i'd like to create a new GPS item for infantry that is capable of both showing the GPS and also the sensor panel that's usually available to vehicles. the idea is letting infantry access their side's datalink with this item, just so they can see what's on the datalink, but they can't report anything back like vehicles. how possible is this and would anyone be willing to point me in the right direction?

hoary estuary
#

Doesn't sound easy, probably gonna have to emulate it instead of using premade engine handling for the sensor panels

craggy kiln
#

Is there a way to make a control inherit the angle (ctrlsetangle) of its mommy control? When I ctrlsetAngle on the mommy, the baby control doesn't get its angle set.

(What I want is to have a mommy control i rotate constantly with the baby controls attached to her)

quiet arrow
#

If that doesn't work out of the box then you likely will have to rotate the child separately

craggy kiln
#

yeah

#

slightly complicates things (and makes me have no reason to have a mommy control now)

empty mountain
#

iirc the setangle stuff is limited to picture/text becasue its actually spinning the graphic the control itself remains static

#

you can see this if you make your graphic not have big enoughj margins and it'll cut the corners off

craggy kiln
#

Ah, no way to rotate the control itself, then?

empty mountain
#

yeah

craggy kiln
#

i shall Set The Angle Elsewise then

craggy kiln
rotund eagle
#

I am trying to understand RscInGameUI a bit more, fopr the x/w position of children controls are they relative to the parents position? Lets say I have something like this

class testrsc
{
    class Controls
    {
        class testControl1: RscControlsGroup
        {
            class Controls
            {
                class testControl2: RscText
                {

                };
            };
        };
    };
};

whatever x/y values I pick for testControl2 are they relative to the top left hand corner of where textControl1 is? Not sure wat the best way to convey my question ๐Ÿ™‚

crude berry
#

for groups - yes for sure, the control's x/y are relative to containing group top left corner. That's, like, the entire point of groups :3

rotund eagle
#

cool cool

rotund eagle
#

For RscInGameUI that are for optics like on scopes when is the onUnload triggered? when I stop aiming down the sight or when I take the scope off the gun?

acoustic cosmos
#

hi.
For a fancy timeskip i like to use the normal watch display (key: O) and to enlarge it to be visible on the whole screen - inspired by the SOG PF RON Scenes.

Im having a hard time figuring out how to find the right display and whatelse, since i have 0 experience with working with gui.

acoustic cosmos
#

how would i find the right control/idc?

quiet arrow
#

you need to check the config to find where it's located.

#

I thought its in RscDisplayBriefing but I couldn't find it there

acoustic cosmos
#

I found RscWatch which has the right p3d at least

quiet arrow
#

good

acoustic cosmos
#

i also noticed that closing display 12 makes the O key Wristwatch not work anymore

#

but beyond that, im kinda clueless

quiet arrow
#

You can get the watch likes this

{
  if (ctrlClassName _x == "RscWatch") exitWith {//found it};
} forEach (allControls findDisplay 46);
acoustic cosmos
#

ignore last, found an error

#
_found = false;
{
    _display = _x;
    {
      diag_log format ["Display: %3, IDC: %1, className: %2", ctrlIDC _x, ctrlClassName _x, _display];
      if (ctrlClassName _x == "RscWatch") exitWith { diag_log "FOUND IT!"; _found = true; };
    } forEach (allControls _x);



} forEach allDisplays;

diag_log str _found;

returns false

#

but i found those

23:57:37 "Display: Display #49, IDC: 11886, className: WatchBackground"
23:57:37 "Display: Display #49, IDC: 11893, className: WatchText"
23:57:37 "Display: Display #49, IDC: 12285, className: WatchInput1"
23:57:37 "Display: Display #49, IDC: 12286, className: WatchOutput1"
23:57:37 "Display: Display #49, IDC: 12287, className: WatchInput2"
23:57:37 "Display: Display #49, IDC: 12288, className: WatchOutput2"
23:57:37 "Display: Display #49, IDC: 12289, className: WatchInput3"
23:57:37 "Display: Display #49, IDC: 12290, className: WatchOutput3"
23:57:37 "Display: Display #49, IDC: 12291, className: WatchInput4"
23:57:37 "Display: Display #49, IDC: 12293, className: WatchOutput4"

thonk

quiet arrow
#

thats the debug console

acoustic cosmos
#

oh, the watch monitor

quiet arrow
#

the watch only exists when the map screen is open

#

So maybe attach it to an load event there or "openMap" MEH

#

I can take another look at it tomorrow. Ping me on ACE discord if you want tomorrow.

acoustic cosmos
#

yes please

pale tusk
#

Hello :D
Quick question, is it possible to display custom UI during the briefing screen in multiplayer? [The screen before loading into the mission].

distant axle
#

I said yes because it's a yes. Global Mobilization did it in their mission too

pale tusk
#

GUI is pain ;-;

distant axle
#

Wrong

#

Life is

quiet arrow
#

GUI is love

distant axle
#

Baby don't hurt me... anyways

#

See? A dude with GUI knowledge is there

#

I just can't touch PC for more hours

pale tusk
# distant axle Life is

Always has been

But yea, I've always hated the visual and design aspect of writing code, seems like I end up having to do it almost no matter what xD

Ah welp, good time to learn I guess

distant axle
#

Basically (and IIRC) init.sqf runs when the mission briefing has started. Which means you can do whatever with it

pale tusk
#

I tried running it from initPlayerLocal.sqf since that also runs during briefing screen

#

My mouse turned glitchy [disapears and appears] when the code to call it was executed

distant axle
#

What you've done?

pale tusk
#

Uh
So I tried building the UI with ADC [Arma Dialog Creator] then exported it. It showed in the editor and in-game when I loaded in, but when I tried running it during briefing screen, it didn't.

I found about ADC while looking for tutorials on youtube which made it seem like maybe an easier way of doing things.

distant axle
#

It seems not so wrong, then how do you run in briefing?

pale tusk
#

In initPlayerLocal.sqf I used createDialog "MyDialogPlan";

distant axle
#

Try findDisplay 12 createDisplay "MyDialogPlan"

pale tusk
#

Will do, trying now

#

Nothing happens

#

Even when executed after being loaded into the mission

quiet arrow
#

You could also try to execute it preInit with cba_waitUntilAndExecute

#
if (isMultiplayer) then {
    // Wait for client to be in the briefing. or past it.
    waitUntil {getClientStateNumber >= 8};
};

this is what we do to show voting UI in briefing

pale tusk
distant axle
#

How do you test it?

pale tusk
# distant axle How do you test it?
if (isMultiplayer) then {
    // Wait for client to be in the briefing. or past it.
    waitUntil {getClientStateNumber >= 8};
    systemChat "ACTIVE";
    findDisplay 12 createDisplay "MyDialogPlan";
};

I ran the following in initPlayerLocal.sqf

distant axle
#

And SP or local MP or Dedicated? (I know it is obvious question but try to clarify)

pale tusk
#

I also ran findDisplay 12 createDisplay "MyDialogPlan" in the debug console once loaded in and it did nothing, instead it returned:

Display #1234
distant axle
#

findDisplay 12 part means create it on the map display

#

So you may see nothing not in the map

pale tusk
#

Could it be that the briefing screen is different than the map...?

distant axle
#

Maybe ๐Ÿค”

#

Is systemChat running there?

pale tusk
#

Affirm, I can see the result

distant axle
#

Okay, then try:
systemChat str allDisplays

#

And post the return

pale tusk
distant axle
#

Try 70 instead of 12

pale tusk
#

Doing

#

From a quick check on the wiki this might be it, here is hopping

#

Uhhhh interesting

#

So it shows now... but it hides the map screen behind it?

distant axle
#

๐Ÿค”

pale tusk
#

If I press Esc to leave the display, it puts me back into the briefing screen

distant axle
pale tusk
#

Attempting

#

Uhhhh nothing happens at all, instead I got an error

#

findDisplay 70 createDisplay ["MyDialogPlan", true];

#

Oh

#

Wrong command

#

Potato

#

IT'S ALIVE!

distant axle
#

rawr

pale tusk
#

I'd huge you right now if I could

#

Now time to figure out why my text bar at the top is black instead of blue and how to make this look half presentable and nice looking

#

Prob won't get too far with ADC but still better than nothing

pale tusk
#

So this is what I have right now

#

How would I go about adding a border similar to the one in this picture through the config?

quiet arrow
#

its a CT_FRAME control

pale tusk
#

Got a link where I can find info on that?

quiet arrow
#

ah sorry. It's CT_STATIC with style set to ST_FRAME

pale tusk
#

Okie dokie

#

TY

glass flame
#

anyone good at doing safezone stuff using ui on texture? Reading up on it, it would feel like safeZoneW and safeZoneH wouldn't work since thats my monitor and not the display its being rendered on. Trying to center a piece of text of fixed width with monospace font on the middle of the display

distant axle
#

Am I right to understand you are trying Ui2Tex?

glass flame
#

correct. Using the big single screen rugged monitors (Land_TripodScreen_01_large_black_F)

#

Seems like the safezones actually apply after some testing as you set the render resolution in the procedural texture call

distant axle
#

IIRC safeZone is not really a thing you want to use there. You can really use x, y, w, h = 0, 0, 1, 1 to make 1:1 ratio texture

glass flame
#

Yeah I figured it out. Switching to structured text and keeping the 1:1 ratio.

#

Haven't worked much with dialogs before because dialogs are scary so just wrapping my head around everything now

distant axle
#

I haven't really recall how it really works, but Cougar from RF CDLC's screen is one example I made

hoary estuary
#

If object displays square texture as rectangle by stretching it, then you'll need to figure out stretch ratio and account for it

#

Many objects only display part of the texture to keep texture data displaying 1:1 (example map board)

#

bottom and top bands of the texture are simply not visible

#

Its a bit more complicated if texture is not 1:1, you'll need to use uiEx to adjust the viewport

open gull
#

Is there any way to set positions relative to the parent block, without taking into account safezone?

_display = findDisplay 46 createDisplay "RscDisplayEmpty";

    private _ctrlGroup = _display ctrlCreate ["RscControlsGroup", 8000];
    _ctrlGroup ctrlSetPosition [safeZoneX, safezoneY, safeZoneW, safezoneH];
    _ctrlGroup ctrlCommit 0;

    private _one = _display ctrlCreate ["IGUIBack", -1, _ctrlGroup];
    _one ctrlSetPosition [0, 0, 1, 0.1];
    _one ctrlSetBackgroundColor [0,1,0,1];
    _one ctrlCommit 0;
    
    private _two = _display ctrlCreate ["IGUIBack", -1, _ctrlGroup];
    _two ctrlSetPosition [0, 0.1, 1 * safeZoneW, 0.1 * safeZoneH];
    _two ctrlSetBackgroundColor [1,0,0,1];
    _two ctrlCommit 0;
hoary estuary
#
    private _ctrlGroup = _display ctrlCreate ["RscControlsGroup", 8000];
    _ctrlGroup ctrlSetPosition [safeZoneX, safezoneY, safeZoneW, safezoneH];
    _ctrlGroup ctrlCommit 0;
    ctrlPosition _ctrlGroup params ["", "", "_group_w", "_group_h"];

    private _one = _display ctrlCreate ["IGUIBack", -1, _ctrlGroup];
    _one ctrlSetPosition [0, 0, _group_w, 0.1];
    _one ctrlSetBackgroundColor [0,1,0,1];
    _one ctrlCommit 0;
    
    private _two = _display ctrlCreate ["IGUIBack", -1, _ctrlGroup];
    _two ctrlSetPosition [0, 0.1, 1 * _group_w, 0.1 * _group_h];
    _two ctrlSetBackgroundColor [1,0,0,1];
    _two ctrlCommit 0;
#

I guess you wanted that

empty token
#

is there a way to create a dialog, that wont close when pressing 'esc' rather, the main menu of arma 3 will overlap the dialog, or is it not possible?

empty token
empty token
#
("MainMenu" call BIS_fnc_rscLayer) cutRsc ["MainMenu", "PLAIN"];
findDisplay 46 createDisplay "MainMenu";

I did something like this, but I am bit lost here, it still has the same issue.

unkempt cliff
#

see HUDs in the wiki, there's example config button

empty token
unkempt cliff
#

yes or put there #include if you prefer that

#
{
 titles[]={MyDlgClassNameHere}; 

 #include "myDlg.hpp"
};```
empty token
#

ok, works now, but another thing, my dialog includes buttons, lists, etc.

its like a main menu for my scenario, however the display pops up while the player still is able to run, shoot, etc.

unkempt cliff
#

oh yeah you cant click rsc buttons

empty token
#

oh so its best to just use createDialog then?

unkempt cliff
empty token
#
class RscTitles 
{
    class MainMenu 
    {        
        idd = 3100;
        fadein = 0;
        fadeout = 0;
        duration = 1e+011;
        onLoad = "uinamespace setVariable ['MainMenu',_this select 0]";
        onUnLoad = "uinamespace setVariable ['MainMenu', nil]";

        class Controls 
        {    

this is whats inside my hpp file

unkempt cliff
#

if you use createDisplay then you should define the dialog like you did with createDialog

#

rscTitles are only for cutRsc stuff

empty token
#

ah well, it works now, just same issue as before. so i guess theres no workaround with this?

unkempt cliff
#

dunno, if you want to move with player i dont think you can click dialogs, in arma. i could be wrong though

loud flame
#

Prefix your classes and variables

hoary estuary
#

How it looks in game

empty token
hoary estuary
#

If you copied the code directly you'll need to include DIK_ESCAPE defines

hoary estuary
#

You're doing something wrong then, it works for me

#

Add hints\systemChats to see what's going on

empty token
# hoary estuary You're doing something wrong then, it works for me

in initSever.sqf

client_func_lobby_onKeyDown = {
    params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"];

    switch(true) do {
        case(_code == DIK_ESCAPE): {
            //_display createDisplay "RscDisplayInterrupt";
            findDisplay 46 createDisplay _displayOrControl;
            true;
        };
        default {false};
    };
};
#
class MainMenu 
{        
    idd = 3100;
    onLoad = "(_this select 0) displayAddEventHandler ['KeyDown', { _this call client_func_lobby_onKeyDown;}];";

in the .hpp

hoary estuary
#

Also why server? UI is client side

empty token
#

just testing

hoary estuary
#

Add debug chats to see what gets reached

empty token
#

do i add defines in the .hpp file? because mine is in description.ext

hoary estuary
#

You need to include it in every script

empty token
#

oh

hoary estuary
#

the defines with DIK keys

empty token
#
func_keyDown = {
    params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"];

    switch(true) do {
        case(_key == 1): {
            //_display createDisplay "RscDisplayInterrupt";
            findDisplay 46 createDisplay "MainMenu";
            true;
        };
        default {false};
    };
};
#

the fix was just putting 1 on the _key

hoary estuary
empty token
#

yeah, but i thought the escape menu would still open while keeping the dialog opened in the background ๐Ÿคฃ

empty token
hoary estuary
#

My display is simply createDialog "Dialog_Lobby";

#

Nothing fancy

quiet arrow
#

Short question. When you have a tree view that has selectable items. How do you expect them to be selected and deselected? Double Click? Single click? Something else?

distant axle
#

Is this a generic UI/UX question?

quiet arrow
#

Kinda. I mean I know the answer already, you would expect the checkbox to be clickable but that's super annoying to do

#

So it's just an Arma question really.

distant axle
#

If the checkbox are multiply enable-able, I'd take double click

tranquil iron
quiet arrow
#

oh noo, how I have to implement multi select. Haven't done that in a while notlikemeow

idle spruce
#

LB_MULTI style?

sand flower
#

Hoping someone can help me here - I'm working on a custom Main Menu interface for my unit which I've nearly got working completely, I have two small issues that I need help with:

  1. When I click the left tile, it opens our TS as I would expect however it also opens up the 'Quick Play' menu, is there a way to stop this from happening?
  2. The middle tile in the screenshot isn't being deleted as the EF DLC is loaded after this PBO, how do I ensure this PBO is only loaded once EF is fully loaded? EF DLC isn't a required DLC but may be ran from time to time
quiet arrow
#

The middle tile in the screenshot isn't being deleted as the EF DLC is loaded after this PBO, how do I ensure this PBO is only loaded once EF is fully loaded? EF DLC isn't a required DLC but may be ran from time to time
Make a pbo that deletes the middle tile when EF is loaded. There is a cfgPatches entry that makes it skip that pbo if required addons isnt loaded (EF)

sand flower
sand flower
tranquil iron
sand flower
opaque crag
#

You can make another config.cpp inside a different folder.

snow iris
#

Hi, I'm making radio for tfar and don't know how to count gui units. Without any safezones i just divided pixels between button location and screen border by resolution for example: 280 : 1920 and got my X value, but I want it to be compatible with different resolutions and use safezones. So how do I count this number or gui unit that I can place instead of N?

x = "safezoneX + (((safezoneW / safezoneH) min 1.2) / 40) * N";

lament laurel
#

How to repeat the action of the button with a change in the number of maxSatelliteAlpha to CT_MAP_MAIN In the same way as it is done here

    class ctrlMapMain_1: RscMapControl 
    {
        idc=1001;
        x = GroupX;
        y = GroupY + TitleWindowH;
        w = GroupW;
        h = GroupH - TitleWindowH; 
        maxSatelliteAlpha = 1.0; // <<<<-how to change using commands???
    };
lament laurel
#
mapOrientation = 1; 
/* 
Allow follow direction from player (in root class)
class my_best_map:RscMapControl
{
    mapOrientation = 1;
    idc=n
    x = n;
    y = n;
    w = n;
    h = n; 
};

https://community.bistudio.com/wiki/CT_MAP_MAIN
mapOrientation is not Found in biki

//Tag words for Search   Rotate Map Direction CT_MAP_MAIN Angle

bonus

showTacticalPing = 1;// 0 - no show on CT_MAP_MAIN. 1-show on CT_MAP_MAIN 
spice drift
#

Does anyone know how to pass more than one variable to a function via ctrlAddEventHandler? Currently I have sqf _ctrlButtonOK ctrlAddEventHandler ["ButtonClick", "[_ctrlButtonOK, _unit] call _fnc_onConfirm"]; but it doesn't seem to want to pass the _unit param.

#

I feel like I am missing something painfully obvious here.

crude berry
#

EH code is a separate script, it can't see private variables of wherever you're adding it from blobdoggoshruggoogly

spice drift
#

Thanks, I'll try that and see what I can achieve.

#

That works, thank you.

violet bobcat
#

Guys I keep getting this and itโ€™s really annoying what am I supposed to do

distant axle
#

Fix your script

violet bobcat
#

I donโ€™t even know how to script on arma

distant axle
#

Then remove your Mods that is somehow broken. Or don't play the mission that causes this issue

#

There is nothing we can do without knowing the exact situation or the code. If you don't know, there is absolutely nothing we can do

violet bobcat
#

I donโ€™t know which mod is causing is this

distant axle
#

Then unload Mods that you don't know what they do

quiet arrow
#

!rpt

ocean lodgeBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files

To share an rpt log here, please use a website like https://pastebin.com/ (Set expiry time to 1 week or less) to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

opaque crag
#

Looking for any information on where the command bar or commanding menu displays are defined, or how to get any sort of handle on their display elements.

strange arrow
valid nebula
#

I've got a simple gui set up just to learn about listNbox, but I'm failing to make the listNBox appear on my screen when I call it, I've already got the base class (tested with import and manually placing each element of the base class), is there anything in special I have to do besides getting the base class?

strange arrow
#

Are you using lnbAddColumn and lnbAddRow to populate it?

valid nebula
strange arrow
#

I don't know, but it could be. Did you set a colorBackground?

quiet arrow
#

Are you using macros for coordinates and are you sure those are defined?

valid nebula
valid nebula
#

and even I've got it directly from configs, each element

quiet arrow
#

Looks correct. Can't check tonight as it's super late already.

valid nebula
opaque crag
#

So what data did you add exactly, and is that screenshot for selected or not selected?

strange arrow
strange arrow
valid nebula
valid nebula
hoary estuary
#

Still have trouble with it?

valid nebula
#
  1. Nothing selected
  2. Selected
  3. Unselect
hoary estuary
#

Frame? Is there a frame around LNB? I don't think so

#

Just make your own

valid nebula
#

Normal RscListBox

opaque crag
#

I have a recollection that one of those was bugged and didn't render a background.

#

But I replaced both RscListNBox uses we had with custom controlsGroup stuff due to other limitations, so the comment went missing :P

vivid pewter
#

How to open one display on top of another, like i have created dislay with menu, and them want to create anther menu display within it, like its part of it?

strange arrow
#

Short answer: You can't really have multiple displays open at once.
Longer answer:
1๏ธโƒฃ #arma3_gui message
2๏ธโƒฃ #arma3_gui message
Recommended solution: Use a single display that contains multiple controls groups.

valid nebula
# opaque crag I have a recollection that one of those was bugged and didn't render a backgroun...

well it seems like some commands for it are bugged too. I can't get _valueAmmoCount. It always returns "0". Am I doing something wrong with this code? My brain tells this is correct.

_magazineColumn = lnbAddColumn [1500, 0];
//uiNamespace setVariable ["PIG_magazineColumnNumber", _magazineColumn];
_ammoCountColumn = lnbAddColumn [1500, 0.8];
//uiNamespace setVariable ["PIG_ammoCountColumnNumber", _ammoCountColumn];
lnbSetColumnsPos [1500, [0, 0.8]];
{
    _mag = (_x # 0);
    _amount = (_x # 2);
    if (_amount == 0) then { continue };
    _name = getText(configFile >> "CfgMagazines" >> _mag >> "displayName");
    _description = getText(configFile >> "CfgMagazines" >> _mag >> "descriptionShort");
    if (_name isEqualTo "") then {_name = _mag};
    _rowIndex = lnbAddRow [1500, [_name, str _amount]];
    lnbSetTooltip [1500, [_rowIndex, _magazineColumn], _description]; // Not working
    lnbSetData [1500, [_rowIndex, _magazineColumn], _mag];
    lnbSetValue [1500, [_rowIndex, _ammoCountColumn], _amount];
}forEach (magazinesAllTurrets _plane);

(displayCtrl 1500) ctrlAddEventHandler ["LBSelChanged", {
    params ["_control", "_lbCurSel", "_lbSelection"];
    _dataMagazine = _control lnbData [_lbCurSel, 1]; // Magazine column
    _valueAmmoCount = _control lnbValue [_lbCurSel, 2]; // Ammo count
    systemChat format["%1, %2", _dataMagazine, _valueAmmoCount];
}];
quiet arrow
#

Don't use the IDC variants. use to the control ones

valid nebula
quiet arrow
#

did you read that?

valid nebula
# quiet arrow

well for tooltips, I didn't read that, let me check it

quiet arrow
#
    _valueAmmoCount = _control lnbValue [_lbCurSel, 2]; // Ammo count

The column indices are wrong

#

They start at 0

#

//uiNamespace setVariable ["PIG_ammoCountColumnNumber", _ammoCountColumn];
What you did here is actually good, just don't save it in UI namespace but on the control itself

#

then you can always access it from within the events

valid nebula
#

Yeah, I used the variable there and now it's working, also, the tooltip is woking

quiet arrow
#

Great.

#

So all good?

valid nebula
# quiet arrow Great.

I've putted 1 in there because I debug that index for first column and I got "1", and after a "2" for ammo count... weird

valid nebula
#

Thanks for the help

strange arrow
#

I think it's actually still wrong. Can you post the working code?
When you create a CT_LISTNBOX, it already has one column by default (this is not documented on the Wiki, I only know this because I wrote it down in a code comment years ago ๐Ÿ‘€). That initial column has index 0. So when you run _lnb lnbAddColumn 0.5 you add a second column (with index 1). You now have two columns, even though you used lnbAddColumn only once. The first column starts at x = 0 and ends where the second column starts, which is at x = 0.5 in this example. In your case there are three columns (because you run lnbAddColumn twice).
That explains why you got _magazineColumn = 1 and _ammoCountColumn = 2 when you were debugging. It doesn't yet explain why you couldn't get _valueAmmoCount.
Because you did get _valueAmmoCount when you removed lnbSetColumnsPos I believe that lnbSetColumnsPos actually removes the three columns that exist after the two lnbAddColumn statements and replaces them with two columns.
The lnbSetData, lnbSetValue, lnbData and lnbValue then use indices that are off by one because lnbSetColumnsPos has "moved" the magazine column from index 1 to index 0 and the ammo count from 2 to 1.

#

Step by step:

_magazineColumn = lnbAddColumn [1500, 0]; //Return value: 1. Columns: [0, 1]
_ammoCountColumn = lnbAddColumn [1500, 0.8]; //Return value: 2. Columns: [0, 1, 2]
lnbSetColumnsPos [1500, [0, 0.8]]; //Columns: [0, 1]
{
    //...
    _rowIndex = lnbAddRow [1500, [_name, str _amount]]; //Uses columns 0 and 1.
    //...
    lnbSetData [1500, [_rowIndex, _magazineColumn], _mag]; //Uses column 1 (instead of column 0, where the magazine name is actually displayed).
    lnbSetValue [1500, [_rowIndex, _ammoCountColumn], _amount]; //Uses column 2 (which doesn't exist) โ†’ Fails silently?
} forEach (magazinesAllTurrets _plane);

(displayCtrl 1500) ctrlAddEventHandler ["LBSelChanged", {
    params ["_control", "_lbCurSel", "_lbSelection"];
    _dataMagazine = _control lnbData [_lbCurSel, 1]; //Uses column 1.
    _valueAmmoCount = _control lnbValue [_lbCurSel, 2]; //Uses column 2 (which doesn't exist) โ†’ Returns default value 0.
    systemChat format ["%1, %2", _dataMagazine, _valueAmmoCount]; //Output: "<magazine name>, 0"
}];
valid nebula
# strange arrow I think it's actually still wrong. Can you post the working code? When you creat...
_control = (displayCtrl 1500); 
_magazineColumn = _control lnbAddColumn 0;
_control setVariable ["PIG_magazineColumnNumber", _magazineColumn];
_ammoCountColumn = _control lnbAddColumn 0.8;
_control setVariable ["PIG_ammoCountColumnNumber", _ammoCountColumn];

{
    _mag = (_x # 0);
    _amount = (_x # 2);
    
    _name = getText(configFile >> "CfgMagazines" >> _mag >> "displayName");
    _description = getText(configFile >> "CfgMagazines" >> _mag >> "descriptionShort");
    if (_name isEqualTo "") then {_name = _mag};
    _rowIndex = _control lnbAddRow [_name, str _amount];
    if (_amount == 0) then {
        _control lnbSetColor [[_rowIndex, _magazineColumn], [1,0,0,1]];
        _control lnbSetColor [[_rowIndex, _ammoCountColumn], [1,0,0,1]] 
    };
    _control lnbSetTooltip [[_rowIndex, _magazineColumn], _description];
    _control lnbSetData [[_rowIndex, _magazineColumn], _mag];
    _control lnbSetValue [[_rowIndex, _ammoCountColumn], _amount];
}forEach (magazinesAllTurrets _plane);

_control ctrlAddEventHandler ["LBSelChanged", {
    params ["_control", "_lbCurSel", "_lbSelection"];
    _dataMagazine = _control lnbData [_lbCurSel, _control getVariable "PIG_magazineColumnNumber"]; // Magazine column
    _valueAmmoCount = _control lnbValue [_lbCurSel, _control getVariable "PIG_ammoCountColumnNumber"]; // Ammo count
    systemChat format["%1, %2", _dataMagazine, _valueAmmoCount];
    //copyToClipboard _dataMagazine;
}];
strange arrow
#

Yea, that code should still be creating three columns, but the indices work out because there is no lnbSetColumnsPos.

#

I'm confused as to why _control lnbAddRow [_name, str _amount] works though. The first column should have width 0, so the magazine name should be invisible in the dialog ๐Ÿค”

#

Does systemChat str [_magazineColumn, _ammoCountColumn] give you [1, 2]?

valid nebula
#

about the gatling gun... weird that a vanilla magazine doesn't have displayName in configs, is there a way to get the name of it in another place? In the game it's called "Minigun 30 mm"

loud flame
valid nebula
loud flame
#

Wait that's for stuff like "HE" in the top right meny, not sure if there is a good fallback

#

I guess check where "Minigun 30 mm" is defined, gotta be in the config somewhere

valid nebula
valid nebula
lament laurel
rose wadi
#

does someone know if I can create the webbrowser ui via script ?

disableSerialization;
private _display = (findDisplay 46) createDisplay "RscDisplayEmpty";
private _browser = _display ctrlCreate ["RscWebBrowser", 9999];
_browser ctrlSetPosition [safeZoneX + 0.2, safeZoneY + 0.2, safeZoneW * 0.6, safeZoneH * 0.6];
_browser ctrlCommit 0;
_browser ctrlSetURL "file://ui/upgrade_module.html";```
#

dosent seem to work

tranquil iron
#
  1. WebBrowser is a 2.20 feature, which isn't released yet.
    You can test in on profiling branch, but then everyone needs to be on it.

  2. RscWebBrowser by default doesn't exist, you need to create that class by yourself in your own config. And if you do that, you should TAG your class to not conflict with others

tranquil iron
#

By no crossposting I meant you should leave your message here and not move it

#

The A3API does that. Request and async response.
https://github.com/dedmen/ArmaWebBrowserTests/blob/master/JavascriptWebpack/src/A3API.ts#L2

Every request starts a promise, and keeps a pending request.
When the response comes back, its resolved.

You can re-use the A3API system for it.

JS: ```js
static RequestThing(key: string, stuff: string): Promise<string> {
return new Promise((resolve, reject) => {
if (A3API._push(HungryThing:${btoa(key)}, { resolve, reject })) // Only if new request, and not already queued
A3API.SendAlert(HungryThingRequest;${stuff}); // Probably base64 encode it too?
});
};

And reply from game with ExecuteJS: `format ["window.A3API._response(atob(%1), %2)", key, value]`
@rose wadi
tranquil iron
#

I should put that onto the wiki page (this is a note for me to remember that someday or tomorrow)

rose wadi
# tranquil iron The A3API does that. Request and async response. https://github.com/dedmen/ArmaW...

Thank you, it works like that

     if (_messageType == "RequestChatHistory") then {
        _targetType = _messageComponents select 1;  // "player" oder "group"
        _targetId = _messageComponents select 2;    // UID oder Groupname
        if (isNil "a3s_chatHistory_player") then { a3s_chatHistory_player = createHashMap; };
        if (isNil "a3s_chatHistory_group") then { a3s_chatHistory_group = createHashMap; };
        _source = if (_targetType == "player") then { a3s_chatHistory_player } else { a3s_chatHistory_group };
        _log = _source getOrDefault [_targetId, []]; 
        _json = str _log; 

        private _key = format ["chat:player:%1", _targetId];
        private _response = str _log;
        private _cmd = format [
          "window.A3API._response('%1', `%2`);",
          _key,
          _response
        ];
        _ctrl ctrlWebBrowserAction ["ExecJS", _cmd];
    };```
#
 function openChatWithPlayer(name, uid) {
                if (!chatStore.player.has(uid) && typeof A3API !== "undefined") {
                    A3API.RequestChatHistory("player", uid, name);
                    } else {
                    showChatWindow("player", uid, name);
                }
            }
            
        A3API.RequestChatHistory = function (type, id, displayName) {
            const key = `chat:${type}:${id}`;
            return new Promise((resolve, reject) => {
                if (A3API._push(key, { resolve, reject })) {
                    A3API.SendAlert(`RequestChatHistory:${type}:${id}`);
                }
                setTimeout(() => reject("Timeout"), 2000); 
            }).then((rawJson) => {
                const historyArray = JSON.parse(rawJson);
                if (!chatStore[type].has(id)) {
                    const decodedHistory = historyArray.map(([who, msg]) => {
                        const decodedMsg = fromBase64(msg);
                        return { who, msg: decodedMsg };
                    });
                    chatStore[type].set(id, decodedHistory);
                }
                showChatWindow(type, id, displayName);
            }).catch((err) => {
                console.warn("Chat history unavailable or timeout:", err);
                // still open a blank chat window
                if (!chatStore[type].has(id)) {
                    chatStore[type].set(id, []);
                }
                showChatWindow(type, id, displayName);
            });
        };```
tranquil iron
rose wadi
#

Yea I did the same before but wanted to learn smth new, but will probably go back to the old system

#

Im also saving it in profilenamespace, so the server dosent know the chat but for an group chat the server side is definitely needed if the player should receive offline messages

tranquil iron
#

yeah I also have a full server-side state and JIP handling in my thing, most of it is in postInit probably

idle spruce
#

that looks very nice Hungry. Does this look like something people can do 100% of their UI in?

rose wadi
tranquil iron
#

I have some samples on my github. But its not really a tutorial if you don't already know Arma UI and Javascript

#

I'd love to have some guide on the wiki page for it, but I cannot edit the wiki page ๐Ÿ˜„

idle spruce
rose wadi
tranquil iron
#

The only way to communicate between game and browser is sandbox mode, so it must be in it

willow stratus
quiet arrow
#

Does it need Java installed on the client?

light hearth
#

I'm trying to port arma 3 font file into Arma 2, apparently it doesn't fit๐Ÿ˜‚

tranquil iron
#

Arma is generally backwards compatible. But also generally not forwards compatible.
Arma 3 had quite a few changes to font processing and rendering so I wouldn't expect that to be possible

light hearth
#

It gave me a exception saying the font is too new lol

ebon sleet
#

How would I go around making a base building system for public zeus? Lets say I place down the comp onto a prop, if a player comes up and interacts with it they can select some options like sandbags and shit. After selecting the prop, it shows up infront of em. They can place it down with left click.

undone harbor
#

does new Web gui able to build from React?

idle spruce
ebon sleet
#

i know basic scripting, I know about locality

#

all I want is that players can grab a prop out of a box and place it down with left click.

idle spruce
#

is there a way to make a pack of images and select out of it? sort of like reforger's .edds files?

because this is pain lol (3*5*21 icons)

opaque crag
#

I don't think so. drawIcon just takes a file path.

idle spruce
#

yeah cause I'm making animated icons. it gets ridiculous with the huge hash of links I'm making haha

opaque crag
#

Yeah that's going to suck.

willow stratus
#

use browser API meowsweats

idle spruce
willow stratus
#

idk maybe Dedmen has one on the arma3 repository on github

thick cave
#

Can I do this ?

nul = [this] spawn { while {true} do { if (visibleGPS) then { openGPS false; }; sleep 0.1; // Adjust sleep time as necessary }; };

I hope it wont lag server with 50 plp ๐Ÿ˜…

distant axle
#

I would just openGPS false every frame

thick cave
#

How to do that please ?

#

Maybe addkeybind for ctr+m with openGPS false command..

#

#include "\a3\editor_f\Data\Scripts\dikCodes.h" [["Ares Control","Control"],"incrementShadowHotkeyAdd","Menu",{openGPS false;},"",[DIK_M,[false,true,false]],true] call CBA_fnc_addKeybind;

Solved, thanks anyway Pol โค๏ธ

distant axle
#

That actually is wiser

#

It is much more wiser if you use addUserActionEventHandler

thick cave
#

How exactly please ?

thick cave
#

There's more of these minuhuds under "[" and "]", so I had to block them too:

[["Ares Control","Control"],"incrementShadowHotkeyAdd","1",{openGPS false;},"",[DIK_M,[false,true,false]],true] call CBA_fnc_addKeybind; [["Ares Control","Control"],"incrementShadowHotkeyAdd2","2",{openGPS false;},"",[DIK_RBRACKET,[false,false,false]],true] call CBA_fnc_addKeybind; [["Ares Control","Control"],"incrementShadowHotkeyAdd3","3",{openGPS false;},"",[DIK_LBRACKET,[false,false,false]],true] call CBA_fnc_addKeybind;

There is no way for eventhandler right now I guess, but If You have some good idea, please share.

distant axle
#
addMissionEventHandler ["Draw3D",{openGPS false}]```
thick cave
#

How did You .. . what ? ๐Ÿ˜„

#

Well this is some magic here.. thank You so much Polpox โค๏ธ

valid nebula
round ore
#

Draw3D

Will stop executing when UI loses focus
unlike EachFrame.

valid nebula
distant axle
#

I understand it is similar to getPosVisual vs getPos

#

Timing matters

raven badge
#

Not sure if this is the best channel to ask, but does anyone have suggestions for role icons built into the game? I'm looking to add them to my friendly 3D icons, but I've only found three icons for medics, engineers, and explosive specialists (last is not depicted here):

loud flame
raven badge
#

That's actually where I got the three icons from, although I did replace pictureRepair_ca.paa with the equivalent action icon since that was higher resolution

loud flame
#

There's other ones in there too, like for at/aa units

raven badge
#

like iconManAT_ca.paa you mean? those ones i find a bit awkward as 3D icons, since they're already used for the map content (circles with arrow indicating direction)

loud flame
#

Right I forgot those had the arrows on 'em

raven badge
#

a native icon set that matches with CfgRoles (Assistant, CombatLifeSaver, Grenadier, etc.) and has a simple, single-shape design like above would be nice, but i don't mind leaving it with the trait icons as-is

valid nebula
#

Does calling a function on MEH "eachFrame" to update some controls in a GUI is a bad practice?

unkempt cliff
#

not imo but the code should be short as possible

valid nebula
unkempt cliff
#

ok well running your own tests should tell if it "works". i cant recall using EF my self on GUI loops but only to init GUIs fast

valid nebula
unkempt cliff
#

I personally prefer while loop with small sleep because EF seems to run too often

#

and in theory atleast could lower your FPS

loud flame
#

CBA PFHs also make it very easy to change it quickly

valid nebula
quiet arrow
valid nebula
quiet arrow
#

Then who cares

valid nebula
#

and only if you select the airplane that is flying

unkempt cliff
#

for that I'd sacrifice some FPS with EF for smoothness ๐Ÿ™‚

#

i usually put some time checks in EFs to not run the code in everyframe but like 0.1 seconds or something

unkempt cliff
#

nah just time check

valid nebula
#

can you give me an example?

unkempt cliff
#

like ```sqf
lastTime = -1;

addMissionEventHandler ["EachFrame",
{
if((time - lastTime) < 0.1) exitWith {};
lastTime = time;
}];

valid nebula
#

ohh

unkempt cliff
#

optimization

valid nebula
#

between the first { } is the EF?

unkempt cliff
#

updated code ^

valid nebula
#
lastTime = -1;
PIG_CAS_mehIndex_eachFrame = addMissionEventHandler ["EachFrame", {
    _plane = (_thisArgs # 0);
    if (!(isNull _plane) || (alive _plane) || ((findDisplay 363) getVariable ["PIG_CAS_dialogOpen", false])) then {
        "PIG_CAS_marker_SelectedPlane" setMarkerPosLocal (getPos _plane);
        "PIG_CAS_marker_SelectedPlane" setMarkerDirLocal (getDir _plane);
        if((time - lastTime) < 0.1) exitWith {};
        lastTime = time;
        [_plane] call PIG_fnc_updateHealthFuel;
    } else {
        removeMissionEventHandler ["EachFrame", _thisEventHandler];
        deleteMarkerLocal "PIG_CAS_marker_SelectedPlane";
    };
}, [_plane]];
quiet arrow
#

so this only runs if the UI is open? You could also use a mouseMove and mouseHold event handler.

#

No need to mess with global vars and stuff.

valid nebula
quiet arrow
#

that will still be smooth as it's executed on each frame

valid nebula
#

it's silly, but got me worried if doesn't this "accumulates" calls or something

unkempt cliff
#

EHs only quit when all code is done, but you shouldnt use spawn there

valid nebula
unkempt cliff
#

yes

valid nebula
idle spruce
rose wadi
idle spruce
quiet arrow
#

Try to load them off screen first.

loud flame
#

Isn't there also a preload textures command?

#

Not sure if it applies to that, I just remember seeing one

#

Nevermind I think I'm just thinking of preloadObject

idle spruce
#

so, dumping the textures for the single frame of the ctrl event handler does not fix it. i'm going to try to increase the frames of the dump and see if that works

tranquil iron
#

is that ui2texture?
It only gets initialized if its actually visible on screen. And that would be two frames.
One to notice its visible, second to init

idle spruce
#

its a "Draw" event texture on the map right now I just have 2 draw events, one to mass dump that deletes itself that frame, the the second one for the main event.

#
if (!(GVAR(Game) getVariable QGVAR(silomapmarkerinit))) then {
    // preload the images off screen first - mass dump
    (findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw", {
        params ["_ctrl"];
        {
            private _iconData = _x getVariable QGVAR(icons);
            {
                for "_i" from 1 to 5 do {
                    for "_j" from 1 to 21 do {
                        private _icon = "";
                        if (_x == sideUnknown) then {
                            _icon = ((_iconData get _x) get _i);
                        } else {
                            _icon = ((_iconData get _x) get _i) get _j;
                        };
                        _ctrl drawIcon [
                            _icon,
                            [1,1,1,1],
                            [-1000, -1000],
                            32,32,0
                        ];
                    };
                };
            } forEach [west, east, sideUnknown];
        } forEach (GVAR(Game) getVariable QGVAR(silos));

        _ctrl ctrlRemoveEventHandler [_thisEvent, _thisEventHandler];
    }];
    GVAR(Game) setVariable [QGVAR(silomapmarkerinit), true];
};
#
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw", {
    params ["_ctrl"];

    {
        private _countdownTime = _x getVariable QGVAR(countdown_time);
        private _currentCountdown = _x getVariable QGVAR(countdown);
        private _side = _x getVariable QGVAR(side);
        private _siloNumber = _x getVariable QGVAR(silo_number);

        private _iconData = _x getVariable QGVAR(icons);

        // Get the proper icon
        private _frameIndex = 0;
        private _siloIcon = _iconData get sideUnknown get _siloNumber;
        if (_side in [west, east]) then {
            _frameIndex = round (((_countdownTime - _currentCountdown) / (_countdownTime / 21)) max 1 min 21);
            _siloIcon = _iconData get _side get _siloNumber get _frameIndex;
        };
        if (isNil "_siloIcon") exitWith {};

        _ctrl drawIcon [
            _siloIcon,
            [1,1,1,1],
            getPosATL _x,
            32,
            32,
            0
        ];
    } forEach (GVAR(Game) getVariable [QGVAR(silos), []]);
}];
#

so I'll try to wait to delete the init "draw" event for a couple of frames like you state and see if it works

#

waiting a few frames didn't work so i went overboard and did 50 frames and it worked I take that back, must have been a fluke because 100 frames doesn't fix it either

opaque crag
#

Not entirely sure what I'm looking at here. Are you re-running the precache each time the icon changes?

#

Or are you saying that the precache doesn't do anything at all?

idle spruce
#

I rewrote that second post to have a frame counter and deletion after x amount of frames, just didn't post it

opaque crag
#

So the latter? Regardless of whether you add the precache handler, there's some sort of flicker on new icons?

idle spruce
opaque crag
#

For what it's worth I added a map icon precache recently for a different reason, but for that I load them into a (barely visible) dialog rather than a draw handler.

#

Maybe the draw handler is somewhat optimized and drawing them (way) offscreen doesn't actually load the icon.

#

Although it's definitely not clipped to the visible map for map controls.

hoary estuary
#

Personally I just have a structured text on the UI and cram all important graphics there

#

hidden off screen of course

opaque crag
#

Map icons not showing immediately seems super odd for Arma. I thought the usual rule is that if data is required it'll block until it's loaded.

tranquil iron
#

Mh yeah there must be a problem with the loading.
I did a test with 20k icons, and you could see them all slowly scan in at like one or two per frame.
It should load them async and get dozens per frame in big blocks ๐Ÿค”

rose wadi
#

If I want to request textures for the web ui from the missionfile , do I have to do it via getMissionPath and A3API.RequestTexture ?

tranquil iron
#

I think it does the mission path lookup by itself already

#

I think you just don't prefix it with a \ and then it's mission file path?

idle spruce
#

uiNamespace vars or grabbing controls/displays via IDC/idd? Which do you like to do?

loud flame
#

I still always throw idd / idc macros in a separate hpp just for them though

lost oxide
#

I try to use the GUI Editor through the Debug Console but the button is greyed out. How do I get to it?

idle spruce
#

also, you have to be in preview to get it to start up

hoary estuary
#

Static controls inside dynamic groups = IDC too (controlsGroupCtrl)

#

Why? Mostly old habits of using IDCs probably.

#

I also like seeing uppercase defines in my scripts probably.

tranquil iron
vapid cape
#

Would anyone mind peeking at this code and telling me if I'm doing this wrong? I am putting a ui-to-texture on a screen that is supposed to move to the center coordinates of the map and zoom out. Nothing happens though, but no errors either. Profiling branch.

private _disp =  findDisplay "church_map";
private _map = _disp ctrlCreate ["RscMapControl",57501];
private _worldCenter = [(worldSize/2),(worldSize/2)];
_map ctrlMapAnimAdd [5, 0.1,_worldCenter];
ctrlMapAnimCommit _map;
displayUpdate _disp;
systemchat format ["%1 %2 to coords: %3",_disp,_map,_worldCenter]```
unkempt cliff
tranquil iron
vapid cape
#

Thanks both of you! I realized maybe I am just coming at this from the wrong approach. If I create this control in display 46, it's doing what I want it to do. I'm just not sure how (or if!) I can put this on a texture with ui to texture:

waitUntil {
    uiSleep 0.1;
    !isNull findDisplay 46
};
private _disp =  findDisplay 46;
private _map = _disp ctrlCreate ["RscMapControl",57501];
_map ctrlSetPosition [0,0,1,1];
_map ctrlMapSetPosition [0,0,1,1];
_map ctrlCommit 0;
_map ctrlMapAnimAdd [1, 1,_worldCenter];
ctrlMapAnimCommit _map;
/*
onEachFrame {
    displayUpdate _disp;
    hint "Display Updated";
};
*/
systemchat format ["%1 %2 to coords: %3",_disp,_map,_worldCenter];```
opaque crag
#

Not really sure what I'm looking at here. Your code has no render-to-texture stuff in it but there's a map texture on the board?

vapid cape
#

The billboard has the UI texture set in 3den, #(rgb,4096,2048,1)ui('RscMap','church_map') but that doesn't seem to be able to achieve what I'm going for, I'm messing with uiEx right now to see if maybe there's more advanced ways to do this

opaque crag
#

So what code are you actually asking someone to check?

#

The point about displayUpdate is that ctrlMapAnimCommit takes time, so if you just call it once, it'll set the texture to the initial state.

tranquil iron
# vapid cape Would anyone mind peeking at this code and telling me if I'm doing this wrong? I...

I didn't notice that at first. I'm pretty sure even with a onEachFrame, that won't work.
Because the findDisplay will return null.

The display, is created when the texture is first shown on screen.
That is at least one frame after the setObjectTexture.
If your script is really like that, findDisplay will run in the same frame, and not find anything

But your logging at the end, would have shown you that you have a null display there

bleak halo
#

I need help, I am trying to get rid of this mini-map because when I place my mod into the GPS slot. It keeps bringing up the mini-map. This is what i have:

plus, I am not sure if I am doing this right.

distant axle
#

You need to execute the script

#

And the script entirely removes the GPS screen

#

Not depends on your item

bleak halo
#

how do you execute the script, from the mission or with in the mod? @distant axle

distant axle
#

You really should to learn very basics even before tackle complicated idea

round scarab
#

Hello everyone, can you tell me if it is possible to implement a table with filling elements in Arma 3?

#

I made a table in Photoshop, but I don't understand, do I need to write my own class and background for each square and fill in the value, or can I just create a table class?

hoary estuary
#

There is Controls Table but from my experience it sucks

#

There is also a way to render browser into controls but that's only in dev build yet

round scarab
#

So I can just write a script that loops through the array of all the elements and creates all the columns and rows for me, adding values for the gap between the squares?

hoary estuary
#

Yes

#

Create your rows into controls group so engine handles scrollbars and cropping if your contents overflow your table size

round scarab
#

And if I have more elements than the size of the window, but I don't use a ListBox, can I remove the scroll bars in the photo and just scroll with a wheel?

hoary estuary
#

Engine will handle scrollbars automatically if you have your controls inside a controls group

#

There is also ListNBox but its limited in its style possibilities, to achieve your mock up you'll need your own controls for each cell

idle spruce
#

@hoary estuary have you started messing around with the js controls yet?

hoary estuary
quiet arrow
#

Is there a way to get the width of an object control on the screen?

#

I have two object controls that I need to precisely place next to each other but as I cannot directly get the width of the objects that's kinda tricky

unkempt cliff
quiet arrow
#

Interesting idea but we settled for the eyeball it approach

empty token
#

what is a UI system I can use that will not change in anyway and size depending on the aspect ratio and resolution of the monitor screen?

hoary estuary
#

If you want pefect square multiply by aspect ratio

#
w = 0.1 * pixelW / pixelH;
h = 0.1;
``` 0.1 square on the screen
#

same thing

empty token