#arma3_gui

1 messages Β· Page 7 of 1

hoary estuary
#

no, pixelW and pixelH already produce square pixels

#
w = pixelW * 100;
h = pixelH * 100;
```100x100 pixels size on any resolution
empty token
#

oh ok, i understand now.

hoary estuary
#

What are you trying to anyway?

empty token
#

im trying to make a UI that's similar of layout to dynamic recon ops basically, it's like a "main menu" type of UI to configure the settings of the scenario and such.

#

and it's going to fill the whole page. so i'd like the UI to stay consistent in size regardless of monitor settings.

hoary estuary
#

Whole page? You mean whole screen?

empty token
#

well, the UI is gonna be using the whole screen, technically, so yeah.

#

it will have side bars, top, bottom, all TBD.

hoary estuary
#
x = SafeZoneX;
y = SafeZoneY;
w = SafeZoneW;
h = SafeZoneH;
``` this will cover entire screen
#
x = SafeZoneXAbs;
y = SafeZoneY;
w = SafeZoneWAbs;
h = SafeZoneH;
``` this will cover all screen on multi monitor setup
#

SafeZoneX is most left border of the game window/screen

empty token
hoary estuary
#

pixel stuff is bound to pixels, normal ui coordinates are absolute, regardless of monitor, resolution and even window size

opaque crag
#

Pixelgrid stuff typically uses the nearest multiple of 4 or 8 pixels as a unit. It's a compromise between having things roughly the same size on screen and text/lines rendering in a non-ugly manner.

empty token
opaque crag
#

Usually, yes.

empty token
#

and pixelGrid will manually adjust itself to be perfect in every resolution or must i worry about some "n" factor that I must use to ensure that the UI stays consistent

opaque crag
#

Well, pixelGrid does not give you the same number of units on every resolution.

#

1080p tends to be the odd one out.

#

So if you're using it for a UI that covers the whole screen, then you need to consider that.

empty token
#

i see, how can i go around this then?

for example, if the whole screen is just

x = SafeZoneX;
y = SafeZoneY;
w = SafeZoneW;
h = SafeZoneH;

then I want to make a box inside.

x = 0.1;
y = 0.1 + pixelH * 1;
w = pixelW * 2;
h = pixelH * 1;

there must be some "n" value to keep the box consistent in size, correct?

#

i would have to multiply all values by pixelGrid, right?

opaque crag
#

What does "consistent in size" mean exactly?

empty token
#

i mean the size of the box stays the same across all resolution sizes and aspect ratios, it doesn't misalign or change it's shape.

opaque crag
#

You mean relative to the screen height then?

empty token
#

yeah, technically, because i wouldn't want a box to be more stretched or squashed because of monitor settings.

#

it would look the same across all settings

opaque crag
#

The reason this isn't normally done is that it wouldn't necessarily even give you a round number of pixels.

#

But you can calculate using the information provided. safeZone gives you the screen size in the same units as pixelW/H give you the pixel size.

empty token
#

oh ok, then they would correlate with each other to make sure controls scale correctly with resolution and aspect ratio. I would just have to use pixelGrid, pixelGridBase, etc, to make sure it stays consistent, right?

class RscText
{
  x = 0.5 - pixelW * pixelGrid * 6;
  y = 0.5 - pixelH * pixelGrid * 6;
  w = pixelW * pixelGrid * 12;    
  h = pixelH * pixelGrid * 6;    
};
opaque crag
#

That looks plausible, yes.

quiet arrow
summer jungle
#

@tranquil iron Just checking remote content for CT_WebBrowser didn't make it in to 2.20? the current Wiki page on it suggests its available and can work but i haven't been able to get it to show anything yet

tranquil iron
#

Correct, its disabled in stable

#

its enabled on profiling branch though

#

I forgot to adjust the wiki

summer jungle
#

a shame, i really wanted to be able to send players random memes i find as admin mid mission, i guess i can just do a check if they are on profiling and send it if they are instead XD

tranquil iron
#

😠

#

You can still do it with sandbox, but a bit more complicated

summer jungle
#

oh wonderful, i can shitpost directly to players, perfect :)

open gull
summer jungle
#

the web browser is in 2.20, but it can only display local files or raw HTML and can't connect to the internet atm

open gull
gaunt python
#

Hello everyone,

I just saw the latest SPOTREP and CT_WEBBROWSER.
I'm currently trying it out and it seems pretty cool, but I don't understand everything.

Can we interact with the HTML page we loaded from ExecJS?
If so, is there something to do beforehand?

I created a simple HTML HUD and I'm trying to interact with it in JS but it's impossible.

gaunt python
#

html :

<script>
        function updateLife(value) {
            document.querySelector('.life-fill').style.width = value + '%';
        }

SQF init :

_ctrl ctrlAddEventHandler ["JSDialog", {
    params ["_control", "_isConfirmDialog", "_message"];
    _lifeValue = 80; 
    _hungerValue = 50; 
    _thirstValue = 30; 

    _control ctrlWebBrowserAction [
        "ExecJS",
        format [
            "console.log('Updating life to %1%%');" +
            "document.querySelector('.life-fill').style.width = '%1%%';",
            _lifeValue
        ]
    ];

    true;
}];
#

Of course, I also tested %1

#

I try this :

_control ctrlWebBrowserAction [
    "ExecJS",
    "document.querySelector('.life-fill').style.width = '50%';"
];

but doesn't work 😒

tranquil iron
#

did you try the sample on the wiki page?

#

That communicates with the game

gaunt python
#

Yep, the sample work

tranquil iron
#

Send me youir things in a mission file, and I can take a look tomorrow, just DM me the stuff

gaunt python
#

I do that now πŸ˜„

tranquil iron
#

You can implemented limited web access. You can send files from the game script into the browser.
if you can get internet files into the game script (for example with extensions) you could load internet content.
But thats complicated and not intended at the moment

gaunt python
#

I've this error in the webConsole:

tranquil iron
#

That might be a bogus error

gaunt python
#

For people who search the same things.
We need to use the EventHandler "PageLoaded".

#

("MyHudLayer" call BIS_fnc_rscLayer) cutRsc ["HudOverlayUI", "PLAIN"]; // Add our Display to the HUD

private _ctrl = ((GHUDOverlay#0) displayCtrl 1337);
//_ctrl ctrlWebBrowserAction ["OpenDataAsURL", loadFile "hudOverlay.html"];

_ctrl ctrlAddEventHandler ["PageLoaded", {
params ["_control"];
_control ctrlWebBrowserAction [
"ExecJS",
format ["updateLife(%1);updateHunger(%1);updateThirst(%1);",100,25,35]
];
}];

open gull
#

My description.ext:

class RscText;
class RscWebBrowser
{
    idd = 13371337;
    fadein = 0;
    fadeout = 0;
    duration = 1e+011;

    class Controls
    {
        class WebControl: RscText
        {
            type = 106;
            idc = 1337;
            x = 0;
            y = 0;
            w = 1;
            h = 1;
            url = "file://test.html";
        };
    };
};

I call this code:

disableSerialization;
private _display = (findDisplay 46) createDisplay "RscDisplayEmpty";
private _browser = _display ctrlCreate ["RscWebBrowser", 9999];
_browser ctrlCommit 0;

But I get the error: No entity [path] RscWebBrowser.type

#

What am I doing wrong and how can I fix it?

gaunt python
#

Here mine for example:

import RscText;
class RscTitles
{
    class HudOverlayUI
    {
        idd = 13371337;
        fadein = 0; // Required parameters for RscTitles
        fadeout = 0;
        duration = 1e+011;

        onLoad = "GHUDOverlay = _this"; // Store our Display in a variable so we can access it from script

        class controls
        {
            class Texture: RscText
            {
                type = 106; // CT_WEBBROWSER
                idc = 1337;
                x = safeZoneX; // Full screen from corner to corner
                y = safeZoneY;
                w = safeZoneW;
                h = safeZoneH;
                url = "file://hudOverlay.html"; // Reference to a file inside our mission
            };
        };
    };
};
open gull
open gull
gaunt python
#

If RscTitles, you need to use cutRsc πŸ˜„

open gull
#
disableSerialization;
private _display = (findDisplay 46) createDisplay "RscDisplayEmpty";
private _browser = _display ctrlCreate ["RscTitles", 9999];
_browser ctrlCommit 0;
gaunt python
#

Use CreateDialog maybe ?

open gull
gaunt python
#

I try createDialog & this working.

Show how do you do ?

open gull
#

first try:

import RscText;

class RscTitles
{
    class HudOverlayUI
    {
        idd = 13371337;
        fadein = 0; // Required parameters for RscTitles
        fadeout = 0;
        duration = 1e+011;

        onLoad = "GHUDOverlay = _this"; // Store our Display in a variable so we can access it from script

        class controls
        {
            class Texture: RscText
            {
                type = 106; // CT_WEBBROWSER
                idc = 1337;
                x = safeZoneX; // Full screen from corner to corner
                y = safeZoneY;
                w = safeZoneW;
                h = safeZoneH;
                url = "file://hudOverlay.html"; // Reference to a file inside our mission
            };
        };
    };
};

two try:

import RscText;


class HudOverlayUI
{
    idd = 13371337;
    fadein = 0; // Required parameters for RscTitles
    fadeout = 0;
    duration = 1e+011;

    onLoad = "GHUDOverlay = _this"; // Store our Display in a variable so we can access it from script

    class controls
    {
        class Texture: RscText
        {
            type = 106; // CT_WEBBROWSER
            idc = 1337;
            x = safeZoneX; // Full screen from corner to corner
            y = safeZoneY;
            w = safeZoneW;
            h = safeZoneH;
            url = "file://hudOverlay.html"; // Reference to a file inside our mission
        };
    };
};
#

createDialog "HudOverlayUI" / createDialog "RscTitles"

unkempt cliff
#

try using shorter idd

gaunt python
#

The second might be workfull. I do the same

open gull
open gull
#

I can show more one web browser on 46 display?

night venture
#

Hey does anyone have an idea on a way to create a portrait of a killed enemy to display after killing them? I was thinking something along the lines of the Arma 2 head spin, but I cannot find it. Outside of creating a custom paa for each individual target, I can't think of any other way.

distant axle
#

Portrait as in, their "past" or dead face? Latter is pretty easy as you can just use camera and r2t'd it, so a texture control can show the face. Former, it requires a ton of workaround

night venture
#

Sweet, the livecam work, thank you!

gaunt python
#

In the JSDialog system, can we interact on a HTML-JS button to send SQF ?

tranquil iron
tranquil iron
gaunt python
#

Hoo if you find it i'm interrested by πŸ˜„
Thx a lot for you help πŸ˜„

tranquil iron
#

https://github.com/WolfCorps/CytechPCSystem

This is a computer system based on WebBrowser UI.

The computer display is shown on a billboard, for all players to see, and the currently open page's state is synchronized in multiplayer so all players see the same.

Player can go to laptop to interact with it, and press buttons which trigger things in-game

#

When you press a button
https://github.com/WolfCorps/CytechPCSystem/blob/master/CytechUI/mainsystems.html#L125
InternalModifyState({sys3: !(GCurrentState.sys3??false)})
The change goes to
https://github.com/WolfCorps/CytechPCSystem/blob/master/CytechUI/index.html#L66
Which, applies the change to the global state, and sends the whole state to Arma (line 71)

That comes back in a JSDialog
https://github.com/WolfCorps/CytechPCSystem/blob/master/init.sqf#L42
Which sends the state update via remoteExec (so all players receive it)
https://github.com/WolfCorps/CytechPCSystem/blob/master/init.sqf#L147
And when every player receives the state, they apply it to the webbrowser if it already is open
https://github.com/WolfCorps/CytechPCSystem/blob/master/init.sqf#L128
And fire the state eventhandlers.

And tadaa, Player1 pressing a button in the webUI. Switches the texture of an object on Player2's machine
https://github.com/WolfCorps/CytechPCSystem/blob/master/init.sqf#L236

#

Its quite complex example.
It shows MP synchronization, and how to load (zlib compressed) css files and other html sub-pages from mission folder, and how to display it via a UI2Texture in-game on a billboard and also handle that texture loading at different times for different players (because it only loads once in view).

Basically you just send something via JSDialog.
You can send a full json payload, and just use fromJSON to parse it out.

gaunt python
#

wOOH I try that, incredible & complex at the time πŸ˜„
not on my level for HTML & JS but why not try something easier

open gull
#

How hard is it to create and use browsers? For example, if I create 10 browsers, how much will it affect performance?

idle spruce
#

Since it uses the steam browser and I think the steam browser is pretty slow, I would think it would take a pretty big hit.

#

But do it and report back

open gull
tranquil iron
#

We use the steam browser. Performance is same as steam overlay.
Opening 10 tabs in steam overlay is probably fine, so it'll be fine in game too. But I recommend keeping the number low

open gull
marsh pine
#

CT_WEBBROWSER not available in RscDisplayStart? (to replace a3 logo with html)

tranquil iron
#

Please don't replace the Arma logo

marsh pine
#

I will not replace the arma 3 logo, it's just an example. I want to decorate the startup loading screen.

lament laurel
#

Replace logo arma3 in arma4 ))))

errant orbit
#

Greetings, I'm trying to figure out the text size but I can't get it right, maybe you can help.
I have a button, earlier I clearly specified the font size, but here is the problem, it is worth to change the scale of the interface and half of the text is not visible, it goes outside the rectangle or on the contrary too small. I want the text to always be the same size in relation to the rectangle, at any scale or resolution configuration.
I found a formula and it seems to do what I need, but it does it unevenly (the text seems to fit and be readable, but it's still different sizes in relation to the rectangle), help me please

sizeEx = 2.9 * (1 / (getResolution select 3)) * pixelGridNoUIScale * 0.5;

lament laurel
gaunt python
#

Hey do you know if we can interact with SQL database with javascript into ct_webrowser ?

tranquil iron
#

It should be blocked in the sandbox

lament laurel
#

I use the Toolbox to switch lists in the listbox. And I noticed that it is impossible to add any new image elements to the toolbox if the style is picture (inheritance of ctrlToolboxPictureKeepAspect). I tried the lb and lnb commands, but none of them returned a result.

#

Is it also possible to change the number of columns and rows in toolbox without using the config class?

gaunt python
#

If remoteContent is possible one day, that might be awesome !

open gull
#

I create GUI:

class RscBrowser
{
    idd = 20000;

    class Controls
    {
        class Texture: RscText
        {
            type = 106;
            idc = 20001;
            x = safeZoneX;
            y = safeZoneY;
            w = safeZoneW;
            h = safeZoneH;
            url = "file://html\test.html";
        };
    };
};

And i try show:

findDisplay 46 createDisplay "RscBrowser";

I don't get any errors.
In single player, everything works, but not in multiplayer.

hoary estuary
#

Calling it too early probably

#

do `waitUntil {!isNull findDisplay 46}

open gull
#

I call it manually when the 46 display is already working.

#

It seems to be created - the cursor appears, but nothing is displayed.

hoary estuary
#

Add another control to see if that works. If it does then its about new browser control

dense hazel
#

im new and a little lost could you show me the ropes of amra?

open gull
#

Do I need to specify every file now? Can't I just put an asterisk?

tranquil iron
#

You do not need to allow the URI, that is only for web URL's.
Extensions is for loading files out of PBO

open gull
tranquil iron
#

Mh the only reference to allowedHTMLloadExtensions I can find is server.cfg?

#

Ah right you are testing in multiplayer

errant orbit
# lament laurel pixelGridNoUIScale change to pixelGrid

It doesn't work like that, on very small I can't see the text (it's too small), on very large it's exactly as I want it. I need that if let's say to the right of the edge 3 pixels, then no matter what scale there will always be 3 pixels conditionally.

quiet arrow
#

Make sure that your button control uses the same grid as the font size

#

Then they scale evenly.-

#

And as long as you stay within an acceptable size it will also be ledigable on all ui sizes

lament laurel
wicked egret
#

Did anyone try ExecJS in PageLoaded EventHandler for CT_WEBBROWSER? Docs say "Once PageLoaded is triggered, it is safe to execute javascript on the page", but for me window is not yet defined in this case (debug console shows contentWindow of iframe is undefined) and sometimes ExecJS gets dropped. sleep 1; in sqf before ExecJS makes it work, but is not really how i would like to solve this.

wicked egret
open gull
#

I'm trying to open a page.
The display is created, but nothing is displayed.

private _display = findDisplay 46 createDisplay "RscBrowser";

private _browser = _display displayCtrl 20001;
_browser ctrlWebBrowserAction ["OpenDataAsURL", loadFile "html\help.html"];
#

I found out that loadFile returns me an empty string.

open gull
tranquil iron
young patio
#

Would anyone know why this does not update the control text:

_ctrl ctrlSetStructuredText parseText format [
    "Some text [<t color='%2'>%1</t>]",
    ["OFF", "ON"] select _bool,
    ["#FFB6C1", "#90EE90"] select _bool
];

Yet doing this works with no issue:

hint parseText format [
    "Some text [<t color='%2'>%1</t>]",
    ["OFF", "ON"] select _bool,
    ["#FFB6C1", "#90EE90"] select _bool
];

I have verified that the _ctrl is the proper control as ctrlEnable affects it. I have also verified that _bool is not nil. Honestly pretty stumped, have ran into this before but have no idea what I am doing wrong. The control I am attempting to set this on is a standard button.

young patio
#

Yep appears that's it pepehands

wicked egret
random pasture
#

So, Im not familiar with anything when it comes to development of GUI stuff - how hard would it be to mess with the attribute window in the editor to add in new ranks that are selectable (such as adding in specific LT ranks and additional NCO ranks for mission makers to use)?

idle spruce
random pasture
#

It will just stack them in automatically with no extra work on my part?

#

And follow-on: Will this effect the ranks players see in game automatically, or do I need to add classnames to another cfg?

idle spruce
#

a little more in depth, i don't think the control automatically resizes itself or turn into a horizonal scroll bar

#

so you probably have a lot of work on yoru part to do

random pasture
#

Gotcha, thank you

idle spruce
#

now you can modify CfgRanks

#

which you can then set ranks via script, but it won't show up in GUI unless you do some modifications of the above class

quiet arrow
#

You could change it to a combo box if needed. Or make a custom attribute just for your ranks. The latter might be easier and generally better

tranquil iron
cinder umbra
#

After 2.20 update, our gui interface button hyperlinks stopped working. What has changed and how to make it work in 2.20?
Button config example:
class Button_Help: RscStructuredText { idc = 1230; style = 48; text = "<a href='https://discord.gg/gekeuht'><img size='3.72' image='\SW_ui\inventory\button_link_active.paa'/></a>"; x = 0.578376 * safezoneW + safezoneX; y = 0.7024 * safezoneH + safezoneY; w = 0.0309375 * safezoneW; h = 0.088 * safezoneH; color[] = { 1, 1, 1, 1 }; colorActive[] = { 0.7, 0.7, 0.7, 1 }; onMouseEnter = "(_this select 0) ctrlSetStructuredText parseText ""<a href='https://discord.gg/gekeuht'><img size='3.72' image='\SW_ui\inventory\button_link_inactive.paa'/></a>"""; onMouseExit = "(_this select 0) ctrlSetStructuredText parseText ""<a href='https://discord.gg/gekeuht'><img size='3.72' image='\SW_ui\inventory\button_link_active.paa'/></a>"""; };

quiet arrow
#

You need to whitelist them in CfgCommands.

cinder umbra
open gull
#

CT_WEBBROWSER has been created for a long time. If I create a dialog, the content is displayed after 3 to 7 seconds. Is there a way to somehow caching it and display it instantly or at least in the shortest time after creating the dialog?

tranquil iron
#

Make the page small and fast to load

open gull
tranquil iron
#

Well I never had any issues with slow opening.
But because its Steam doing the opening, its possible that it can be slow doing that. If thats the case then nothing we can do

thick cave
#

Hi guys, I'm not sure if this is right topic, but, we got "brightness" in splendid camera, I would LOVE to use this feature ingame, does anyone knows the command for this feature ? It seems its using Aperture command too πŸ€” Scene looks fantastic with it.

distant axle
#

setAperture/setApertureNew

thick cave
#

I know, but its not the only parameter it is using I think.. maybe some combination, not sure. Thanks anyway πŸ™‚

unkempt cliff
#

anyone know the display where all the main GUI controls are kept?

distant axle
#

As in config or allDisplays etc?

unkempt cliff
#

basically allDisplays but havent yet figured if its one of those. probably has to be

distant axle
unkempt cliff
#

hmm i checked those but the chat messages which im looking for must be under some other display

distant axle
#

Chat messages? What is your purpose?

unkempt cliff
#

hide the chat messages temporarily

distant axle
unkempt cliff
#

ok thats weird it wont work , i still see my messages

distant axle
#

"Your" messages?

unkempt cliff
#

yes

#

what you send in the chat

unkempt cliff
#

i am actually using that but it cant hide existing messages can it?

distant axle
#

It doesn't, but it can cancel it from sending

unkempt cliff
#

i know

#

clearRadio seems to work, but is not ideal, i still want to keep the old messages

#

ok this "hack" works ```sqf
addMissionEventHandler ["EachFrame",
{
showChat false;
}];

#

this also seems to work (from console) ```sqf
[] spawn
{
sleep 0.5;
showChat false;
};

#

thx POLPOX for the showChat

burnt steeple
#

How can i create buttons with CT_WEBBROWSER in Arma.
I wanted to create a simple keypad with WEB
So i have this so far:
Html:
https://pastebin.com/2D8SKhLk
Css:
https://pastebin.com/QAwp4We3
JavaScript:
https://pastebin.com/qNL5pbiu
Description:

import RscText;
class RscTitles
{
    class HudOverlayUI
    {
        idd = 13371337;
        fadein = 0; // Required parameters for RscTitles
        fadeout = 0;
        duration = 1e+011;

        onLoad = "GHUDOverlay = _this"; // Store our Display in a variable so we can access it from script

        class controls
        {
            class Texture: RscText
            {
                type = 106; // CT_WEBBROWSER
                idc = 1337;
                x = safeZoneX; // Full screen from corner to corner
                y = safeZoneY;
                w = safeZoneW;
                h = safeZoneH;
                url = "file://Index.html"; // Reference to a file inside our mission
            };
        };
    };
};

Also this is new teritory for me with Web stuff so sorry if i dont get anything but now i just get the picture of buttons in arma how would i make them functional ?

tranquil iron
#

Make your onLoad script, a function thats being called.

use ctrlAddEventHandler on your idc 1337
To add a https://community.bistudio.com/wiki/CT_WEBBROWSER#JSDialog handler

For now probably just add diag_log _this into it so you can see whats going on.

In your javascript, after line 11 add
A3API.SendAlert("keypadContent: " + display.value)

And tadaa, you will see the keycode you're entering, in SQF
Then you can do in SQF whatever you want with it

unkempt cliff
#

how do you run code in main menu?

quiet arrow
#

Via preInit function

unkempt cliff
quiet arrow
#

Ah yesπŸ˜…

unkempt cliff
#

im trying to use BIS_fnc_guiMessage there but it is nil. anyway to get message box like that in the main menu?

quiet arrow
#

You could always call the script file that points to the function

unkempt cliff
#

ok i will try

#

well the message box isnt showing up. maybe it needs the main menu as parent. but alldisplays returns empty array.

quiet arrow
#

Probably too soon

unkempt cliff
#

yeah

tranquil iron
#

Prestart is too soon.
with CBA you could use XEH for display load of the main menu

#

I tend to stick things into onLoad of some main menu control

unkempt cliff
#

is RscMainMenu the main menu?

tranquil iron
#

Sounds like it

unkempt cliff
#

yeah

unkempt cliff
#

i think its RscDisplayMain. and I "overloaded" the OnLoad but alldisplays is still empty there and _this is empty array too

#

ok i got the display now but the BIS_fnc_guiMessage needs to suspend so it wont work there. and cant use spawn because that gets cancelled.

round scarab
#

Where do you edit or create GUI ? I use the standard editor in the editor, but I can't create a controlGroup in another similar class, which makes it inconvenient and doesn't save anything created there.

distant axle
#

By hand. Handwritten config is the only reliable and efficient way

quiet arrow
#

Or scripting.

acoustic cosmos
#

GUI: RscText

Is there a way to put a scrollbar on a CT_Static like RscText when the ST_MULTI multiline text has more lines then can fit the textbox?

opaque crag
#

Put it in a controls group, and resize the CT_STATIC to fit the text.

acoustic cosmos
#

havent touched control groups yet thonk

#

thanks for the response

steel patio
#

Hi ! i'm trying to rotate an image on the right button. The class of the button is a RscShortcutButton. I know of the ShortCutPos because I use it to scale the button's image to the right size, but I can't find a way to change the angle, I've tried angle, but to no avail.

There is my small code :

class ButtonSelectionRight : RscShortcutButton
{
x = X_COORD(0.66510417);
y = Y_COORD(0.45833334);
w = W_COORD(0.02083334);
h = H_COORD(0.04166667);
  class ShortCutPos{
    w = W_COORD(0.02083334);
    h = H_COORD(0.04166667);
   };
textureNoShortcut = "\A3\ui_f\data\GUI\Cfg\Slider\arrowEmpty_ca.paa";
};
distant axle
#

I don't think you can

steel patio
#

alright thank you ^^ So I guess i'll just make another image that is just rotated 180Β°. Seems like the simplest solution.

distant axle
#

And working solution that BI uses

empty mountain
#

or just use text < >

steel patio
#

Well < > is smart. But i'll go with the images right now (mostly because i already did them xD)
The thing I try to do now is to get the effect on the button when you press and just over the mouse on top of it. The problem I have now is that all of the anim are "behind" the image like a layer under it.

#

Nvm i find the problem I have to modify directly the anim Images and not the TextureNoShortcut

kind marsh
#

Hi folks. First timer here. Sorry for asking the obvious, but is there a linky anywhere to a starting guide on tweaking the arsenal UI? Is there an API wiki somewhere I blatantly could not find? Not sure where to get started.

unkempt cliff
#

but thats more like using arsenal, not recreating it

kind marsh
#

Thank you so much. My google-fu has abysmally failed me. :)

#

There is some API under "modding", might be enough to start.

#

Not the UI though... Is there any available source code for the game itself?

unkempt cliff
#

the sources are packed in .pbo's in arma folder

#

idk about online sources

kind marsh
#

Gotcha. I'll dig around. Thanks so much!

young patio
#

When I have an image assigned to a button and _controlVar ctrlEnable false it dims the icon on the control. Is there a way that I can undim it? I tried to ctrlSetTextColor and change it's alpha to no success.

hoary estuary
#

Checks what color values it has, probably will be something like colorDisabled

young patio
#

Cheers thanks πŸ™‚

young patio
#

Does anyone have any ideas off the top of their head why valign wouldn't have an effect but align would in ctrlSetStructuredText with an image? I am able to set it center on my X but not middle on my Y.

As a hacky work around I tried to set size much smaller then break to see if I could incrementally lower the icon without it going down too far like this <br/><t size='0.01'> and still even then seemingly no difference.

#

Ah

distant axle
#

Yep

young patio
#

Okay after reading ctrlSetStructuredText Wiki again looks like &#160 might be the solution

young patio
distant axle
#

Suprise, a decade long issue

young patio
#

Was definitely pulling out hair a little bit KEKW

idle spruce
#

when debugging with config merge, how can I make sure that defines are updated? because that is what I use to change the sizes of stuff

#

right now, the only way defines are updated is if I reload the game... maybe disable binarize on hemtt for the ui addon?

edit: this was the answer

sullen eagle
#

Sometimes in respawn menu I see a yellow exclamation mark near the spawnpoint. As I understand, it warns the player about enemy present near that position.
What are exact conditions for it?
I'm blocking the respawn on some points too, and wanted to synchronize the conditions.

quiet arrow
#

You need to read the code

sullen eagle
#

Mmm... Do I? πŸ™‚
Most likely there is a predefined radius for searching enemies, an I just wanted to know what is it. I don't think I need to read the code for it, the radius can be retrieved experimentally.
And as it is a part of GUI, there should be some explanations from devs, isn't it?

quiet arrow
#

Just read the code and you get all that info. I doubt anyone knows the exact condition.

sullen eagle
#

So you're implying that there's an active game element that no one knows about, not even the developers, and you need to look into the code? Even if we temporarily imagine that this is the case, how do you suggest I do it? Or is it a joke?

quiet arrow
#

Use the functions viewer

round ore
#

Arma 3\Addons\functions_f.pbo/Respawn

#

Good luck.

loud flame
#

Not every detail of a game is remembered by someone at every given moment, that's wild to think
There's probably someone who tested the radius at some point in time sure, but you can also just go look at it.

Reading code is such a basic requirement and would have been much faster

proud frigate
#

Is it possible to change the alignment of a CT_LISTNBOX picture within its column?

quiet arrow
#

No

#

But you can have the image in an extra column and move that one around

proud frigate
#

Unfortunately that doesn't help with what I wanted (centre aligning images within their column to make it less obvious that they have different horizontal padding). Oh well

hoary estuary
#

Yeah its all super limited with listboxes

#

Personally I solved it with two listboxes on top of another

#

One listbox with center alignment for columns that need it, another with normal left alignment for other columns

#

This is not an option for selectable lists, only static ones

#

Might be better to just simulate your own list with any controls you want

#

Actually, maybe having two lists could work if you disable one and constantly ctrlSetScrollValues it to match another, but I haven't tried it

opaque crag
#

Emulating with ControlsGroup is much easier than you'd expect, IME.

hoary estuary
#

Yeah, controls group is the most flexible solution

proud frigate
#

I'm suspecting the answer is no, but is there a way to have an ST_PICTURE image scale to fit the control's largest dimension while retaining aspect ratio?
In basic ST_PICTURE, the image stretches to fill the control but doesn't mantain aspect ratio.
With ST_KEEP_ASPECT_RATIO, the image keeps its aspect ratio but only scales to the control's smallest dimension, leaving blank space on the larger dimension.
I'm looking for the third option: scale the image to the largest dimension, without stretching, and crop anything that exceeds the smaller dimension. I haven't been able to find anything with searching, so it's probably impossible, but...can't hurt to ask.

quiet arrow
#

Not. Unfortunately that's not possible.

hoary estuary
#

GIB ST_KEEP_ASPECT_RATIO_WIDE

quiet arrow
#

Just a proper picture canvas control

empty wedge
#

Hey, is there a trick to make a controlsGroup movable? Like maybe a custom controlsGroup class or something? Because in my dialog, I’ve got movingEnable set to true, same for my controlsBackground (moving true), and it works fine. But as soon as I add a controlsGroup inside controls, it’s not draggable anymore rius30

quiet arrow
#

Only certain control types allow dragging usually CT_STATIC

#

Usually one would have a titlebar made out of a static control that allows the user to drag the display.

umbral niche
quiet arrow
#

No

#

Use separate images and change them eachNFrame

idle spruce
# umbral niche

an example with 21 different images, called each frame

// 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") then { continue };

_ctrl drawIcon [
    _siloIcon,
    [1,1,1,1],
    getPosATL _x,
    32,
    32,
    0
];
umbral niche
idle spruce
#

i personally load all of the file paths into a large hashmap at start for easier code readability

stoic delta
#

Haven't made a GUI in a minute. The following code does not work. All the controls do not show when envoking this w/ createDialog
All that happens is a blank screen.

import RscPicture;
import RscShortcutButton;
import RscEdit;

class rscLoudspeaker {

    idd = 91554;
    movingEnable = true;
    controlsBackground[] = {};
    controls[] = {"confirm_button", "freq", "anprc_background"};
    ////////////////////////////////////////////////////////
    // GUI EDITOR OUTPUT START (by Crowmedic, v1.063, #Dynasu)
    ////////////////////////////////////////////////////////

    class anprc_background: RscPicture
    {
        idc = 1200;
        text = "res\anprc_210.paa";
        x = 5.5 * GUI_GRID_W + GUI_GRID_X;
        y = 4 * GUI_GRID_H + GUI_GRID_Y;
        w = 28.5 * GUI_GRID_W;
        h = 12 * GUI_GRID_H;
    };
    class confirm_button: RscShortcutButton
    {
        idc = 1600;
        x = 28 * GUI_GRID_W + GUI_GRID_X;
        y = 12.5 * GUI_GRID_H + GUI_GRID_Y;
        w = 4 * GUI_GRID_W;
        h = 2.5 * GUI_GRID_H;
        tooltip = "Set listening frequency"; //--- ToDo: Localize;
        animTexturePressed = "res\anprc_switch_on.paa";
        animTextureNormal = "res\anprc_switch_off.paa";
    };
    class freq: RscEdit
    {
        idc = 1400;
        x = 14.5 * GUI_GRID_W + GUI_GRID_X;
        y = 6 * GUI_GRID_H + GUI_GRID_Y;
        w = 9 * GUI_GRID_W;
        h = 2.5 * GUI_GRID_H;
    };
    ////////////////////////////////////////////////////////
    // GUI EDITOR OUTPUT END
    ////////////////////////////////////////////////////////
};```
quiet arrow
#

have you defined the macros?

stoic delta
#

yes. I confirmed when checking the missionconfig in the config viewer that they are infact defined

#

all texture paths are correct too, no error are thrown of (file).paa not found

stoic delta
#

Figured it out I think. Man the GUI editor sucks. Those coordinates I believe must be way off screen. I changed them to using the safezone type coordinates and now they are showing up

silk lodge
#

hey guys so im playing around with some GUI and just realized that while in GUI config you can change many different things for button colors. But not in SQF? Theres only 4 commands that deal with background color, forground color etc. Is there no command for setting the colorBackgroundActive[] or colorFocused[] and colorFocused[]?

        //when enabled - GUI Config
        colorBackground[] = {0.38,0.38,0.38,1};
        colorActive[] = {0.41,0.41,0.41,1};
        colorBackgroundActive[] = {0.41,0.41,0.41,1};
        colorFocused[] = {0.41,0.41,0.41,1};
        colorFocused2[] = {0.41,0.41,0.41,1};

        //when disabled  - GUI Config
        colorDisabled[] = {0,0,0,1};
        colorBackgroundDisabled[] = {0.8,0,0,1};

        //Sqf commands
        //_button ctrlSetBackgroundColor [0,0,1,1];
        //_button ctrlSetActiveColor [0,0,1,1];
        //_button ctrlSetForegroundColor [0,0,1,1];
        //_button ctrlSetDisabledColor [0,0,1,1];
quiet arrow
#

Yes, not all config values are available in sqf, but also not all config values in the config viewer do something.

silk lodge
quiet arrow
#

Depdning on what you wanna do you can also use event handlers and change the button color

#

e.g when hovering hover it with the mouse you just fake the "active" color

young patio
silk lodge
silk lodge
quiet arrow
silk lodge
quiet arrow
#

Never mind. This won't work as config focused colour will overwrite the background colour in that case.

#

You could try to make the button invisible and just have a CT static control in the background and change it's colour

slim finch
#

does anyone know why controlsGroupCtrl will sometimes return as No Control? control and IDC are valid, it will just sometimes show No Control

solid gyro
slim finch
opaque crag
#

OnLoad fires before the controls are created. Normal Arma things.

#

ACE interaction menu is an entirely separate bucket of shit.

#

IIRC the problem there is something like the interactions not being set up for a class until you create an instance of that class.

#

We had to workaround that with some filthy hacks.

slim finch
#

the rest of the stuff on the interaction work fine though, which is what confuses me

opaque crag
#

On the onLoad thing, the spawn works because the controls are created immediately after the OnLoad fires, so the minimum half-frame delay on spawn always works.

#

Trouble there is that you can't guarantee that it won't delay for another frame or longer.

#

A better way of handling the issue might be to put the onLoad on a "load order" control.

#

Because there's an order that the controls are created and you can probably guarantee that the onLoad will then fire after all the controls are created.

slim finch
#

The onLoad is just a setVariable though, the actual creation of the body image is done via scripting and a CT_CONTROLS_GROUP
Plus im doubting its an issue with load order, as some bodyparts are fine

opaque crag
#

Well, it's either a load order issue or your code is wrong :P

#

There's too much UI out there for it to be randomly losing controls.

slim finch
#

well im doubting the code is wrong, as medical menu works fine
Its just some limbs just dont show on peek,

celest drift
#

There was a tool I used about a year ago that lets you edit and create UI for a3 in a seperate program but it was not the one from Bohemia in the game

#

I cant remember what it was called does anyone know what Im referring to?

idle spruce
#

I remember it. Arma dialog something. It's broken on its calculations.

placid hare
#

It's better to do it by hand tbh. But it might help you a bit to get the basics, if you have no clue at all.

zinc root
#

I'm trying to make a launcher with a custom optic view and I'm using the vanilla Titan launcher's as a base. Looking at RscOptics_titan, I see that several of the controls have idc values that correspond to defines in defineResIncl.inc. An example being the CA_OpticsZoom control in RscOptics_titan having an idc of 180 that matches IDC_IGUI_WEAPON_OPTICS_ZOOM in defineResIncl.inc.

By using the same idc in my own custom control it replicates the functionality found in CA_OpticsZoom, such as dynamically changing the control's text value and only showing the control when ADSing. Assuming this functionality is tied to a script instead of being engine-level, I'd like to find this script (along with others tied to IDC_IGUI_WEAPON_XX defines) so that I can see how it works and create my own, however I have not had any luck finding them. Am I correct in assuming this functionality is handled via script, and if so where can I find these scripts?

hoary estuary
#

Likely engine-driven

open gull
#

I use the browser to display my HUD, but I get this error.
It appears when I try to upload an image in the browser.

if (primaryWeapon player != "") then {
    private _weapon = configFile >> "CfgWeapons" >> primaryWeapon player;
    private _weaponName = getText (_weapon >> "displayName");
    private _weaponPicture = getText (_weapon >> "picture");
    private _weaponAmmo = player ammo primaryWeapon player;
    private _weaponMagazines = count primaryWeaponMagazine player;

    _weaponPicture = [_weaponPicture, "\", "\\"] call CBA_fnc_replace;

    _control ctrlWebBrowserAction ["ExecJS", 
        format [
            "window.ArmaBridge.weapon.setWeapon(1, '%1', '%2', %3, %4)",
            _weaponName,
            _weaponPicture,
            _weaponAmmo,
            _weaponMagazines
        ]
    ];
};
#

On the browser side, I make composable to work with A3API, here is my method:

const requestTexture = async (texturePath: string, maxSize: number = 512): Promise<string | null> => {
    try {
      return await window.A3API.RequestTexture(texturePath, maxSize);
    } catch {
      return null;
    }
  };

And use:

const imageData = await requestTexture(imagePath);
    if (imageData) {
      weaponImages.value.set(slot, imageData);
    }
open gull
#

It was necessary to remove the first two slashes...

#

But I ran into another problem.
How do I transfer Cyrillic alphabet to the browser?

If I pass Latin characters, everything works.
But if I pass the Cyrillic alphabet, it will be displayed as plain text with bit encoding.

I tried using ToBase64, but when decoding base64 strings, I get the same broken text.

open gull
#

I couldn't think of anything better than to convert everything to unicode...

UtilsSting_fnc_EncodeUnicode = {
    params ["_string"];

    private _result = "";
    private _chars = toArray _string;
    {
        private _charCode = _x;
        if (_charCode > 127) then {

            private _hex = [];
            private _temp = _charCode;
            
            while {_temp > 0} do {
                private _digit = _temp % 16;
                _temp = floor (_temp / 16);
                
                private _char = if (_digit < 10) then {
                    str _digit
                } else {
                    switch (_digit) do {
                        case 10: {"a"};
                        case 11: {"b"};
                        case 12: {"c"};
                        case 13: {"d"};
                        case 14: {"e"};
                        case 15: {"f"};
                        default {""};
                    };
                };

                _hex pushBack _char;
            };
            
            while {count _hex < 4} do {
                _hex pushBack "0";
            };
            reverse _hex;
            
            _result = _result + "\\u" + (_hex joinString "");
        } else {
            _result = _result + toString [_charCode];
        };
    } forEach _chars;
    
    _result;
};
tranquil iron
solid gyro
#

aa, its same.

tranquil iron
#

Yeah that was when I wrote that Radar code

open gull
tranquil iron
#

Please read again what I wrote

open gull
#

I got the impression that only ASCII characters are transmitted to the browser.

tranquil iron
#

That's incorrect.

brisk dirge
#

I couldn't think of anything better than

soft nexus
#

Anyone around to explain something to me? I'm working on a Zeus module to spawn a filtered arsenal where the filter depends on what option is selected and the function is executing perfectly but when I drop the module the selection menu isn't popping up, it just executes immediately with the default value (being a full arsenal).

I'm not sure what I'm doing wrong, am I supposed to create a GUI in Eden or is that supposed to be generated by the Arguments class?

idle spruce
#

Zeus i mean

#

It's one reason why I've been putting off moving modules enhanced to support Zeus.

soft nexus
#

Pain PepeHands

loud flame
soft nexus
quiet arrow
#

You can probably just use one of the vanilla ones as base

soft nexus
nimble obsidian
#

Hey
Whats the best action to show ai recived damage by player shoot for the shooter player?

#

Like a fade in and out text style

valid nebula
#

Question. I'm having a problem by putting idc = -1 in some controls. When I open the GUI, a random control gets missing (not showing off, no error). But when I just make a new idc number for those controls, it works (all controls shows normally).
Does anyone else have this problem?

strange arrow
#

There are some known cases where controls must or must not have specific IDCs. Apart from these cases, using -1 for IDCs you don't care about is convention.

#

Is it really a random control that disappears or is it always the same one?

valid nebula
#
class FrameLnB01: SuppliesMenu_Frame_Base
{
    idc = -1;
    style = ST_FRAME;
    x = 0.237593 * safezoneW + safezoneX;
    y = 0.359969 * safezoneH + safezoneY;
    w = 0.216486 * safezoneW;
    h = 0.290061 * safezoneH;
};
class Suplies_ListBox_items: SuppliesMenu_ListNBox_Base
{
    idc = 89150;

    x = 0.237593 * safezoneW + safezoneX;
    y = 0.359969 * safezoneH + safezoneY;
    w = 0.216486 * safezoneW;
    h = 0.280062 * safezoneH;
};

class Supplies_Text_MagItems: SuppliesMenu_Text_Base
{
    idc = 89102;
    text = "Item";

    x = 0.237593 * safezoneW + safezoneX;
    y = 0.317959 * safezoneH + safezoneY;
    w = 0.104963 * safezoneW;
    h = 0.0280062 * safezoneH;
    colorBackground[] = {0.2,0.23,0.18,1};
};

^ Item control gets missing/hidden/not showing

quiet arrow
#

Its the listNBox

#

give idcLeft/right any other idc except -1

valid nebula
quiet arrow
hazy narwhal
#

*but thanks brother ❀️ *

drowsy nacelle
#

I've been trying to figure out how the main BI menus load to a scenario or what functions they invoke for that (I.E. where you select a scenario and start it from the main menu). I've found the UI functions that handle those menus, for a more specific example the Host Multiplayer scenario browser, but I cant find anything that attaches actions to the actual buttons. There's plenty of code to change the other stuff on the Rsc like changing the mission summary / chat tabs but there's no actions on the buttons in config or in the UI scripts, either to switch displays or start the mission. I'm not seeing another code path here, am I missing something with how the main menu resources are set up?

drowsy nacelle
# idle spruce What is your goal

Goal is to have a custom display/rsc on the main menu that has its own buttons to load into a scenario. I'm trying to figure out where the actions used on the main menu to switch between displays / enter game are defined so I can work from those.

drowsy nacelle
#

Think I finally tracked down playMission, hostMission, createMissionDisplay, and createMPCampaignDisplay. Still don't know where most of the buttons are defined, but those are defined on the main menu gamemode dropdowns so that makes sense.

#

Well, the Apex Protocol button has it defined at least. The other quickplay / server browser buttons have their actions somewhere else

idle spruce
valid nebula
#

I'm getting Bad conversion: scalar in rpt file while my custom GUI is open. I'm gonna investigate this issue, but if anyone knows what kind of error is this I'll be thankful.

quiet arrow
#

Bad type in config maybe?

valid nebula
#

I'm thinking the same, gonna double check that

valid nebula
#

uh oh, it's not related to the custom GUI

#

it's any action that I do in game

quiet arrow
#

strange

hoary estuary
#

Could be drawIcon command

valid nebula
#

weird, I'm not using that command

#

and it's not running anything on scheduler

opaque crag
#

just gotta add a lot of logging to isolate those.

valid nebula
#

and I'm only using Basic mods like cba, ace, zeus enhanced, adt

opaque crag
#

-debug doesn't show context for them.

valid nebula
#

but no clue, it just throws that error like randomly

opaque crag
#

It doesn't. You've just asked it to do something incorrect somewhere.

valid nebula
#

I mean random in a sense that I couldn't find precisely what is causing it, I thought it was causing by opening the custom gui, but by just making the character walk the rpt file fills up with that error

#

tomorrow I'm gonna test it out in other scenario and report back

tranquil iron
tranquil iron
#

Huh. They are error messages, they go through the context reporting

valid nebula
#

Found the issue, not related to gui, going to move this discussion to another channel

mental trench
#

I am not sure if this is the right place to ask, or if it should be in scripting? I know how to make decent dialogs, so far. I am going to make a simple one that displays server rules, with a next button, another page, etc. and a close button. I know how to script it so such a menu opens with a player command, but I need to know how to make it display automatically at spawn?

quiet arrow
#

you can open the UI via initPlayerLocal.sqf

mental trench
plucky bloom
#

Is there any simple mod that draws a 3d marker on the terrain to point where you are ordering AI squad soldiers to move? Like the Brothers in arms command ring. I found c2 command mod but it’s too complex

idle spruce
#

You can make this. Moderate knowledge level. Using draw3d.

plucky bloom
#

Yes I’ve made it actually by spawning a per frame 3d object. Works good so far, thanks!

steady steeple
#

Hello! I'm trying to dabble in UI modding for the first time. What I've got going on is this:

class ListBackground: RscText {
    idc = -1;
    style = QUOTE(ST_CENTER);
    x = QUOTE(0.139062 * safezoneW + safezoneX);
    y = QUOTE(0.929 * safezoneH + safezoneY);
    w = QUOTE(0.108281 * safezoneW);
    h = QUOTE(GVAR(CBA_Setting_Pingbox_Size) / 3 * 0.066 * safezoneH);
    colorText[] = {1, 1, 1, 0.5};
    colorBackground[] = {0, 0, 0, 0.5};
};

Of note is this line:

h = QUOTE(GVAR(CBA_Setting_Pingbox_Size) / 3 * 0.066 * safezoneH);

Before my changes it used to look like this:

h = QUOTE(0.066 * safezoneH);

When I try to use this UI it seems like GVAR(CBA_Setting_Pingbox_Size) returns zero and the gui element collapses as its height is zero. I gather it means I can not use CBA settings like that.

What would be the best practice for basing the ui element size on a CBA setting?

loud flame
hoary estuary
#

ST_CENTER is 0x02

drowsy nacelle
#

Does anyone know what kind of tech the Roles section on the multiplayer setup screen is using? I'm trying to automatically select a player into a slot and join them to the game with a script, but lbSetCurSel only highlights the role entry, as seen, while I still need to click to register my player as part of the slot. Clicking normally seems to both select and put the player in the slot, and clicking a slot again removes the player. No other keys seem to put the player in the slot while it's selected; it seems to be mouse only that triggers it.

#

The main issue here is that the functions that actually make and generate the listbox and other parts of the UI are hidden or stored somewhere else: there is an exposed onLoad script it runs at RscDisplayMultiplayerSetup.sqf, but that only configured the player's name and mission name and stuff; the code to actually make these other parts is hidden somewhere so I cant see if its a mouse action or if I need a different command for a different control or what variables I might need to manipulate.

crimson garnet
#

Description.ext

class RscDisplayMultiplayerSetup
{
onLoad = "_this spawn compile preprocessFileLineNumbers 'autoSlot.sqf'";
};

#

Script may not be working but I believe this is the method @drowsy nacelle

drowsy nacelle
#

...it's a tree?

#

I'm baffled. Apparently I need to be looking closer :P

crimson garnet
#

Can you find RscDisplayMultiplayerSetup in config viewer?

#

I believe here it'll say type 12 / CT_Tree

#

But I wouldn't use the script as its no good but simply to show how I'd call the function without mission playing etc script may have issue for sure , not tested at all ^ ...

drowsy nacelle
#

Yeah sure, makes sense. I did look at the config viewer and I'm pretty sure I verified everything was a listbox. I'll double check

#

yeah no, the ones I have are definitely type 5 and 102 (listbox and listnbox). Is this maybe part of another mod that edits that display?

crimson garnet
#

Yes you are right it'll be an edited RscDisplay from the framework.. perhaps you have the open slot selected automatic, you can ctrlClick to select slot

vapid cape
#

I've got a button I added to my main menu that, when I did something like this years ago, worked:

{
    idc = 57501;
    color[] = {1,1,1,0};
    colorActive[] = {1,1,1,1};
    text = "tag_menu\images\ts3_ovr.paa";
    x="0.425 - (1.5 *     10) *     (pixelW * pixelGridNoUIScale * 2) -     (2 * pixelW)";
    y="0.9 - (    10 / 2) *     (pixelH * pixelGridNoUIScale * 2)";
    w="10 *     (pixelW * pixelGridNoUIScale * 2)";
    h="10 *     (pixelH * pixelGridNoUIScale * 2)";
    url="ts3server://<teamspeak IP removed>:<port>";
    style=48;
    overlayMode=0;
};```
It doesn't work unfortunately. I removed the IP and port but I know the URL contents are good because when opened in browser, it properly asks to launch TS3.
vapid cape
#

Actually I tried this with an old menu I made a while back that DID have a working teamspeak button and that no longer works. Was there an engine-level change in any of the past few updates that could have changed the ability for url to open stuff? Happening to me on profiling and stable, and when I shared my PBO to someone to test it happened to him to. I tried changing the url to just google and no dice there either.

quiet arrow
#

Yes

#

You need to whitelist URLs. That should have been always the case but was broken.

pliant valley
#

Is there an easy way to make UI icons for the arsenal, similar to the vanilla ones?

#

Doing some funky muck-arounds rn and remember hearing somewhere there might have been an easier way

quiet arrow
#

No, you need to make the icons yourself if the ones ingame don't fit

pliant valley
#

I mean more like getting images of the items, like how they're just the helmet or uniform, without the guy wearing it

quiet arrow
#

#arma3_config Is probably more fitting as these guys do this more often.

vapid cape
#

Actually I guess if you had your own website, you could just load the url https://myunitswebsite.com/ts3 and then the page it loads is just html with <meta http-equiv="refresh" content="0;url=ts3server://<ts3 server ip>:<port>">. Just dropping that here so I don't forget and in case any future searchers come back this far.

tranquil iron
#

Ah I'm replying before I finish reading all messages πŸ˜„

vapid cape
# tranquil iron ts3server:// is not a valid URL protocol. Valid protocols are http(s)/ftp/gopher...

Fair, I can understand that, I'm just wondering if it could maybe be brought back given how prolific ACRE and TFAR are. Though I guess it's still a niche case to customize the main menu with this kind of thing. Would it only work if whitelisting was reverted to its broken state I guess? Only reason is I & the community I set the menu up for don't want to host or pay for hosting a web server just to redirect off it anyway

tranquil iron
#

I can whitelist the ts3server protocol.
But... don't think its worth it

vapid cape
#

And there's no way it could be made compatible with CfgMissions whitelisting? i.e. don't universally whitelist ts3server but if it exists in cfgmissions then it would work? Sorry to take up time on this I'm just very wishful thinking right now haha

loud flame
#

What would make it not worth it?

tranquil iron
loud flame
#

Plenty of groups already add stuff to the main menu to quickly join their server, TS would just be an easy extension to it. It also seems like it was something that did work and was then removed

vapid cape
#

Agreeing with Dart that it used to work and would be very nice to keep working as previously expected, just a handy QoL feature

idle spruce
valid monolith
#

the main problem is that I'm experiencing performance losses due to cba event handlers.

#

now i fixed it by overriding the cba class

class Extended_DisplayLoad_EventHandlers {
    class RscDisplayMultiplayerSetup {
        cba_ui = "";
    };
};
limpid perch
#

a question, how can i make a custom hud with a food and thirst bar?

solid gyro
limpid perch
#

i want to use as few mods as possible to avoid errors

#

thats why i want to know how i can make one?

solid gyro
#

So you want to create your own "field ration" system.
Well that might be "big" progress, but you could follow how ace has done that.
You can do it without mods or like ace , use CBA , so you don't have "many" mods on thdt

limpid perch
#

the thing is, i dont know how to do it, i dont know anything about code but i would like to learn so i can make a hud like the one in dayz

idle spruce
#

Too big of scope for a newbie. Start smaller.

#

Try just, making a box that displays a text, put it in different positions, then expand on that.

limpid perch
#

but im stuck and i dont know how to fix it

idle spruce
lament laurel
#

Does anyone have a formula for changing the text and icon size for the DrawIcon3D command relative to the distance from the player? When using

offsetX: Number - (Optional, default 0) X offset for the icon text
offsetY: Number - (Optional, default 0) Y offset for the icon text

If I move away from the object, the text moves very far from the expected position. This is also necessary so that when using multiple DrawIcon3D commands, the text doesn't overlap with other text. I also use different selection positions for different player information, so I have about six DrawIcon3D commands. I could, of course, use a single position and scatter the text using offsetX and offsetY, but that wouldn't work because there are multiple icons that are also positioned relative to the text.

Would it be better to detect the center position of the object on the player's screen and then use that position to calculate an offset relative to the resulting screen position and then convert those screen coordinates to world coordinates?

I assume this would be similar to the 2D screen position for drawicon3d. But I still need to do something with the sizes...

This is how I get a multiplier for the text size and set minimum and maximum values ​​so that the text doesn't disappear completely or become huge next to another player.


((0.04 * _k) min (0.04)) max 0.021```

I hope someone has ideas on how to improve this so that the text on 6+ drawicon3d commands adapts to the distance and doesn't overlap.
quiet arrow
#

you can use linearConversion

lament laurel
#

I know linearConversion but I still don't understand how to nicely wrap all 6 drawicon3d in 2D position... I guess I really will have to use posScreenToWorld and posWorldToScreen

#

DrawLine3D works in such a way that the line disappears behind the texture of another intersecting object. Is there a command that creates a line on the screen so that it can be seen even through objects?

The advanced dev tools mod has a 2D line, but I still don't understand how it works. I also noticed that it continues to render even when another display is open.

#

I figured out how to create a 2D line. It's actually ctrlCreate "rscLine" in the mod...

regal fiber
#

anyone know where i can fin the GunParticles config to make a new one ?
for example the signal pistol's gunparticles :

{
    class Effect1
    {
        effectName="StarterPistolCloud1";
        positionName="usti hlavne";
        directionName="konec hlavne";
    };
    class Effect2
    {
        effectName="StarterPistolCloud2";
        positionName="konec hlavne";
        directionName="usti hlavne";
    };
};```
loud flame
#

But it's just CfgCloudlets iirc. Maybe complex effects which are just defined in the config root

regal fiber
regal fiber
loud flame
sullen lava
#

Im not sure whether to ask here or #arma3_config but:
I want to make a button in MainMenu to take me to the Editor, but when I checked the already existing Editor buttons they dont really have anything onButtonClick, so my question is, how do I open Editor through script?

Edit:
setting idc to 142 works kinda, but is not a nice solution and breakes some stuff as well

loud flame
#

What's the menu for double clicking on an object in Zeus where you can change the health / fuel / whatever?

I want to add some more stuff to it for a specific object of mine

idle spruce
#

oh wait thats 3den. one sec

idle spruce
#

I'm thinking it might be Control #10312 (under display 312 which is curator)

#

the config dump commands are not working well on linux dev, so I can't test atm

loud flame
idle spruce
#

I don't. I was doing current display dumps and comparing them to find the difference between when its on vs when its off. On the zeus display, the only thing different between when the menu was there or not was Control #10312.

loud flame
#

Interesting
Will probably just do a search for that idc then

loud flame
quiet arrow
#

Zeus Enhanced is probably a good resource too

sullen lava
#

Is there something preventing RscVideoKeepAspect from playing in main menu? I did something like this, but it doesnt seem to work:

#

-# aa_loading.pbo\config.cpp (vid.ogv is placed in same location, so directly in the pbo)

class RscVideoKeepAspect;
class RscDisplayMain: RscStandardDisplay {
  ...
      class ControlsBackground {
...
        class BackgroundVideo: RscVideoKeepAspect {
            x = safeZoneXAbs;
            y = safeZoneY;
            h = safeZoneH;
            w = safeZoneWAbs;
            text = "\aa_loading\vid.ogv";
        };
...
cosmic glade
loud flame
#

Zeus Enhanced replaces the vanilla one entirely, and I don't want to force people to use Zen

cosmic glade
#

Indeed i know but ZEN is anyway a better alternative to regular ZEUS + its not a big dependency. Lot people use it also

loud flame
#

And there are lots of people who don't Β―_(ツ)_/Β―

lament laurel
#

Why menuSetShortcut no work in 3den? Or command need only for visible text?
Shift+T and Shift+G no work...

I must add EH keydown for display 3den?

distant axle
#

How is your config?

lament laurel
distant axle
#

Then post your script

lament laurel
#
private _indexUncheckable_0_1 = _ctrlMenuStrip menuAdd [[_indexMain2], "Π’Π·ΡΡ‚ΡŒ ID ΠΌΠ°Ρ€ΠΊΠ΅Ρ€Π°"];
                                _ctrlMenuStrip menuSetShortcut [[_indexMain2,_indexUncheckable_0_1], 1024 + 20];
steel patio
#

Hi ! I'm currently trying to make a menu with a camera at mission start. The problem it seems is that it execute when the players are in the map menu before the mission is really started. I tried with the didJIP param from initPlayerServer.sqf, but it doesn't seems to change anything. and even after the map the camera is created and set for the player however spawns at [0,0,0].

quiet arrow
lament laurel
#

bruh menuSetShortcut non functional... only visible nootlikethis

quiet arrow
#

I think so.

lament laurel
steel patio
prime elk
#

a3\ui_f\hpp\defineResincl.inc has

// unit info (to preserve order) - new A3
#define IDC_IGUI_AMMOCOUNT                      184
#define IDC_IGUI_MAGCOUNT                       185

do they work for weapon scopes?, I tried them but no luck, but maybe I did something wrong

formal brook
#

Good day. I'm struggling with most of my custom GUI interfaces blocking the VoN communication. Is that a known issue? Where would you suggest to start digging?

formal brook
#

UPD: I've found out that the only UI that is not blocking the VoN is the one that gets opened a) from the custom button in Inventory UI and b) Inventory UI is still in the background. By switching the calling function from one module to another I now have another window that is no longer blocks VoN notlikemeow
Again, the question is, is it a known issue and what do I do?

strange arrow
#

I saw your message the other day (#arma3_scripting message), but I have no answers for you.
The topmost dialog seems to get input focus (mostly) ... The player can't move or shoot, but in multiplayer (or MP preview in Editor) chat channels can still be cycled, opened and used without closing the custom dialogs. I didn't test with VoN / TFAR / ACRE. I can only guess πŸ€·β€β™‚οΈ

  • Maybe you are using an onKeyDown UI EH that returns true to override something?
  • Maybe your PTT key collides with a dialog-specific keybinding (e.g. Tab automatically moves focus from one control to the next)?
  • Maybe it's engine behavior?
strange arrow
formal brook
#

I mash the same buttons in both cases, I swear πŸ˜†
The first time this interface is called with a hotkey, second time from Inventory UI

strange arrow
#

Maybe it depends on the parent display πŸ€·β€β™‚οΈ You could play around with createDisplay instead of createDialog ...

strange arrow
formal brook
formal brook
formal brook
strange arrow
#

No I think this is very GUI-related and relevant!

sullen lava
#

I am trying to create a RscVideo in the arma 3 main menu that automatically plays and loops infinitely. I am intentionally avoiding the mission cutscene way, since I have annoyances in how it works and want to avoid it. Currently I just tested making a rsc, but I come up with an issue: when I use a video path used by Spotlight3 in vanilla, it works somewhat, but in a weird way where when i hover over Spotlight3 the video will play once, despite being unrelated other than having the same .ogv path. However if I use any video that I place in the pbo, even if its the same exact ogv from Spotlight3 extracted to the pbo, the video does not play at all. Im attaching my config.cpp and a video showing what happens. Can someone explain to me why this happens or how to fix this and just have a RscVideo that works?

#
#include "define.hpp"

class CfgPatches {
    class ADDON {
        name = QPRETTY;
        author = "Puotek";
        requiredVersion = 2.18;
        requiredAddons[] = {"ace_common"};
        units[] = {};
        weapons[] = {};
    };
};

class RscVideo;
class RscStandardDisplay;


class RscDisplayMain: RscStandardDisplay {
    class ControlsBackground {
        delete Picture;
        class puo_MyVideo: RscVideo {
            //text = "\aa_loading_video\spotlight3.ogv";
            text = "\a3\Ui_f\Video\spotlight3.ogv";
            x = "safeZoneX";
            y = "safeZoneY";
            h = "safeZoneH";
            w = "safeZoneW";
            autoplay = 1;
            loops = 1;
        };
    };
    class Controls {
        delete BackgroundSpotlightRight;
        delete BackgroundSpotlightLeft;
        delete BackgroundSpotlight;
        delete Spotlight2;
        delete Spotlight1;
        delete SpotlightNext;
        delete SpotlightPrev;
        delete LogoApex;
        delete Logo;
        delete Footer;
    };
};
gleaming crater
#

anyone got a good gui tutorial for starting out?
I am trying to make something very close to the gui in the picture (taken from zeus enhanced ambient flyby module)
is it complicated? been trying to understand some of the code from the zeus enhanced github but it's wrapped in many functions that load everything into one another

strange arrow
quiet arrow
#

Zeus Module uis Work a bit differently though. There is a function handling some of the positioning

#

Check out the UI code from Zeus enhanced and start from there.

strange arrow
#

As for complicated: Arma 3 GUIs are rather limited. Making GUIs is a lot of work and requires a lot of fiddling around. You can build some things with the available building blocks and APIs, you can build some more things with some workarounds, but there are certainly limits. Sometimes these limits come as a surprise and sometimes they are not documented πŸ™ƒ

gleaming crater
gleaming crater
#

I am trying to use the onLoad attribute but it won't call my function..

 class isrtg_RscDisplay : zen_common_RscDisplay {
    onLoad = "call isrtg_fnc_initDisplay";
    function = "";
    checkLogic = 0;
};

do I need to use some namespace stuff?

round ore
#

No.
Check if isrtg_fnc_initDisplay is initialized + add some logging in the function.

loud flame
#

Is there a script command setter for line spacing? Seems to be just lineSpacing property in the control config
If there is a command, I cannot find it on the wiki at all

Made a ticket
https://feedback.bistudio.com/T196100

loud flame
#

@tranquil iron when are UI on Textures deleted?
Making name badges on backpacks and wondering if I should explicitly handle cleanup on dead units myself or just let normal body cleanup take care of it.

The display is also still there (findDisplay "..." returns "Display #-1") even if I swap backpacks, so it doesn't seem to be deleted then. Also, how do I "close' a UI on Tex manually? Doesn't seem like closeDisplay works.

loud flame
#

How can I manually close one, or can I not do that?

tranquil iron
#

closeDisplay works but it has tricky timing..

#

set -debug and you'll see "UI2Tex display is closing, destroying."

#

Problem is. That closing check is only done when its rendering.
And when its still rendering one frame after closing it, it will re-open

loud flame
#

How should I close it then?
Doing:

private _display = findDisplay "...";
_display closeDisplay 1;
[{ _this closeDisplay 1 }, _display] call CBA_fnc_execNextFrame;

Doesn't log the message you mentioned (yes I have -debug on)

#

Last rpt message about it was just it being created

#

Oh does it need a displayUpdate after closing?

#

Yes it does

#

Though I don't seem to be running into the re-open thing you mentioned. Just the closeDisplay and displayUpdate seems to be doing the trick (without the execNextFrame)

opaque crag
#

Someone should probably put that in the wiki.

loud flame
regal fiber
#

I can't delete the border of an edit input, how to ?

    idc = 38201;
    x = 0.400995 * safezoneW + safezoneX;
    y = 0.3416 * safezoneH + safezoneY;
    h = 0.0272222 * safezoneH;
    w = 0.132917 * safezoneW;
    text = "";
    colorBackground[] = {0,0,0,0};
    colorDisabled[] = {0,0,0,0};
    colorActive[] = {0,0,0,0};
    colorText[] = {0,0,0,1};
    style = 0;
    shadow = 0;
    borderSize = 0;
    sizeEx = 0.025;
    font = "EtelkaMonospaceProBold";
};```
quiet arrow
#

There is a style for it.

strange arrow
#

ST_NO_RECT

regal fiber
#

Tried it beforehand but did nothing, can this be caused by the inherited class?

solid gyro
regal fiber
#

shouldn't it be style=0x0200+0x00; tho ? without the "

solid gyro
#

Just did like in examples

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

class RscTitles
{
    class RscInfoText
    {
        idd = 3100;
        fadein = 0;
        fadeout = 0;
        duration = 1e+011;
        onLoad = "uinamespace setVariable ['BIS_InfoText',_this select 0]";
        onUnLoad = "uinamespace setVariable ['BIS_InfoText', nil]";
        class Controls
        {
            class InfoText
            {
                idc = 3101;
                style = "0x01 + 0x10 + 0x200 + 0x100";
                font = "RobotoCondensedBold";
                x = "(profileNamespace getVariable [""IGUI_GRID_MISSION_X"", (safezoneX + safezoneW - 21 * (GUI_GRID_WAbs / 40))])";
                y = "(profileNamespace getVariable [""IGUI_GRID_MISSION_Y"", (safezoneY + safezoneH - 10.5 * (GUI_GRID_HAbs / 25))])";
                w = "20 * (GUI_GRID_WAbs / 40)";
                h = "5 * ((GUI_GRID_WAbs / 1.2) / 25)";
                colorText[] = {1,1,1,1};
                colorBackground[] = {0,0,0,0};
                text = "";
                lineSpacing = 1;
                sizeEx = 0.045;
                fixedWidth = 1;
                deletable = 0;
                fade = 0;
                access = 0;
                type = 0;
                shadow = 1;
                colorShadow[] = {0,0,0,0.5};
                tooltipColorText[] = {1,1,1,1};
                tooltipColorBox[] = {1,1,1,1};
                tooltipColorShade[] = {0,0,0,0.65};
            };
        };
    };
};
regal fiber
#

Great thanks!

marsh pine
#

Is Cyrillic keyboard input broken in CT_WEBBROWSER?
When I type "ΠΏΡ€ΠΈΠ²Π΅Ρ‚" using the Russian layout, I get "?@825B" instead.

tranquil iron
#

I shall remember to check this tomorrow next week

open gull
#

I use CT_WEBBROWSER and when I try to enter Cyrillic alphabet in the input field, it is broken.

I tried to normalize it using a function that was already thrown in this chat, but nothing changed.

I don't believe that you can't enter Cyrillic characters in CT_WEBBROWSER.

open gull
#

I found out that this is a regular 1024 shift.

For example, here:

#

And here is the same input in Arma 3

marsh pine
open gull
#

It's just terrible...

marsh pine
#

It seems like the best way at the moment.

open gull
#

@tranquil iron

I did a little investigation into this issue and this is what I managed to find out:

The essence of the problem:
When entering Russian characters through text fields in CEF, Arma transmits only the low-order bytes of the UTF-16 representation, permanently losing the high-order bytes.

Technical Details:

  • Russian "ΠΏ" (U+043F = bytes [04, 3F]) comes as byte 63 (lowercase 3F only)
  • Russian "Ρ€" (U+0440 = bytes [04, 40]) comes as byte 64 (lowercase 40 only)
    And so on for all Cyrillic characters

Why English characters work:
English characters "work" randomly because their Unicode code points match ASCII codes:

  • 'a' = U+0061 = bytes [00, 61] β†’ remains 61 = 'a'
  • 'b' = U+0062 = bytes [00, 62] β†’ remains 62 = 'b'

The problem appears only for characters outside the ASCII range (U+007F and higher).

The problem lies somewhere at the junction of CEF and the Arma engine, where this transformation takes place. This seriously limits the possibilities of creating interfaces with text input.

If very roughly, when can we expect fixes in production?

open gull
marsh pine
# open gull And how should deletion, insertion, and other things be handled?

My knowledge of HTML/js isn't great, but it seems to work.
sqf:

createDialog 'testpage';

(uiNamespace getVariable 'testweb') ctrlWebBrowserAction ["OpenDevConsole", ""];

(uiNamespace getVariable 'testweb') ctrlAddEventHandler ["Char", {
    params ["_displayOrControl", "_charCode"];

    (uiNamespace getVariable 'testweb') ctrlWebBrowserAction ["ExecJS", format["insertChar(%1)", [_charCode]]];
}];

js:

<script>
  const input = document.getElementById('i');

    input.addEventListener('beforeinput', e => {
        if (e.inputType === 'insertText' || 
            e.inputType === 'insertCompositionText') {
        e.preventDefault();
        }
    });

    function insertChar(text) {
        text = unicodeArrayToString(text);
        const start = input.selectionStart;
        const end = input.selectionEnd;

        input.value = input.value.slice(0, start) + text + input.value.slice(end);

        const newPos = start + text.length;
        input.selectionStart = input.selectionEnd = newPos;
        input.focus();
    }

    function unicodeArrayToString(unicodeArray) {
        return unicodeArray ? String.fromCharCode(...unicodeArray) : "";
    }

</script>

#

Of course, still need to check the focus and maybe a few other things, but overall it works

open gull
#

But right now it's the best solution possible.

#

I hope this problem will be fixed soon(

#

Even if base64 is received during input, it's better than losing 1 out of two bytes.

marsh pine
open gull
# marsh pine why?

Indeed, inserting text does not suffer from this problem.
raw_bytes:208,191,209,128,208,184,208,178,208,181,209,130
raw: ΠΏΡ€ΠΈΠ²Π΅Ρ‚

open gull
rose wadi
#

Hey! Is someone out there who was able to make an extension to use custom browser instead of the inbuild steam browser ?

strange arrow
#

@rose wadi You mean with CT_WEBBROWSER?

rose wadi
strange arrow
#

Accessing https://www.whatbrowseramiusing.co/ in the Steam Overlay Browser tells me that it is Chrome 126.0.6478.183 (that version was released in July 2024). It seems that the Steam Overlay relies on the Chromium Embedded Framework.

#

I have no idea what Dedmen had to do to embed the embedded Chromium browser from the Steam Overlay into an A3 GUI control ... but it probably wasn't easy πŸ˜…

rose wadi
#

Ah nvm its for ExtensionUi

#

But I guess if we wanna use a own browser we have to use ExtensionUI

rose wadi
#

Or I guess access the render directly with RVExtensionGData ?

tranquil iron
rose wadi
chilly egret
#

In advanced debug console. There is GUI editor for graphical dialog creation. Is there a way I can edit dialogs I created before? I thought I'm supposed copy dialog's code and paste into the GUI editor, but this doesn't work for me.

tranquil iron
#

Quite a chore to create.
I think there might be a webpack tool that can automate it

rose wadi
#

Thank you! I will try it out

young patio
#

Been a while since I've used the editor but I feel like I remember exporting as GUI editor format CTRL + S and importing with CTRL + O being less of a pain because I could keep my classes if I was adjusting them and using preprocessors

chilly egret
#

I thought it's from vanilla, but wasn't sure, so I just called it ADT thing πŸ˜€

#

A was trying to paste it using Ctrl + V, I guess that's what was wrong. Will try Ctrl + O

young patio
# chilly egret A was trying to paste it using `Ctrl + V`, I guess that's what was wrong. Will t...

People like to talk a lot of smack on the UI editor but honestly I kinda like it for initial architecture. It's pretty cool for creating all of the initial controls and positions if you've got a plan for it.

Pro tip though I would advise exporting as both (GUI Editor Format and Config) as GUI Editor Format is easier able to be reimported if you've made changes to the base classes manually (which always happens at some point) πŸ™‚

#

Can't count how many times I've exported as config, made changes with preprocessors and such then had to rework to get it to go back in the editor tweaking_cat

nimble canyon
chilly egret
#

Pressing Ctrl + O causes screen to blink, but it never imports anything. All it does is wiping all elements in GUI editor

young patio
chilly egret
#

Yeah

#

I just found out

#

I was copying entire comment

#

Isn't there a way how to do it only by coding? I mean without a mission restart, like using execVM to open dialog and quickly see the changes?

young patio
# chilly egret Isn't there a way how to do it only by coding? I mean without a mission restart,...

If it's by class I don't believe so. If you're using commands like ctrlCreate you can spawn pretty much whatever UI you want in debug console which allows you to make changes super quick and easily.

Although I tend do a mix of config / ctrlCreate when testing ctrlCreate is definitely way easier. I like for my main UI to be a config and will occasionally use the UI editor for initial architecture. Then use ctrlCreate to dynamically create buttons per whatever array or data I might wanna build off of.

#

Only draw side to ctrlCreate is you don't get near as much ability to customize controls. There are a lot of GUI commands which allow you to do quite a lot ctrlSetText, ctrlSetTextColor, ctrlSetTooltip, etc. Every once in a while tho you'll run into something that doesn't have a command like maxChars. A solution around this is creating a base class for your control with those attributes then using ctrlCreate so you get the best of both worlds.

#

Anyway a whole bunch of yap outside of what you asked but in case it helps yap

chilly egret
#

Absolutely

young patio
#

Does anyone know if there is a method of getting whether the player has confirmed external URLs for CT_WEBBROWSER? I imagine a lot of that is engine to avoid people from setting a variable to say they've confirmed when they haven't haha

#

Essentially just looking to add a loading screen of sorts while that prompt is up

safe helm
#

I am unsure where to ask so I want to completely DISABLE the BIS_fnc_cinemaBorder function when I play missions or campaigns, to disable the black borders during cutscenes. I noticed this is enabled when subtitles are on or off, so it must be a visual mode. How do I disable this globally when the script or mod is running?

distant axle
#

You can replace the function using your own config, FYI

safe helm
#

I tried "BIS_fnc_cinemaBorder = {}" in init.sqf and it kinda worked but the cinemaborders would reoccur. I am replaying the CWR Campaigns right now and it is outdated with modern resolutions and aspect ratios.

distant axle
#

That's not how it works

safe helm
#

Example you can see the blackbars overlay.

distant axle
#

They probably use other methods. It can be

safe helm
#

Should I open the campaign PBO's and do a search for the black bar cinema functions? then replace it with {}?

Rather not mod the campaigns.

distant axle
#

No, that's not what I've suggested. Replace the function file is

safe helm
#

I found it. The campaign is using showCinemaBorder true; it is in multiple sqf files per mission, such as intro.sqf or outro1 or outro2.sqf. How can I disable it via an external script?

distant axle
#

You can't unless you showCinemaBorder false everyframe and call it a day

safe helm
#

OK, so I basically need to notepad++ global search and replace and repack the pbo for my own play?

distant axle
#

Which is not hard

#

I haven't suggested that way, never in this conversation

safe helm
#

Let me review scripting then and come back... I understand what you are saying! πŸ˜„

distant axle
#

But you can yes

sullen lava
#

I have an issue with link not working in main menu
I have

        class SAS_BigButton_1_Overlay: RscActivePicture
        {
            idc=-1;
            color[]={1,1,1,0};
            colorActive[]={1,1,1,1};
            text="sas_menu\data\ts3_ovr.paa";
            tooltip="Connect to Teamspeak";
            x="0.5 - (1.5 *  10) *  (pixelW * pixelGridNoUIScale * 2) -  (2 * pixelW)";
            y="0.95 - ( 10 / 2) *  (pixelH * pixelGridNoUIScale * 2)";
            w="10 *  (pixelW * pixelGridNoUIScale * 2)";
            h="10 *  (pixelH * pixelGridNoUIScale * 2)";
            url="ts3connect://secret_serveraddress?port=10000&channel=Briefing%20Room%20(Rubber%20Room)";
            style=48;
        };

and

class CfgCommands {
    allowedHTMLLoadURIs[] += {
        "https://discord.gg/*",
        "ts3connect://secret_serveraddress?port=10000&channel=Briefing%20Room%20(Rubber%20Room)"
    };
};

I also tried with "ts3connect://*" in allowedHTMLLoadURIs
neither works/gets approved
when replaced with discord link it works
any ideas?

#

Is allowedHTMLLoadExtensions[] = available in CfgCommands, I tried with it as well but it did not help

unkempt cliff
#

is ts3connect supported?

sullen lava
#

Its a custom registry entry that I made, since ts3server is borked

#

It works outside of arma

unkempt cliff
#

ok

#

it could be that only https is allowed

sullen lava
#

I guessed so but some confirmation would be nice

#

or maybe we could get support for other extensions

unkempt cliff
#

nothing in .rpt file?

unkempt cliff
#

well they should add some login :/

lament laurel
#

Can anyone tell me why drawicon3d has a problem with the rotation angle? My camera rotation is set to 0, which means the icon rotation should be correct for all orientations. But at some angles, the rotation breaks.

distant axle
#

Isn't it just sqf getDirVisual _x?

tranquil iron
lament laurel
#

I also added a check to see if there is some object above the enemies, and only then will the icon be displayed.

I wrote this code in 2020. It's like a satellite camera on a tablet. And today I completely optimized it and got rid of a huge amount of useless code. When I looked at this code, I thought I'd chop off my own hands if I sent myself back in time. Back then, I was creating one EH Keydown for each individual action. And these are the least of the terrible things I did back then.

distant axle
#

Ah I mean sqf -getDirVisual _x

sullen lava
safe helm
sullen lava
#
class RscDisplayMain : RscStandardDisplay {
    class ControlsBackground {
        delete Picture;
        class PuoGroup : RscControlsGroupNoScrollbars {
            idc = 213702;
            x = "safeZoneX";
            y = "safeZoneY";
            h = "safeZoneH";
            w = "safeZoneW";
            class Controls {
                class Picture : RscPictureKeepAspect {
                    idc = 1023;
                    text = QPATH(background.jpg);
                    x = "safeZoneX";
                    y = "safeZoneY";
                    h = "safeZoneH";
                    w = "safeZoneW";
                };
            };
        };
    };
    class Controls {
        delete BackgroundSpotlightRight;
        delete BackgroundSpotlightLeft;
        delete BackgroundSpotlight;
        delete Spotlight3;
        delete Spotlight2;
        delete Spotlight1;
        delete SpotlightNext;
        delete SpotlightPrev;
        delete Spotlight;
        delete LogoApex;
        delete Logo;
        delete Footer;
    };
};

I have something like this, but despite using safeZone stuff, my PuoGroup >> Picture control is in the top left corner kinda, why?

distant axle
#

safeZone'ing safeZone'd control is not right

#

Picture should have x 0 y 0

sullen lava
#

thanks, that fixed it

sullen lava
#

Is there a way to adjust volume of a RscVideo?

safe helm
#

on related note. Setting 3840 X 1080 (32:9) CREATES THE LEFT AND RIGHT Boxes. But 3840 x1200 (24:6) stretches the hud so the Left and Right boxes are not there, but the bottom UI strip is no longer centered and stretched to the ends of the screen.

Is this an FOV settings issue and not a screen or GUI background setting?

quiet arrow
#

Have you manually changed the fov value?

safe helm
# quiet arrow Have you manually changed the fov value?

Default settings. I tried to force non stretch but it still keeps the pillar boxes. Only 3640 x 1200 would remove it, but then the ingame gui elements would push the indicators to the edge of the screen. I think it has something to do with the triplehead setting and the gui safe space mixing up.

quiet arrow
#

Yeah. I think these resolutions and ratios are not officially supported

safe helm
# quiet arrow Yeah. I think these resolutions and ratios are not officially supported

I did fruther testing with triplehead=1 and 0 and that was the setting creating the pillar boxes and stretches, or centers the ingame UI. It's either with pillar boxes and centered (set to 1) or stretched and no pillar boxes (set to 0).

DayZ's UI rendering shows no pillar boxes at nonstandard resolutions and keeps the UI indicators centered properly.

Hopefully this might be addressed in a future beta update.

Edit - I forgot we can manually set the indicator elements in ARMA 3 under GAME OPTIONS. Maybe DayZ just has presets for it hence I never noticed.

safe helm
#

Edit - I solved the GUI Indicator Issue. In the screenshot, goto GAMES, then LAYOUT, click on the team menu from the left and slide it to the middle in yellow as shown. It will pull all the LEFT and RIGHT elements TOWARDS the center of whatever widescreen resolution you have. Leave the triplehead settings to 0 (zero) to not have pillar boxes.

lofty solar
#

Working on an addon to integrate with Simplex Support Services and AI Decelerates, not climbs. In addition to trying to solve the problem of AI flight in Arma 3 that these two mods tackle, my plan is to create synchronized flight plans, to allow coordinated CAS, Transport, and Logistics of multiple air assets with go codes, Zulu Clock conditions, to allow for advanced coordinated Flight Planning for those that love to get the most out of the AI, and focus more on just being a grunt. Its a big WIP but I'm enjoying the Flight Planner so far.

loud flame
#

UI looks pretty nice, I like the vibe

young patio
#

Definitely nail the color schema

lofty solar
#

Did another pass.

idle spruce
#

so this is the UI designer that my gf told me not to worry about

lofty solar
#

Another little sneak peak.

Toggleable Waypoint Info.

quiet arrow
#

Really nice. Do you have a real life reference?

gleaming crater
#

does anyone have recommendations on how to create guis without having to restart arma every time I want to make a change?
(I am making an addon)

opaque crag
#

Either build most of it in a mission first, or use diag_mergeConfigFile with the diagnostic exe.

normal hatch
plucky totem
#

what is the the path to this delete icon

quiet arrow
#

Check in display3den. The path is in the button control.

placid hare
lofty solar
plucky totem
plucky totem
#

after much pain and suffering

#

This lets you save and load objects to their absolute position (something that normal comps don't do) which means you can edit one part at a time and not have all the objects in the mission while editing. Good if your mission has over 10k objects

gleaming crater
#

quick question, is there a way to change the size of a picture inside of a ctrlToolboxPictureKeepAspect?
I tried using sizeEx and looking around in the biki but haven't found a solution..

quiet arrow
#

No. You need to increase the size of the control, or reduce the column or row count to increase the space each picture has.

#

If you want the picture to fill the area of the cell it's in you need to adjust the texture size to fit the cell size.

plucky totem
#

I am redesigning the UI right now and I can't seem to get this text to work properly, the other text are just placeholders right now

valid nebula
plucky totem
plucky totem
#

I fixed the issue, the problem was the IDC

#

why not

quiet arrow
#

because main menu is a compatibility nightmare

opaque crag
#

(two mods edit same menu, shit falls apart)

plucky totem
#

I am deleting the menus and making completely custom ones

lofty solar
gleaming crater
#

does someone have suggestions or code example of how would you make a tooltip with an image and some text? specifically inside a listnbox
the goal is to have something like when u hover the vehicles in zeus tree and you see the preview picture, and if possible add some text the bottom / top

loud flame
#

Make sure to read the note on lbSetToolTip setting the tooltip for the whole column by default, you can change that though

gleaming crater
#

don't think you get what I meant.
I want there to be text in the column, but when hovering I want a "tooltip" that will be a picture and some text.
I know that lnbSetPicture is used to change the picture inside the column and not in the tooltip.
also iirc lnbSetTooltip is just for text
just like in zeus unit tree..

loud flame
#

Ah, then no. You can't have an image in the tooltip

#

Hm actually you could try structured text

gleaming crater
#

is there a mouse over event? anything like that?

gleaming crater
young patio
quiet arrow
#

It is the correct way. Sadly there is now event that return the selected path as it does for tree view.

gleaming crater
gleaming crater
#

but wouldn't it change the text inside the listnbox row?

young patio
#

Unfortunately yes if you already have text assigned to that control

#

Both can exist though if you're wanting it side by something

gleaming crater
#

yeah I do, but then how do I know when the mouse is hovering over it?

#

it will only be set to the image and not the text

young patio
#

Are you wanting the image in the tooltip or the list box?

gleaming crater
#

in the tooltip. see zeus hover inside the tree of vehicles for reference, that's exactly what I want only in the listnbox

#

like this

minor basalt
#

How to shoot 9k11 on bmp1 rhs mod cuz when i shoot the atgm it just go straight to the sky and not follow my guide at all

#

Literally just go straight forward

young patio
# gleaming crater like this

Sorry I am still confused. Are you wanting something to pop up when you hover over the picture in the tooltip or something?

#

If you set the picture with ctrlSetStructuredText it'll all still be apart of the same control

gleaming crater
#

I want to it be like in the picture I sent, when I hover over an item in the listnbox, a picture would show up containing in image (and if possible also some text).
The picture will be seperate (i.e like a tooltip, which is seperate from the text inside the actual row) and will appear / disappear when hovering (just like in zeus)

#

imagine if a tooltip could contain an image and not just plain text..

young patio
#

If I am understanding correctly then (which I may not since it is late my time) then ctrlSetStructuredText should work for that as the tooltip should just be a control. Take for example:

_ctrl ctrlSetStructuredText parseText (format ["<t size='2.5' valign='middle' align='center'><img image='images\icon.paa'/></t>"]);

If you need to have text you should be able to add it in the format along with it although it can be a little finicky.

gleaming crater
#

I will try, thank you for the help!

gleaming crater
young patio
#

Oddly enough I am trying onMouseMoving now to see if I could get you a more specific use example and appears it doesn't even wanna work for me. Currently running:

(findDisplay 49) displayAddEventHandler ["onMouseMoving", {
    hintSilent str _this;
}];

Which throws:

2:35:55 Error in expression <(findDisplay 46) displayAddEventHandler ["onMouseMoving",>
2:35:55   Error position: <displayAddEventHandler ["onMouseMoving",>
2:35:55   Error Foreign error: Unknown enum value: "onMouseMoving"

Not quite sure what I am doing wrong here. Unknown enum would lead me to believe I am using the wrong command and that I should be swapping displayAddEventHandler with something else but not sure what that would be.

distant axle
#

Remove on

young patio
#

Hahaha thank you!!

#

I felt like I was losing my mind

gleaming crater
#

I am trying it now and I can get pretty accurate I think

distant axle
young patio
#

Oh good lord

#

That's on me, noob mistake

#

Oh bro

#

Hahahaha it's pinned at the bottom of the page as you scroll too

gleaming crater
#

@distant axle do you know by any chance what is _mouseOver in onMouseMoving?

distant axle
#

What?

gleaming crater
distant axle
#

It is true when the mouse is on the control, false when the mouse just left the control

gleaming crater
#

oh so it's like onTreeMouseExit if I understand correctly?

distant axle
#

Well... maybe yes. I don't really understand what do you actually think or talk about

#

You can anyways check what are these return values by using something like systemChat str _this in the EH

gleaming crater
#

yeah of course just didn't know that the true is referring to πŸ˜…
just trying to figure out a way to know when the mouse is leaving the control, but now I see that it isn't firing on exit so it's never false..

gleaming crater
#

@young patio if you're curious, I managed to calculate which row is hovered on the listnbox

GVAR(cargoHoveredRow) = 0;

_ctrlList ctrlAddEventHandler ["MouseMoving", {
    params ["_ctrlList", "_xPos", "_yPos", "_mouseOver"];

    private _ctrlConfig = configFile >> ctrlClassName _ctrlList; 
    private _ctrlOffset = getNumber(_ctrlConfig >> "y");
    private _rowHeight = getNumber(_ctrlConfig >> "rowHeight");
    private _ctrlMaxDisplayedRows = getNumber(_ctrlConfig >> "h") / POS_H(1);
    private _selectedRow = ceil ((_yPos - _ctrlOffset) / _rowHeight);
    GVAR(cargoHoveredRow) = _selectedRow min _ctrlMaxDisplayedRows;
}];

GVAR(cargoRowOffset) = 0;

_ctrlList ctrlAddEventHandler ["MouseZChanged", {
    params ["_ctrlList", "_scroll"];

    GVAR(cargoRowOffset) = (GVAR(cargoRowOffset) - (_scroll / 1.2) + 1) max 0;
}];
gleaming crater
#

is there a way to get the position of a scrollbar? or know when it changes?
I tried to use sliderPosition and onSliderPosChanged but they aren't working for me..

young patio
#

I've used sliderPosition before and it's worked for me, are you sure you're using the correct control? Are you sure it is a CT_SLIDER or CT_XSLIDER?

lament laurel
#

What is the path to this image? I can't find it in data_f

#

nvm i find this
a3\data_f\images\mod_base_logo_ca.paa

novel scroll
#
class MiniFlag: RscPicture
        {
            idc = 5108;
            style = 48;
            fade = 0;
            colorBackground[] = {1, 1, 1, 1};
            text = "flag_round.paa";
            x = safezoneX + safezoneW * 0.262;
            y = safezoneY + safezoneH * 0.162;
            w = safezoneW * 0.5;
            h = safezoneH * 0.5;
        };
#

Im trying to put a a picture in however it always comes out as faded/almost transparent regardless of the actual .paa present

#

played around with multiple different parameters and no change, includng different .paa textures

distant axle
#
  1. In Public Branch, cached files will not be reloaded automatically whenever you change the file. Try FLUSH or SUPERFLUSH cheat code to force refresh
  2. Which resolution the PAA has
  3. A PAA should have _CO or _CA or any other acceptable suffix before you convert to PAA
novel scroll
#

im not sure if you can make out the faint american flag circle but for the last 2 hours i thought it wasn't working until i made it super large

distant axle
#

Read and do 1

novel scroll
#

No change

distant axle
#

Then restart game

novel scroll
#

No change still

distant axle
#

Then you sure you can use an existed PAA in vanilla PBO in that context

opaque crag
#

ours has:

    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,1};
novel scroll
#

well vanilla works... i guess source .paa must be the issue then?

distant axle
#

Yes

young patio
#

When using CT_WEBBROWSER does anyone know if there is a way I can have it as a cutRsc and still allow users keys like up and down arrow to interact with the page?

loud flame
young patio
errant orbit
#

Hello, please help. Some time ago, I added a button with a URL parameter that opened a link in the system browser, but recently I was informed that the buttons are not working. I cannot understand what has changed.

round ore
unkempt cliff
errant orbit
unkempt cliff
#

remember to reload your changes, test with simple urls

errant orbit
unkempt cliff
#

note that the case matters (i think)

round ore
errant orbit
#

Here's what I enter into the mod config.

class CfgCommands
{
allowedHTMLLoadURIs[] +=
{
"docs.google.com",
"drive.google.com",

    "www.youtube.com",
    "youtube.com",
    "youtu.be",

    "discord.com",
    "discordapp.com"
};

};

rose wadi
#

the console is not showing any error

tranquil iron
tranquil iron
# rose wadi

I suppose that second file is the html? If not then full example please, I'll check in 50 minutas

#

But you having the font files separately sounds wrong, they should be embedded. But maybe you're loading with JavaScript. I'll find out when I see it

rose wadi
tranquil iron
# rose wadi

url('crayonhandregular2016demo.woff2')
Yeah no it cannot load URL's like that. And is also not at all like I showed how to do in my working sample.

Only way to load files is via the Javascript API.

#

Which you can do

#

You can read it via Javascript, and then later inject the style tag into the header.

tranquil iron
tranquil iron
tranquil iron
plucky totem
plucky totem
tranquil iron
#

One of them you will notice the preview will move far away from your mouse cursor, thats the one.
There is another one that only changes something about height

quiet arrow
#

It's the two toggleable buttons in eden editor

#

Snap to surface, align with terrain.

plucky totem
plucky totem
tranquil iron
#

I'm looking it up..

quiet arrow
#

Paste to original position?

tranquil iron
#

yes

quiet arrow
#

Ctrl shift v

#

At least that's what I thinkπŸ˜…

tranquil iron
#

I know in Zeus its a modifier key. Maybe in Eden its different.

#

The Composition is just a exported copy-paste. And that contains the original position of everything

plucky totem
quiet arrow
#

I see..no I am not aware that eden editor can do that for compositions

tranquil iron
#

Zeus can do it with Eden compositions though notlikemeowcry
Why would Eden not do that

quiet arrow
#

Makes sense for Zeus to fill predefined positions on the fly.

#

Give us a command to read composition data file into eden editor and I add it πŸ˜„

tranquil iron
#

In zeus its the same key as the one that makes the moving things up/down.

#

Also create3DENComposition script command cannot do it either? It errors when you don't give position.

Also that can only paste mod compositions, not steam or local ones? notlikemeowcry

quiet arrow
#

Yeah it's messy.

tranquil iron
#

I remember I did something recently to make something creatable in Eden, I think comments?
But I thought there was more also related to compositions

quiet arrow
#

Animals iirc

tranquil iron
#

I guess its not a thing then.
create3DENComposition is also hard to do because, I don't think you can get a list of possible compositions, besides trying to read the listbox from the UI?

quiet arrow
#

Right.

tranquil iron
#

Zeus composition placement is better than in Eden, that seems ridiculous.

quiet arrow
#

One would think eden editor would use the same code

tranquil iron
#

Ugh I hate this.
Can i get a FT ticket feature request?

I'd think a modifier key like in Zeus would be useful, probably ALT, for alternative placement? πŸ˜„

And I need to do something with create3DENComposition command to let you create local compositions too. Probably for now just let you parse the treeview, its all in the data there I think.

quiet arrow
#

Are you sure it's in the tree view data? I remember some entries have data there but I don't remember compositions do

tranquil iron
#

The "value" in the item is an enum. And is 2 for steam composition. 1 for local.
The "data" is a string of the composition folder name

It decides between steam or local, and usees the foldername to decide which it is. I probably did something hacky for the foldername in steam.

But there is nothing blocking from just passing the foldername (and probably whether its steam or local) to create3DENComposition.
And then make the pos optional and read it from the composition like zeus does

#

I just don't have time to do it this week, or next.
And we can safely put this on prof branch whenever

quiet arrow
#

Right. That makes sense.

#

So you need a ticket for changing create3dencompososition command now? Anything else?

#

The shortcut, right?

tranquil iron
#

shortcut can be in same ticket yes

quiet arrow
rose wadi
#

bun run b64.ts fontName.woff2

tranquil iron
plucky totem
#

I had multiple missions, but that wasn't super easy to keep track of

tranquil iron
#

You can make multiple folders in your mission list.
Does deformer work fine when in compositions? Never tried that. Its just a module so I guess..

plucky totem
#

It also saves the scale of the objects which is something I use a lot

daring lava
#

Really trying to find a setting or mod that removes the "box" that is behind the soldier icon here.

hoary estuary
lofty solar
#

Some systems that I'm working on that are powered by AI integrations.

magic knoll
#

Hiii everyone , Does anyone know how to have this Flight Path Marker in the HUD while controlling a fixed wing drone ( like MQ-4A ) in the game?

distant axle
#

Config wise or script wise?

magic knoll
distant axle
#
class MFD
{
    class B_Plane_Fighter_01_static_HUD
    {
        class Draw
        {
            class PlaneMovementCrosshair
            {
                type = "line";
                width = 3.0;
                points[] = {{"Velocity",{0,-0.02},1},{"Velocity",{0.01,-0.01732},1},{"Velocity",{0.01732,-0.01},1},{"Velocity",{0.02,0},1},{"Velocity",{0.01732,0.01},1},{"Velocity",{0.01,0.01732},1},{"Velocity",{0,0.02},1},{"Velocity",{-0.01,0.01732},1},{"Velocity",{-0.01732,0.01},1},{"Velocity",{-0.02,0},1},{"Velocity",{-0.01732,-0.01},1},{"Velocity",{-0.01,-0.01732},1},{"Velocity",{0,-0.02},1},{},{"Velocity",{0.04,0},1},{"Velocity",{0.02,0},1},{},{"Velocity",{-0.04,0},1},{"Velocity",{-0.02,0},1},{},{"Velocity",{0,-0.04},1},{"Velocity",{0,-0.02},1}};
            };
        };
    };
};```Something like this in Black Wasp II config
dark tulip
#

There must be a way to freakin make html acknowledge arma video in order to apply css to it. Im trying to do blur

obsidian hedge
#

Hi there, I've been here before and must've left during a Discord clean-up.

I've looked into GUI editing over the years and have never really experienced that moment where it's all "clicked" so it's always felt like I'm hacking things together rather than competently designing a UI. Back in 2022 I was using GUI_GRID with a GUI that didn't really scale well at different aspect ratios. I'm using 21:10 while most people I play with are on 16:9

I know there are several tutorials and introductory documents on the BI wiki that explain the different coordinate systems, though many of these assume prior knowledge. At the moment I'm looking to create a simple layout consisting of two panels on the left and right sides of the screen. These should scale based on aspect ratio. The tutorials on the BI wiki all focus on the center of the screen

Are there any more comprehensive tutorials out there that people have used when starting with GUI editing? More importantly, how do people keep track of their GUIs for making future changes to? The GUI Editor seems a bit clunky for things like this.

unkempt cliff
obsidian hedge
#

Yeah that's one of the pages I've found as part of the wider set of tutorial pages

Why pages like that and the GUI editor are a bit rough around the edges is because of quotes like

The Grid

The position of your UI is determined by screen coordinates. The default grid that is selected in the GUI Editor does not work...

I'm not sure I understand the point of defaulting to a grid that doesn't work, unless that's simply a poorly phrased quote.

When I was creating a GUI back on 2022 I simply ignored the white grid zone and moved the controls outside of that. Even doing that now and setting the controls to safezone, they seem to scale. Is the white grid just for a preview then?

quiet arrow
#

You can only use that editor if you understand the different grids

#

Otherwise it won't work correctly.

#

I'd recommend eden editor grid. E.g. grid_w and grid_h. Make sure to attach X and y properties to the border of the screen e.g. safeZoneX/Y

#

The white grid is for UI_GRID. All controls within that area will always be visible on most aspect ratios, UI scales and resolutions.

unkempt cliff
#

the grids you see are just there to help you position your GUI

quiet arrow
#

Since you have a basic idea for your UI layout. I'd just start with that, we can help you later implementing the GRIDs and safeZones.

#

Just don't use the UI Editor please.

obsidian hedge
#

Thanks for that, I'll reference those for examples.

I'm assuming the Eden grid is the newer pixel grid?

quiet arrow
#

exactly

obsidian hedge
#

Some of it is starting to come back to me. Pixel grid is certainly much easier to work with once it's anchored - that was the part I was missing some years back.

In terms of the designer experience, do you simply go through a case of trial and error with UI changes until you've implemented your specification?

quiet arrow
#

Yeah it's quite a bit of trial an error.

obsidian hedge
#

As good a reason as any to load up on coffee. Thanks for the guidance both, I appreciate it.

To provide an answer for anybody else that stumbles across these messages, I've pulled the following example which is very straightforward: https://community.bistudio.com/wiki/Arma_3:_GUI_Coordinates#Examples

Given my requirements are very basic, that example is good enough for creating some panels on the left and right

dark tulip
#

Idk if its possible to make html acknowledge the game render, I guess it is but it will take a lot of performance right?

tranquil iron
#

Yeah no the HTML cannot see whats behind it

dark tulip
#

Damn, I wanted to make a cool glassmorphism UI

#

Theres no plausible way of adding it without sacrificing performance right?

#

I guess it could be some kind of present hook but I dont really want to have extensions on client anymore

obsidian hedge
quiet arrow
#

Sounds great πŸ‘

proud frigate
#

Is there a way to force the expansion direction of a combo box control (up/down)?

quiet arrow
#

Nope

proud frigate
#

Unfortunate

quiet arrow
#

Time to write your own solutionπŸ˜„

daring lava
#

How in the world do I get started with modding the GUI in game? Looked stuff up but still very lost.

I'd want to make changes to stance indicator.

distant axle
#

Depends, like, depends
What exactly are you trying to achieve

#

That is not where usual modders took a look and make change

distant axle
#

Box as in, the gradient?

daring lava
#

Yeah

#

I have a custom layout where that gradient looks really bad, and I'd like to remove it.

daring lava
round ore
daring lava
#

Thanks. I'll read through this.

Learning to Mod Arma 3 is quite archaic compared to reforger, so thanks for the info.

midnight flume
#

lol could you just say older: lol πŸ™‚

obsidian hedge
#

Is it possible to add a background to an RscControlsGroup by adding an RscText control to the RscControlsGroup->controls class?

I can display RscCombo and RscListNBox within the RscControlsGroup but RscText will only appear if it's outside of the group. The reason why I'm trying to put everything in one group is because I plan to create animations to show/hide the group

The following has some macros in use but should hopefully show that relative positioning is being used on the children controls

class LeftPanel : RscControlsGroup
{
    idc = BUILD_PANEL_LEFT;
    x = PANEL_X;
    y = HEADER_Y + HEADER_HEIGHT;
    w = PANEL_W;
    h = PANEL_H - HEADER_HEIGHT;

    class controls {
        class Background : RscText
        {
            x = 0;
            y = 0;
            w = PANEL_W;
            h = PANEL_H - HEADER_HEIGHT;
            colorBackground[] = {0,0,0,0.4};
        };
        // class BuildMenuType : RscCombo
        // {
        //     idc = BUILD_CATEGORY_IDC;
        //     x = 0;
        //     y = 0;
        //     w = PANEL_W;
        //     h = COMBO_HEIGHT;
        // };

        // class BuildItemsList : RscListNBox
        // {
        //     idc = BUILD_LIST_IDC;
        //     y = BUILD_LIST_Y;
        //     w = PANEL_W;
        //     h = BUILD_LIST_H;
        //     columns[] = {0, 0.65, 0.75, 0.85};
        // };
    }
};
quiet arrow
#

RscText just works in CCs like any other control

obsidian hedge
#

That's interesting, thanks for confirming. I'll approach it with a fresh pair of eyes today as I suspect my positioning is off

obsidian hedge
#

Rather confusingly, I've pinpointed the issue down to an RscListNBox in a separate panel which I have yet to find a workaround for.

In my UI I have two panels that are represented by RscControlsGroupNoScrollbars, one for the left side of the screen and another on the right. Neither control group overlaps.

Both panels have RscText that span the width and height of the parent control group, both with relative X/Y values of 0 and both have a colorBackground of {1, 0, 0, 0.4}. Both control groups also have RscListNBox components that span the width and height of the parent control group - relative X/Y being 0.

The RscText background appears in the right panel but not the left. If I comment out the RscListNBox component from the right panel, but leave existing the RscListNBox in the left panel, the RscText background then appears in both panels.

strange arrow
#

Could be an issue with IDCs. Sometimes things break when two controls have the same IDC (e.g. -1), and for some controls, certain IDCs are special.

#

In fact, https://community.bistudio.com/wiki/CT_LISTNBOX warns:

CT_LISTNBOX controls frequently cause unexpected issues with other controls if idcLeft and idcRight are set to -1. Use other values for idcLeft and idcRight to avoid these issues.

obsidian hedge
#

I thought idcLeft and idcRight were for controls contained within the same ListNBox, specially in the first and last columns of each row. I have now tried defining some values for both properties but it seems that the ListNBox in the right most panel draws over RscText controls defined in the left panel

strange arrow
obsidian hedge
#

That sounds about right. Good to hear I'm not going crazy with positional maths

The only difference I've found is that ListNBox draws over controls defined before or after the ListNBox.

I also moved the backgrounds to controlsBackground but am trying to find a way around the issue nonetheless as it also causes problems for any other controls that I may wish to add

#

It might be a case where I swap the right-most ListNBox out for another design

#

Ah, I see what's happening now.

If the value of idcLeft matches the IDC of another control to the left then it hides that control, even if it's outside of the ListNBox and control group. Seems like a bug with ListNBox

The solution then is exactly as you and R3vo previously described. I've set idcLeft and idcRight to 999 and all is well now. Thanks both

quiet arrow
#

That issue again. You are not the first victim and won't be the last.

obsidian hedge
#

I'm certainly not going to win any designer awards and this is almost identical to the Zeus Curator dialog with both panels being collapsible. Pretty much there now with this dialog. It was a nice little experience playing around with Arma 3's newer pixelGrid system. Macros make things much easier as everything begins to behave more relative to the previous control

The last thing I need to do is pin the width of the items to the safeZone system so it scales proportionally with aspect ratios.

lament laurel
#

Pixelgrid has an issue where it sometimes incorrectly distributes the screen width and height based on the game window size because it uses the monitor size rather than the game window size. Most of the times, players have noticed the interface extending beyond the game window. This issue only occurs on monitors larger than a standard Full HD display. I've asked players to set the game window resolution to 1920x1080, and their interface has been fixed with pixelgrid. Alternatively, try testing the interface in windowed mode with non-standard resolutions smaller than 1920x1080. I've never encountered such issues with Safezone.

opaque crag
#

That's a misunderstanding. pixelGrid doesn't replace safezone and you should use safezone to anchor it.

obsidian hedge
#

I've anchored the X and Y to safeZone with pixel grid used for height and width. My main display is a 21:10 ultrawide but I've also tested the UI on my MacBook. The only issue I've experienced on smaller displays is that the panel widths are larger because I'm not scaling the width correctly yet.

Otherwise, I've not experienced that same issue at all where controls extend over the screen space

quiet arrow
#

Use the grid macros from eden editor and combine them with safeZones and you are 90% there

opaque crag
#

pixelgrid just picks a value which is a multiple of 4 and splits the screen into very roughly 64 units vertically. In some resolutions there are more pixel grids within the safezone than others.

obsidian hedge
#

Hopefully that helps with an example on how to address that issue

quiet arrow
#

Yeah. Good example..also.limiting the total height which is important

obsidian hedge
#

Exactly. When I last did UIs a few years ago I used the ⁨GUI_GRID⁩ system with absolute sizes. That worked fine for me with my aspect ratio but it didn't scale well at all for anybody else

lament laurel
#

What's funny is that I realized this after I'd designed over 10 interfaces with a huge number of controls. Ultimately, I had to abandon the idea of ​​figuring out how to properly assign positions and sizes so that the interface would look consistent for all players. (Also, I sometimes used pixelgridnouiscale.)

quiet arrow
#

You can anchor it to the center..but you need to be aware that the number of available grids can change. You can calculate the available grids first and then make sure to never exceed that.

proud frigate
#

for ctrlSetScrollValues, with vertical scrollbars, is 1 all the way up or all the way down?

quiet arrow
#

Should be all the way down.

hidden zealot
#

Hi, can someone tell me how to use and display your images in CT_WEBBROWSER? I tried using RscPicture, A3API.RequestTexture, but it turns out to display only images that are already in Arma, but I would like to have my own

tranquil iron
hidden zealot
tranquil iron
#

No it'll also load images from the mission

#

You might need getMissionPath script command to get full path, but afaik even that isn't needed

hidden zealot
#

With getMissionPath, the problem occurs when non-Latin characters appear in the user's path.

hidden zealot
#

And as I understand it, CT_WEBBROWSER does not work at all with non-Latin letters, for example, the input form does not support Cyrillic.

distant axle
#

Just actually in case, is it about forceUnicode SQF?

tranquil iron
#

You should be able to load by just literally the filename in the mission folder

#

If you can give me a repro mission I can check what the problem is

lofty solar
#

Hoping to be able to show this off soon. Custom Flight System based on interpolation bezier curves and with time and smoothing filters based on model data for cruise speeds, banking, pitch angles, a lot of shit to try and model realistic flight from bezier per frame updates... What this means is, 1. Helicopters will fly the exact path you see on the Flight Planner, (it uses the same bezier logic to draw the 2D flight path. You will be able to click drag waypoints to adjust the waypoints and see exactly where your aircraft will go. It will also automatically create flight paths for wingmen, based on formation settings per waypoints. I've got a working test on our trail formation and will hopefully have a video done soon, but I'm pretty proud of how the UI is coming along. Basically I told myself, if I wanted to recreate the Maduro Raid, in single player, I want to be able to do that - and the Flight Planner system is my way of coordinating multiple squadrons, AI flight pathing, in a way that the base vanilla physics based system just doesn't do or have the capability to do. Anyway, hopefully my up since 1AM brain made that make sense.

quiet arrow
#

Looks awesome. Messing with bezier curves is kinda fun. I wrote some stuff for it a while ago.

lofty solar
#

Thank you, will hopefully have a video of what this looks like when executed up in the next few days.

sullen eagle
#

In the squad commands menu there is a command for a unit to get into a specific vehicle.
It there a way to dynamically change the name of those vehicles showed in that menu?

untold notch
#

I'm trying to make an effect where a full-screen image appears. When using rscpicture, the picture is translucent and not visible. How can I make a similar effect and what should I use to position my image so that it retains its color and transparency?

thorny agate
#

Hey guys.

So I have an RscMapControl that constantly keeps crashing the game despite my best efforts to adhere to the "specialness" of said control.

It lives in the top level hierarchy of the dialog, isn't embedded into any controls group and once for debugging purposes is even positioned well outside the dialog.

It will reliably crash the game, though, if it loses focus. I can move the map around, zoom it and give it orders via ctrlMapAnimAdd. When I click outside the map control, game stays alive when focus is caught by another control (e.g. a CT_BUTTON); clicking an empty area, however, kills the game with

Exception code: C0000094 INT_DIVIDE_BY_ZERO at 8732CE77
cpu: AMD Ryzen 7 7700X 8-Core Processor
graphics: D3D11, Device: NVIDIA GeForce RTX 4070
resolution: 3840x2160x32

< lots of base64 >

Mods: 463939057;450814997;3020755032;1779063631;.hemttout/dev;rf;aow;enoch;tank;tacops;orange;argo;jets;expansion;mark;heli;kart;curator;A3
Version 2.20.152984
Fault time: 2026/02/11 10:35:24
Fault address: 8732CE77 01:0142BE77ll G:\SteamLibrary\steamapps\common\Arma 3\arma3_x64.exe
file: a3uspcm
world: malden
Prev. code bytes: 48 8B 06 48 8B CE 8B 9E B8 03 00 00 FF 50 58 99
Fault code bytes: F7 FB 3B E8 0F 8D 07 03 00 00 44 8B 86 B8 03 00

Dialog config here: https://gitlab.perfect-co.de/arma3/a3uspcm/-/blob/feature/aafc-granular-roe/addons/aafc/RscDialog.hpp?ref_type=heads

Interestingly enough - but something that'd need fixing after the main concern - I can't seem to give it another idc, either. If I stick to the base class' idc = 51, I get a result from displayCtrl. If I use my numbering, or even - in the config above - reassign idc to 51, displayCtrl returns controlNull...

quiet arrow
#

In any case it shouldn't crash. Have you uploaded the crash via the crash reporter?

thorny agate
#

Nope, that doesn't even open.

#

I can upload the mdmp here, if that helps.

young patio
#

I'll say INT_DIVIDE_BY_ZERO is interesting- never seen that before. Assuming it's just as it says but meowsweats

thorny agate
#

I can message Dedmen directly?

πŸ₯Ί
πŸ‘‰ πŸ‘ˆ

young patio
# thorny agate I can message Dedmen directly? πŸ₯Ί πŸ‘‰ πŸ‘ˆ

Yeah for stuff like that he leaves his DMs open- he's helped us before when we've been in hot water with bad crashes πŸ™‚

No idea if there's anything personally identifying in memory dumps but definitely would era towards sending it to him directly then channel to be safe. He's usually got a backlog of people tho so may take a bit to get a response catnod

tranquil iron
#

Version 2.20.152984
You are not

#

Probably already been fixed

tranquil iron
spice drift
#

Is there some way to get the specific object (i.e. backpack) from the inventory listbox? lbText seems to just return the classname as opposed to the actual object/container?

tranquil iron
#

Not from the UI no

#

if you know where it is, you might be able to find it with the other inventory commands

spice drift
#

Ah I see, unfortunately the goal was to change the name of the backpack during play depending on a variable assigned to the backpack itself.

#

But doesn't sound like that is possible(?) then... Unfortunate, thank you anyways, Dedmen, appreciated.

silk lodge
#

Hey guys, so I've done UI in Arma before but I'm looking for the best way to place UI elements for a HUD, that wont break/have miss alignment when changing screen size or resolutions, any ideas?

#

Currently ive been using safezone, below is an example, this is inside a ctrlGroup

                    class AmmoCountBar : RscProgress
                    {
                        idc = IDC_WeaponInfo_AmmoCountBar;
                        x = 0.03665 * (safeZoneX + safeZoneW);
                        y = 0.044 * (safeZoneY + safeZoneH);
                        w = 0.008 * safeZoneW;
                        h = 0.063 * safeZoneH;
                        style = 1;
                        colorBar[] = {1,1,1,1};
                        //text = "#(argb,8,8,3)color(1,1,1,1)";
                    };
drifting sedge
# silk lodge Currently ive been using safezone, below is an example, this is inside a ctrlGro...

try these macros:

#define RSC_POS_X(N) (safeZoneX + safeZoneW * ((N) * 0.01))
#define RSC_POS_Y(N) (safeZoneY + safeZoneH * ((N) * 0.01))
#define RSC_POS_W(N) ((((safeZoneW / safeZoneH) * safeZoneH) * ((N) * 0.01)) + 0.00015)
#define RSC_POS_H(N) ((((safeZoneH / safeZoneW) * safeZoneW) * ((N) * 0.01)) + 0.00015)
#define RSC_POS_H_SQUARE(N) (((((safeZoneH / safeZoneW) * safeZoneW) * (safeZoneW / safeZoneH) * safeZoneW / safeZoneH) * ((N) * 0.01)) + 0.00015)

I put these together having the same frustrations as you - these are normalized from 0 to 100; 100 being bottom/right, 0 being top/left - works with different resolutions

#

so just imagine a 0-100 grid on your screen

#

(that jank 0.00015 at the end was due to single-pixel issues caused by certain aspect ratios, incase you make something that's 100 100 size to cover the whole screen, dont question it lol)

#

RSC_POS_H_SQUARE wont care for aspect ratio btw, so if you want a control not to be stretched you can use that

silk lodge
# drifting sedge so just imagine a 0-100 grid on your screen

perfect thank you! This is similar to what I was looking at building but I was reviewing how everyone else does it first.

The reason was I had a UI built on my laptop screen. Changed to a monitor and it moved a few things slightly. Changed back to the laptop screen and they were still miss aligned! I have no idea why as I dident update the UI. Ill try these out thanks!

drifting sedge
#

these technically derive from vanilla macros that did the same thing (or maybe it was ace i cant recall) but i just made them normalized and made the width/height easier to control

drifting sedge
silk lodge
drifting sedge
#

exactly

silk lodge
#

Thank you, UI has always been my downside with coding πŸ™‚ (mainly UI scaling so this is so useful)

drifting sedge
drifting sedge
#

this brings me back when i was so annoyed that the safezones appear so arbitrary in arma

#

defining 0 as top left and 100 as bottom right seems so simple yet... apparently not

silk lodge
#

but as you said the numbers are so ugh. So normalizing them like this is perfect

silk lodge
drifting sedge
silk lodge
drifting sedge
silk lodge
drifting sedge
drifting sedge
silk lodge
drifting sedge
#

ah, fair

silk lodge
#

ctrlGroups X and Y co-ord is now 0,0 for any UI elements inside of it.

#

so it cant just be made and copied into a ctrlGroup either

drifting sedge
#

i suppose you just have to imagine the edges are the corners of the control group instead of the screen but true it's a little annoying

silk lodge
#

well thanks for all your help ill give that function a go as ive got 1000 lines of UI to convert lol

silk lodge
drifting sedge
#

yeah; test it with one element just to get the idea first before changing everything ( granted its a simple concept but going away from the traditional way arma's UI is set up might be throwing off) πŸ˜„

drifting sedge
#

cheers!

#

@silk lodge also just a forewarning i dont know how this will act with control groups... i'd actually appreciate it if you got back to me about that incase there are issues (technically the W and H shouldn't care but still)

#

the ui stuff i did was orphan controls so

silk lodge
#

you base it all off the ratios etc you normally do. its just in a box that limits it if it goes out the set bounds.

#

but ill let you know how it goes after changing all my code around. Found an issue in the conversion script so once ive finished testing it ill send it back to you with a fix or two

drifting sedge
#

ah, okay fair; i thought it added extra math on top like scaling also being relative to the scale of the control group or some insane crap lol

silk lodge
drifting sedge
silk lodge
# drifting sedge ah, that's great, thanks πŸ˜„

Modified, ive tested it a bit but could use some more. I haven't converted my UI over yet.

Two fixes were just to the calculation of the H output for square or not square. Ofc if its square it ignores the H input because it needs to use the W input to find the squre like your original defines πŸ™‚

Thanks for the help again. The modifications to the function has only been tested on 16:9 currently.

To be honest im not sure what happening with my UI but its all still pretty much aligned just a few elements have moved like all of 5 pixels to the left lol. After resetting there position the current way im doing it and then testing on my two screens nothing moves anymore so im not sure what it was sadly πŸ™

silk lodge
#

Playing around with this more it doesn't work for my use case sadly. I am making a HUD for helmet where all UI elements need to stay at the edge of the screen to not block the vision of the user. And because safezone scales with Interface size, on smaller/larger UI scales it will move the positons around too much.

I looked into aces arsenal positioning and they do some clever stuff where they mix safezone and absolute grids to make sure it stays at the edge of the screen.

Example, buttons across the bottom of the arsenal :

(Small extract)

        class menuBar: RscControlsGroupNoScrollbars {
            idc = IDC_menuBar;
            x = QUOTE(0.5 - WIDTH_TOTAL / 2);
            y = QUOTE(safeZoneH + safeZoneY - 9 * GRID_H);
            w = QUOTE(WIDTH_TOTAL);
            h = QUOTE(7 * GRID_H);
            class controls {
                class buttonHide: ctrlButton {
                    idc = IDC_buttonHide;
                    colorBackground[] = {0,0,0,0.8};
                    x = QUOTE(1 * WIDTH_GAP + 0 * WIDTH_SINGLE);
                    y = QUOTE(0);
                    w = QUOTE(WIDTH_SINGLE);
                    h = QUOTE(7 * GRID_H);
                    text = CSTRING(buttonHideText);
                    sizeEx = QUOTE(5 * GRID_H);
                    tooltip = CSTRING(buttonHideTooltip);
                    onMouseEnter = QUOTE(ctrlSetFocus (_this select 0));
                    onButtonClick = QUOTE([ctrlParent (_this select 0)] call FUNC(buttonHide));
                };
                //etc other buttons
           };

Also here are the defines that it uses to understand it.

#define pixelScale  0.25
#define GRID_W (pixelW * pixelGridNoUIScale * pixelScale)
#define GRID_H (pixelH * pixelGridNoUIScale * pixelScale)

#define WIDTH_TOTAL (safeZoneW - 2 * (93 * GRID_W))
#define WIDTH_GAP (WIDTH_TOTAL / 100)
#define WIDTH_SINGLE ((WIDTH_TOTAL - 7 * WIDTH_GAP) / 6)
#

For the MenuBar Y co-ord they get the botom of the screen with safezone and the take off enough space using absolute grid values to make it stick to the bottom. If they used a percentage of safeZoneW it would scale and move to the middle which was my problem.

#

example screenshots of large UI and the arsenal showing how it stays a at a good scale and stick the bottom.

drifting sedge
#

@silk lodge been busy the entire day - i might've misunderstood your problem there then, i was under the impression you needed the scaling to generally remain the same between aspect ratios and not clip off screen and whatnot

#

my bad then πŸ˜‚

#

but thanks for getting back to me on it (and the fixed script)

dark tulip
#
myscript.sqf:
#include "\a3\ui_f\hpp\defineResinclDesign.inc"
params ["_display"];
if (arma3mainMenuLoaded) exitWith {};

private _profileBtn = _display displayCtrl 109;  // Profile: Personaje

if (!isNull _profileBtn) then {
    _profileBtn ctrlEnable true;
    _profileBtn ctrlShow true;
    _profileBtn ctrlSetFade 0;
    _profileBtn ctrlCommit 0.1;
};

if (!isNull _profileBtn) then {
    ctrlActivate _profileBtn; //CRASH
};

//I AM USING CBA class Extended_DisplayLoad_EventHandlers on class RscDisplayMain

This crash dont happen on profiling but it does on stable, why?

tranquil iron
dark tulip
#

I've had issues with spawn and sleep, not too informed about whether you could spawn code or do sleep in that context. Searched on google and couldn't find info

trim sigil
#

Quick question
I've got some structured text, but I don't want the text size to scale with interface scale
Is there any way to stop it scaling?

quiet arrow
random tinsel
#

anyone have experience with Arma Dialog Creator?

#

what do I do if I want to add an image? (RscPicture?)

#

it isnt "supported"

#

I just add a static dummy and edit it manually later?

#

also, its correct to use safezones for everything, right?

#

how do I make something a square?

quiet arrow
#

Use pixelgrid and anchor it so safeZones.

random tinsel
#

what do i put in here instead of SafeZoneX + float?

#

also, is progress bar a real control?

#

i cant find anything about it on the wiki

random tinsel
#

should I not use Arma Dialog Creator?

#

it seems to not support PixelGrid

quiet arrow
#

Don't use it