#arma3_gui
1 messages ยท Page 5 of 1
can I grab a control object using an idc?
oh doof what was I thinking
Ok I'm going nuts here, me and Arma GUI just do not get along.
I've got my dialog working, but can someone point me to a wiki entry or post showing how to get it to use the vanilla dialog colors?
OK I had been staring at those blankly for a while. I think I just need to walk away for 10 mins ๐คฃ
Thanks
Ok the part I'm not smart enough to get my head around is I know I can use #include "\a3\ui_f\hpp\definecommoncolors.inc" to include the colors, but how do I know what the orange in the menu is called for instance?
Do I actually have to install all the files on my P: and go in and have a look?
copyToClipboard loadFile "\a3\ui_f\hpp\definecommoncolors.inc"```in Debug Console to copy the entire things into your clipboard
Ok now that's something that needs to be in the wiki (if it's not already and if it is it should be in bold with flashing colors)
Thanks
Ok this may be me being a little salty, but can I assume that after 11 years valign = "middle"; is STILL broken and isn't just me being terrible at this?
It still is AFAIK
Of course it is.
If only BI had someone with OCD working for them ๐
after several days... my first part of the nightmare is over. I now have it so that it saves weapons and optics for that individual weapon per class
https://streamable.com/dg8ljp
Looks nice. Well done
@hoary estuary how do you do the moving scrolling notifications like in your killfeed and score addition feeds?
_group ctrlCommit _time;
Ahhh ty
I then move top (now invisible) line to the bottom
probably deleting/creating controls could be easier
Hey does ```SQF
class CfgMainMenuSpotlight
{
class PatrolOps
{
text = "PATROL OPERATIONS";
picture = "nzf_patrolOps\patrolopsotile.paa";
action = "";
actionText = "Join NZF PatrolOps";
condition = "true";
};
delete ApexProtocol;
delete BootCamp;
delete EastWind;
};
Note I do have all the others from Ampersands list here [#arma3_config message](/guild/105462288051380224/channel/122121444703338496/p/999718011466432523/#msg-1133806810034360421) I just left them out for the sake of the discord message length
You probably need to have proper requiredAddons so your deletes actually delete
instead of vanilla addons adding their stuff after yours
OK so would I have to add all those classes I want to delete to the required addons?
No, addons that add these classes
Oh ok thanks..... again ๐คฃ
configSourceAddonList (configFile >> "CfgMainMenuSpotlight")
=>
["A3_Ui_F","A3_Ui_F_Orange","A3_Ui_F_Tacops","A3_Ui_F_Tank","A3_Ui_F_Enoch","A3_Ui_F_Oldman","A3_Ui_F_AoW"]
ran in vanilla
Thanks again, above and beyond the call of duty once again
hi could you share the code that takes you to the password login?
can you determine if a display/control was closed via ESC vs a button with an exit code?
Via keyDown EH
hello all, i have a strange problem: the very first Control in class Controls is ALWAYS hidden............. no matter what i do. i can even copy the exact same control, duplicate it, place it below, and it will be visible. but somehow the first control stays hidden.
Post the config
{
class background : RscText
{
x = CENTER_X - 0 * GRID_W;
y = CENTER_Y - 0 * GRID_H;
w = 10 * GRID_W;
h = 10 * GRID_H;
colorBackground[] = COLOR_BG_MAIN;
};
class background2 : RscText
{
x = CENTER_X - 0 * GRID_W;
y = CENTER_Y - 0 * GRID_H;
w = 10 * GRID_W;
h = 10 * GRID_H;
colorBackground[] = COLOR_BG_MAIN;
};```
that is how it starts. two controls, exactly the same except the name. the first one is hidden, the second one is visible. the same thing happens with other controls.
i am unable to post the whole config because what i am working on is WIP and i want to keep it a secret until i am ready to reveil it.
what if you switch their place? also remember to reload the changes via pop in to the editor
when i switch place, the one that is listed first will be hidden instead. like i said, no matter what: always the first one is hidden.
sounds like some code hiding it
not mine, that is for sure. there is no idc for it so it is impossible to get it and hide it......
also, if i put any onLoad on it, it does fire.
not impossible to hide
I would like to know how can we drink corn syrup in arma but I don't know can you help ?
Don't forget the water with it
????
try checking if the control exists via allControls display
i tried that. it is hard to tell. there are many -1 controls in there.
well give the controls unique id ๐
oh wow....................... i thought: lets just give the bastard an idc............. boom it shows up.............
so somehow, the very first control in the list has to have an idc? even if it is already set to -1 through inheritance? weird.....
yeah sounds weird
i had another mission where i was messing around with dialogs and in there it has only one control ( in class Controls ) and that one does show. guess what: it has an idc assigned.
now it gets even more weird: i went to that mission, changed the idc to -1 but somehow it is still visible............. what the flying fuck
I don't understand the example. The second control completely overlaps the first?
not properly reloaded the config?
And is the same colour?
ok i did some more testing.
IF the idc of the very first control is set to -1, it is being hidden.
ANY other number and it will appear.......
0 works too.
just so you know: if you are making GUI, you can use the 3DEN editor and its console to look at your design without going into a mission. just execute:
(findDisplay 313) createDisplay "yourDisplayClassHere"
Ctrl+S will reload the config.
so my dev loop is: make changes to hpp, back to arma, Ctrl+S, Ctrl+D ( if you have 3DEN enhanced), execute that command, and boom i see the changes.
nice thx
i found that tip on the wiki somewhere. i forgot exactly where. it might be somewhere in the GUI tutorial page.
3DEN enhanced feature?
what feature?
that config reloading
nah i think it happens in default too.
as long as you save.
hmm i always goto the editor to have the configs reloaded
didnt know there was another way
so kinda skeptical about that ๐
try it. it will tell you.
but yes, if you are editing GUI while in a mission, yes you do need to go back to the editor and go back to the mission.
but like i said, if you STAY in the editor, open the console, and use that command i gave you, it will open the GUI. however, some functions will obviously not work. so it is meant only for designing GUI.
ah staying in the editor, makes sense
it is great for GUI designing. and basic functionality. but as soon as interaction with mission objects is required, then obviously it is needed to get into the mission.
tried it, thats a nice little trick, ty ๐
does someone has some PixelGrid examples? my head is exploding
mine was too ๐
what kind of examples do you want? the macros? or the actual x y w h stuff
by the way, i have to say: if you have changed any of the code related to the dialog, you need to go into the mission to get the changes in the editor. so reloading in the editor is literally only for reloading hpp changes.
honestly, i think i can do a better explanation now XD no offense
Go for it lol
hey check your DM if you want any help.
Any decent fallout mods?
No. Not the correct channel too
hey is there anyone here who knows a fix for ctrlSetFade failing to apply to the background colors of RscToolbox? the fade effect works on the text though..........
Can control groups be used to batch enable/disable/show/hide child controls?
affirmative.
Thanks.
what kind of gibberish is this 
macros
yeah i tought so but i extracted this from a button in the Pause menu in game... does someone knows what macro were used in there?
It's probably these: https://community.bistudio.com/wiki/Arma_3:_GUI_Coordinates#GUI_GRID
See the 40 & 25 in there.
has anybody ever found out how the graph on the spectrum device was done? found this old discussion here about it but the question seems to have remained unanswered.
I've recently come across this video of a guy using what seems to be a sort of similar technology...
https://www.youtube.com/watch?v=0xrQNy0Pxdg
ะัะฐัะบะฐั ะดะตะผะพะฝัััะฐัะธั ัะฐะฑะพัั ััะฐะฝัะธะธ ะฝะฐะทะตะผะฝะพะน ัะฐะทะฒะตะดะบะธ ะะกะะ -5ะ ะฝะฐ ะะ ะ-1ะ ะพั RHS ะฒ Arma 3.
For all I know it's just ctrlStatic (lines) that are animated.
It looks so smooth though... and the area below the graph has a different color. Could all that just be lines?
unrelated question: i have a very nice dialog with a picture frame around it. the center has a transparent cutout where dialog controls are showing. the corners of the cutout are rounded. when a control is focused, it will show above the cutout, removing the appearance of the rounded corners. i really like to keep the "picture frame" above all the other layers. if at all possible.....
Is the frame in "controlsBackground"?
no.
The interactive controls might still get on top of it when the player interacts with them. But I'd test that.
i had it in controlsBackground but then i noticed how focused controls get on top of it. so i thought: move it to Controls. but it is still the same.
Yeah, there might be no way around it.
if the frame overlaps the interactive controls then these will be put in front of it when focused
yes. unfortunately.....
however, i did notice a very strange thing: only certain things like colored backgrounds will go on top of the frame. things like images will still stay below.......... oh wait never mind. that is because they are capped off by the group around it.
BIN_fnc_showPlayerSpectrumAnalyzer this shows the UI and BIN_fnc_showSpectrumAnalyzerGUI draws the lines
Too late already for me to look into the exact details today. Perhaps I find some time tomorrow.
Yea I've seen those as well but I'm not good enough of a code reader to figure them out tbh ๐คฃ
More progress, but the spaghetti debt is starting to stack lol
is there a tutorial or link for how to do 2d animations?
What do you mean by 2d animations? What is your goal?
animate some bars on a gui
https://community.bistudio.com/wiki/progressSetPosition
https://community.bistudio.com/wiki/ctrlSetPosition
This or this? Very wild guess
its some where to start thanks
50 frames for carrier hp bar
you do that with just a bunch of paas?
thats all i know atm. just as things take damage, I make my ui reference a different image
i didn't know if there is a better way
Actually you can have two textures using controlsGroup and change group coord
This. Not even controls group, you can do that with ST_TILE_PICTURE so picture cuts off when you resize it
controls group might be easier though and you can have other stuff inside it to cut off too
Speaking of tiles
GIB ctrlSetTileW and ctrlSetTileH
I guess I'm not understanding. Use a second control as a color overlay or something?
cause i also have to animate these
RscPicture, over it RscControlsGroupNoScrollbars with exact same size and another RscPicture inside it
You then resize controls group to hide parts of top RscPicture
so
class CarrierBlue: RscPicture {
idc = IDC_CARRIERBLUE;
x = 0 * GRID_W;
y = -3 * GRID_H;
w = 40 * GRID_W;
h = 20 * GRID_H;
text = "data\ui\HUD\CarrierBlue\CarrierBlue_50.paa";
class controls: RscControlsGroupNoScrollbars {
idc = IDC_CARRIERBLUEHIDE;
x = 0 * GRID_W;
y = -3 * GRID_H;
w = 40 * GRID_W;
h = 20 * GRID_H;
text = "data\ui\HUD\CarrierBlue\CarrierBlue_00.paa";
};
};
I then subtract the width to get the effect?
no
class RscPicture {...};
class RscControlsGroupNoScrollbars {
class controls {
class RscPicture {...};
};
};
class CarrierBlueBase: RscPicture {
idc = IDC_CARRIERBLUE;
x = 0 * GRID_W;
y = -3 * GRID_H;
w = 40 * GRID_W;
h = 20 * GRID_H;
text = "data\ui\HUD\CarrierBlue\CarrierBlue_00.paa"; // max dark color
};
class CarrierBlueOverlayGroup: RscControlsGroupNoScrollbars {
idc = IDC_CARRIERBLUEOVERLAYGROUP;
x = 0 * GRID_W;
y = -3 * GRID_H;
w = 40 * GRID_W; // Reduce this
h = 20 * GRID_H;
class controls {
class CarrierBlueOverlay: RscPicture {
idc = IDC_CARRIERBLUEOVERLAY;
x = 0 * GRID_W;
y = 0 * GRID_H;
w = 40 * GRID_W;
h = 20 * GRID_H;
text = "data\ui\HUD\CarrierBlue\CarrierBlue_50.paa"; // max bright color
};
};
};
yes
Now resize controls group as you want the overlay to get cut off
ctrlSetPosition + ctrlCommit
instant/vs smooth, whatever you'd like
nice ๐
now the only issue is to flip it and have it cut off from the left to the right:
move both X and W
but won't W always cut off from right to left?
Ah, also move picture inside to the left then
Hey, I am am wonderring why the text is not at the same position as the picture even tho I call the same cordinates in x,y.
The picture is called "logo.paa" and the text is blank. How are we supposed to figure out what that relates to?
The text get's called via a file, I figured out why it wasn't moving. Because I multipied it with 0 and that makes 0 so it was at 0,0
Is there a way to resize the size of the text in a rsctext via a variable? I tried playernamespace but if I use that it does not work at all.
Nope, does not work
ohh wait
when I do it via command it does
oh you were wanting something that checks when a variable changes and changes a size?
yes, something that changes it when you make it bigger in arma 3 layout thingy. Like when you resize the image then the size of the text in the text box should change as well.
I don't see an applicable ui event handler, so you are going to have to make your own event listener using a each frame handler that listens for changes in size in a control, then uses the command above when detected
why no onResize event? lol
Guess it's not really worth adding a whole event handler for that if I call the file manually anyway. I just add the command when I call it
@hoary estuary I'm having trouble figuring out the checks I need so that the controls don't go too far so that I can reverse them easily (if say some fluke goes down and the function gets called too many times or with too large of a value). I can't seem to figure out the math. I want to be able to lower my colored controls down and back up when I need. but say I lower it too far, then its a pain to figure out how to get them back.
Defines: https://pastebin.com/bBXsviLr
Config Snippet: https://pastebin.com/Qe7FCXiF
Function: https://pastebin.com/CguwCj37
Calculate target Y and H each time instead of just delta
Gah I'm so close but I'm getting to the frustrated point:
// -------------------------------------------
// FULL CORDS: [<Group>,<Picture>]
// - [[0.464646,0.040404,0.10101,0.13468],[0,0,0.10101,0.13468]]
// HIDDEN CORDS: [<Group>,<Picture>]
// - [[0.464646,0.175084,0.10101,0.26936],[0,-0.13468,0.10101,0.13468]]
// Control Group
// - Decrease H = Increase Show
// - Decrease Y = Increase Show
// Picture
// - Increase Y = Increase Show
// -------------------------------------------
// calculate - // using percent of 1 to go from hidden to full
private _group_y = SILO_GROUP_HIDDEN_Y - (SILO_GROUP_SHOW_Y * _percent);
private _group_h = SILO_GROUP_HIDDEN_H - (SILO_GROUP_SHOW_H * _percent);
private _picture_y = SILO_PICTURE_HIDDEN_Y + (SILO_PICTURE_SHOW_Y * _percent);
// private _picture_h = SILO_PICTURE_SHOW_H - (SILO_PICTURE_HIDDEN_H * _percent);
TRACE_3("", _group_y, _group_h, _picture_y);
#define pixelScale 0.5
#define GRID_X safezoneX
#define GRID_Y safezoneY
#define GRID_W (pixelW * pixelGridNoUIScale * pixelScale)
#define GRID_H (pixelH * pixelGridNoUIScale * pixelScale)
#define CENTER_X ((getResolution select 2) * 0.5 * pixelW)
#define CENTER_Y ((getResolution select 3) * 0.5 * pixelH)
#define SILO_CENTER 70
#define SILO_Y 3
#define SILO_W 10
#define SILO_H 10
#define SILO_SPACE_X 12
#define SILO_GROUP_SHOW_Y 1 * SILO_Y * GRID_H
#define SILO_GROUP_SHOW_H 1 * SILO_H * GRID_H
#define SILO_GROUP_HIDDEN_Y (14/3) * SILO_Y * GRID_H
#define SILO_GROUP_HIDDEN_H 2 * SILO_H * GRID_H
#define SILO_PICTURE_SHOW_Y 0 * GRID_H
#define SILO_PICTURE_SHOW_H 1 * SILO_H * GRID_H
#define SILO_PICTURE_HIDDEN_Y -10 * GRID_H
#define SILO_PICTURE_HIDDEN_H 1 * GRID_H
pic_y = group_h * percent * -1
group_y = group_top_y - pic_y
that's all you need
(Assuming picture starts at y=0)
Also instead of increase/decrease pass target percentage into the function
yeah already had taken out the increase/decrease on this iteration and put in percent. 1 being fully shown, 0 being fully hidden...
// FULL CORDS: [<Group>,<Picture>]
// - [[0.464646,0.040404,0.10101,0.13468],[0,0,0.10101,0.13468]]
// HIDDEN CORDS: [<Group>,<Picture>]
// - [[0.464646,0.175084,0.10101,0.26936],[0,-0.13468,0.10101,0.13468]]
3:04:14 [CARRIERSTRIKE] (Mission) TRACE: 347959 : _group_y=[0.188552,0.228956], _group_h]=[0.26936,0.13468, _picture_y]=[-0.13468,-0.13468] :2606
I kind of got close with:
// calculate
private _group_y = SILO_GROUP_HIDDEN_Y + SILO_GROUP_SHOW_Y;
private _group_h = SILO_GROUP_HIDDEN_H - (SILO_GROUP_SHOW_H * _percent);
private _picture_y = SILO_PICTURE_HIDDEN_Y;// + (SILO_PICTURE_SHOW_Y * _percent);
// private _picture_h = SILO_PICTURE_SHOW_H - (SILO_PICTURE_HIDDEN_H * _percent);
TRACE_3("", [ARR_2(SILO_GROUP_HIDDEN_Y, _group_y)], [ARR_2(SILO_GROUP_HIDDEN_H, _group_h)], [ARR_2(SILO_PICTURE_HIDDEN_Y, _picture_y)]);
just not getting the _group_y done. I must be overthinking this to the extreme compared to what you posted
In my equation 1 is fully hidden
assumed your percent is damage and 1 means full destroyed so overlaying picture is hidden
this would be a capture indicator. 1 would be fully shown, indicating that team owns that point
pic_y = group_h * -(1 - percent)
group_y = group_top_y - pic_y
For percent where 1 is full visibility (group_h * 0 = 0)
for 0 it would be negative group height so picture is fully hidden
Assuming picture and group are same size, all you need to know:
- Percentage of shown/hidden
- Full group height
- Original group Y
then you calculate two Ys
that's it
there is ctrlSetPositionY to only set Y btw
still needs commit after it
defines
#define SILO_Y 3
#define SILO_W 10
#define SILO_H 10
group is
x = (SILO_CENTER - SILO_SPACE_X * 2) * GRID_W;
y = SILO_Y * GRID_H;
w = SILO_W * GRID_W;
h = SILO_H * GRID_H;
and pic is
x = 0 * GRID_W;
y = 0 * GRID_H;
w = SILO_W * GRID_W;
h = SILO_H * GRID_H;
so yeah, same size, just different starting cords, i see that now
private _group_top_y = SILO_Y * GRID_H;
private _group_height = SILO_H * GRID_H;
private _percent = 0.2; // 1 = full damage, fully hidden picture
_picture ctrlSetPositionY (_group_height * -_percent);
_group ctrlSetPositionY (_group_top_y - _group_height * -_percent);
and commits
private _group_top_y = SILO_Y * GRID_H;
private _group_height = SILO_H * GRID_H;
private _percent = 0.2; // 1 = full health, fully visible picture
_picture ctrlSetPositionY (_group_height * -(1 - _percent));
_group ctrlSetPositionY (_group_top_y - _group_height * -(1 - _percent));
This will hide the picture from top to bottom, I assume that's what you wanted
yeah. I'm just trying to process. so I don't have to change the height at all, just change y values. Unlike when doing it horizontally for the carrier controls (where I had to change the w values).
Btw instead of having flat blue and flat red textures you can only have white one and set it to any color with colorText[] = {1,0,0,1}; // red
I kind of like the animated effect tho
I meant having single texture instead of two, unrelated to animation
Though such recoloring wont work if you want to keep white outline as colorText gonna modify it too
actually, i need the opposite. color show starting at bottom and moving up. which is why i was thinking I needed to modify the height of the group as well
Moving up as percentage increases?
so 0 would be fully grey, 0.10 would be 10% of the bottom of the icon filled with color
grey is background picture?
grey is background yes. i then have 2 images on top of that, red and blue for each of the teams
i should disable one of the colors for debugging until I get this down
btw I mixed up picture and group in my code example
This should work for you
I was wondering cause it didn't work right so I was trying to figure out what I missed
yup this works. thanks. I don't like having to be at the point of "do it for me" but I've been at this all day today with no success. Still couldn't tell you what you did so I'm going to re-read over your explaination and attempt to try and understand
- move picture up so its top gets cut off by controls group
- move group down so picture's bottom stays at the same spot
Custom GUI Bars (Using Pixel Grid Macros):
1.) Create two images
Forground Color
Background Color
2.) Grid Macros
#define pixelScale 0.5
#define GRID_X safezoneX
#define GRID_Y safezoneY
#define GRID_W (pixelW * pixelGridNoUIScale * pixelScale)
#define GRID_H (pixelH * pixelGridNoUIScale * pixelScale)
#define CENTER_X ((getResolution select 2) * 0.5 * pixelW)
#define CENTER_Y ((getResolution select 3) * 0.5 * pixelH)
3.) Macro Positions (File to be included in config and function - tailor to needs)
#define IMAGE_X 0
#define IMAGE_Y 0
#define IMAGE_W 50
#define IMAGE_H 25
4.) Create Config (Place inside of your display config)
// Don't forget to import your Rsc classes!
#include "pathTo\MacroFile.hpp"
class BackgroundCtrl: RscPicture {
idc = -1
x = IMAGE_X * GRID_W;
y = IMAGE_Y * GRID_H;
w = IMAGE_W * GRID_W;
h = IMAGE_H * GRID_H;
onLoad = "uiNamespace setVariable ['TAG_BackgroundCtrl', _this select 0]";
text = "pathTo\BackgroundImg.paa";
};
class ForegroundCtrlGroup: RscControlsGroupNoScrollbars {
idc = -1;
x = IMAGE_X * GRID_W;
y = IMAGE_Y * GRID_H;
w = IMAGE_W * GRID_W;
h = IMAGE_H * GRID_H;
onLoad = "uiNamespace setVariable ['TAG_ForegroundCtrlGroup', _this select 0]";
class controls {
class ForegroundCtrl: RscPicture {
idc = -1;
x = 0 * GRID_W;
y = 0 * GRID_H;
w = IMAGE_W * GRID_W;
h = IMAGE_H * GRID_H;
onLoad = "uiNamespace setVariable ['TAG_ForegroundCtrl', _this select 0]";
text = "pathTo\ForegroundImg.paa";
};
};
};
5.) Image Movement (Basic Example - Tailor To Needs)
// Decrease From Right To Left
#include "pathTo\MacroFile.hpp"
private _ctrlGroup = uiNamespace getVariable "TAG_ForegroundCtrlGroup";
private _foregroundCtrl = uiNamespace getVariable "TAG_ForegroundCtrl";
private _percent = 0; // 0 for empty bar, 1 for full bar
private _ctrlGroup_X = IMAGE_X * GRID_W;
private _ctrlGroup_W = IMAGE_W * GRID_W;
_foregroundCtrl ctrlSetPositionX (_ctrlGroup_W * (1 - _percent));
_ctrlGroup ctrlSetPositionX (_ctrlGroup_X - _ctrlGroup_W * (1 - _percent));
_foregroundCtrl ctrlCommit 1;
_ctrlGroup ctrlCommit 1;
// Decrease From Left To Right
#include "pathTo\MacroFile.hpp"
private _ctrlGroup = uiNamespace getVariable "TAG_ForegroundCtrlGroup";
private _foregroundCtrl = uiNamespace getVariable "TAG_ForegroundCtrl";
private _percent = 0; // 0 for empty bar, 1 for full bar
private _ctrlGroup_X = IMAGE_X * GRID_W;
private _ctrlGroup_W = IMAGE_W * GRID_W;
_foregroundCtrl ctrlSetPositionX (_ctrlGroup_W * -(1 - _percent));
_ctrlGroup ctrlSetPositionX (_ctrlGroup_X + __ctrlGroup_W * (1 - _percent));
_foregroundCtrl ctrlCommit 1;
_ctrlGroup ctrlCommit 1;
Can I get a review + pin to the channel? (Pin second message first)
Better put that on the wiki with some images.
Alright
has anyone else here run into an issue where 3Den Enhanced just gives up out of the blue even though it is still loaded through launch parameters? for many game startups it worked fine and then suddenly the vanilla 3Den shows a message as soon as i get into my dev mission. telling me that 3Den enhanced is gone............
Nope. Never. Can you see if you can consistently reproduce it, then show the steps on an issue on the github?
it has consistently shown that message for about 4 attempts. i tried switching to the performance profiling build ( from the dev build ) but it is still happening. maybe i should try another editor mission. maybe something crazy rare happened inside the dev mission. i mean, i know how this works i am a developer myself. and the mission i develop in is....... unusual XD
oh well forget about that...... i just loaded into another clean mission and it shows the same error.
i must mention that both of those missions were created WITHOUT 3Den Enhanced being loaded. does that make any difference?
Never did that for me.
i will try to load the game without the mod and then load it again. see what happens.
that changed nothing ๐ฆ i will just use the vanilla then.
to be honest, i was starting to wonder why i was using the mod in the first place. the only change i noticed was the shortcut to open the debug console and that i can search for a function name in the functions viewer. apart from that i saw no difference. so i guess the vanilla 3DEN will suffice for me ๐
https://github.com/R3voA3/3den-Enhanced/wiki Maybe that gives you an idea
well shit, now i wish it kept working XD looks like amazing features but for now the vanilla 3Den will be enough. but in later stages of my project i will probably benefit a lot from that mod.
You can enable/disable the mod at any time. It just shows that warning message once then but it's gone once you confirm / save.
It will not break you mission.
Just if you use some of the custom attributes, they will get lost.
for some reason the game thinks the mod is gone even though it is still in there........... downloaded from steam workshop.
Yeah, that's weird. Have never heard anyone else have that issue.
Hi.
Tell me please. I know that RscListView exists, but it does not allow you to fill yourself with your own guis.
How can I make a scrollable list with my own items?
ControlsGroup: https://community.bistudio.com/wiki/CT_CONTROLS_GROUP
That's what you need.
Thank you!
hello again everyone, i am pulling my hair out here because i am extremely confused about the behaviour of textures inside controls: sometimes i can see them reload LIVE while the game is open because i overwrote the file with imageToPAA. but other times there is no change at all and i need to reboot the game. is there anyone that can tell me what the ******** is going on? i just want to see the changes i have made to a texture.
Debug flush maybe. I would guess that there's no built-in support for modifying textures on disk and it just loads when it doesn't have a copy loaded already.
but sometimes the image does reload while the game is running.....
That's probably a bug :P
save the image to a new filename and load that file. not perfect but should work and you dont have to restart arma
i thought of that but i hoped there would be a less janky way
I'm using RscControlGroup to create a scrollable list.
Inside it, I create several rsccontrolgroups to set the position relative to the child container
However, scrollbars appear from somewhere and in general the GUI behaves strangely
What am I doing wrong?
Here is an example of my test piece of code:
disableSerialization;
_success = createDialog "RscEngeneerRepair";
if (_success) then {
_display = findDisplay 36000;
_list = _display displayCtrl 36002;
//_modules = call EngeneerRepair_GetVehicleModules;
_verticalOffset = 0;
_group = findDisplay 46 ctrlCreate ["RscControlsGroup", -1, _list];
_group ctrlSetPosition [0, _verticalOffset, 0.8, 0.15];
_group ctrlCommit 0;
_title = findDisplay 46 ctrlCreate ["RscStructuredText", -1, _group];
_title ctrlSetPosition [0,0,1,0.2];
_title ctrlSetStructuredText parseText "Test module";
_title ctrlSetBackgroundColor [0,0,0,0.6];
_title ctrlCommit 0;
_verticalOffset = _verticalOffset + 0.15;
_group1 = findDisplay 46 ctrlCreate ["RscControlsGroup", -1, _list];
_group1 ctrlSetPosition [0, _verticalOffset, 0.8, 0.15];
_group1 ctrlCommit 0;
_title1 = findDisplay 46 ctrlCreate ["RscStructuredText", -1, _group1];
_title1 ctrlSetPosition [0,0,1,1];
_title1 ctrlSetStructuredText parseText "FAREW module";
_title1 ctrlSetBackgroundColor [0,0,0,0.6];
_title1 ctrlCommit 0;
};
I get something like this
the documentation says that the dimensions are set relative to the parent block...
Only XY
should I change up the map icon a little more or is it pretty "readable" as is?
WH are still absolute
do I understand correctly that the dimensions can also be set by multiplying by Safezone?
So 1 is not 100% of 0.8, its real 1
Sure, up to you
Thanks a lot
Hate that white outline
also referring to the top bar as well?
Multiplying by safezone is not a good idea because your controls will start ignoring UI Size in Video Options
both
would black look better? or no outline at all?
Red and blue are not common colors in the game, I don't think they need outline at all
but black outline will indeed look better
You can use engine outline produced by shadow = 2 attribute
Its can only be black though
i use that on the text for the number countdown at the top
i actually just have to rerender the photoshop images to get the black outline since the white is built in
You can have single solid white picture, make outline with shadow = 2 and change color with color/colorText
As for that progress, instead of overlaying same picture with same color maybe you can use solid hex without any numbers
could look better than that pie progress
pie progresses work better on images that completely fill their space, your shape has a lot of transparent parts
yeah i was thinking about filling in the hex shape
@hoary estuary this is what they looked like in the original game
Try with better color contrast then?
๐
If i get a flickering between texture changes, does that mean the files are loading too slow?
and if so, I guess I'll go from 128 to 64 or 32
Check if creating them offscreen first helps
would you recommend that for a draw handler?
_ctrl ctrlAddEventHandler ["Draw", {
params ["_ctrl"];
GVAR(Silos) apply {
private _silo = _x;
private _maxCountdown = GVAR(Silo_LoopMaxCountdown);
private _currentCountdown = GETVAR(_silo,GVAR(Silo_LoopCountdown),GVAR(Silo_LoopMaxCountdown));
private _owner = GETVAR(_silo,GVAR(Silo_CurrentOwner),sideUnknown);
private _siloNumber = [_silo] call FUNC(Silo_GetSiloNumber);
private _frameSlice = _maxCountdown / 21;
private _frameIndex = (_maxCountdown - _currentCountdown) / _frameSlice;
_frameIndex = _frameIndex max 1;
_frameIndex = _frameIndex min 21;
if (_currentCountdown == 0) then {
_frameIndex = 21;
};
private _color = switch _owner do {
case west: {"Blue"};
case east: {"Red"};
default {"Gray"};
};
private _icon = getMissionPath format["data\ui\icons\silos\%1\Silo_%1_%2_%3.paa", _color, _siloNumber, round _frameIndex];
if (round _frameIndex < 10) then {
_icon = getMissionPath format["data\ui\icons\silos\%1\Silo_%1_%2_0%3.paa", _color, _siloNumber, round _frameIndex];
};
if (_owner isEqualTo sideUnknown) then {
_icon = getMissionPath format["data\ui\icons\silos\gray\silo_gray_%1.paa", _siloNumber];
};
_ctrl drawIcon [
_icon,
[1,1,1,1],
getPosATL _silo,
32,
32,
0
];
};
}];
of course it doesn't happen when i record it, but between icon updates, sometimes the icons flicker, and it can continue for a while before it stops
https://streamable.com/zn22o2
Looks good.
Performance wise you might wanna move private _var and getMissionPath out of the apply
Also, does this need to run eachFrame or could you just run it each X frames?
i believe the draw handler has to be each frame i thought
Yes, but doing all the stuff to get the silos etc
yeah, i'll clean it up. just in the get it working stage atm
I used "Lily" from eleven labs for the computer voice, ran it through reaper with EQ, distort, and a slight delay. There are general messages that I used the voice lines from miller in A3 through eleven labs to recreate his voice and did the same thing
You are a jack-of-all-trades, aren't you? ๐
people have said that. I just think i get bored if i'm not learning/learning something new
Well, that's the right mindset
which uiNamespace variable contains the user's chosen gui color data again?
answer:
profileNamespace
GUI_BCG_RGB_R,
GUI_BCG_RGB_G,
GUI_BCG_RGB_B
IGUI_BCG_RGB_R
IGUI_BCG_RGB_G
IGUI_BCG_RGB_B
So I have a listnbox currently and will need to make a background for it. I was thinking using a listbox and adding the same amount of rows so i can have alternating row colors for the listnbox. But I don't think you can set the background color of individual rows right?
looking to replicate something like this, but will have like 7 columns with the listnbox
oh it looks like you were able to do it in KOTH @hoary estuary , mind sharing the code?
Often the best workaround for control limitations is to just make your own with a controlsgroup.
But maybe there was a method in this case.
if i were to make a rsc for every line, that would be a nightmare
Nah you use ctrlCreate. Listboxes are always used with dynamic data anyway.
It sounds horrifying but worked out surprisingly clean the two times I had to do it so far.
RscText with background color under each second line
so you're doing it with ctrlCreate as well? or are you doing it config
cause I'm using ctrlCreate atm and I'm getting close, but my calculations are driving me insane
My list is of fixed size so I did it with config
You need rowHeight
get rowHeight of the list, that's your Y step
yeah been using it, just getting it right is what I'm screwing with:
there is a quirk though about row height being rounded to whole pixels by the engine though
I don't remember the details
right now I'm doing:
rowheight = LEFT_LB_H / LEFT_LB_TOTALROWS * GRID_H;
private _ctrlback_H = _rowHeight + (0 * GRID_H);
its so close
Hmm
Maybe Y is the key
Basically there is some rounding going on in the engine with row heights
๐ค
or, I leave it at 80, then change my total row count to 22 (even though there are 21 elements) and it fixes that as well
I want to increase the opacity of each of the rows, but when I do, i start to drown out the text. how can I get the created rows to be behind the listnbox through script?
I don't think you easily can
Have a controls group container under the last and create your highlights there
I think I might do that then. actually, it doesn't look too bad atm:
Nice!
hey guys, im in a bit of a pickle here.
made some UI with RscTextCheckBox and now i can't find the right way to send data from it's state. oncheckedChanged doesn't work, nor does action. any ideas?
class LowButton: RscTextCheckbox
{
idc = 2501;
style = 2;
checked_strings[] = {"LOW"};
strings[] = {"LOW"};
x = 0.434375 * safezoneW + safezoneX;
y = 0.64 * safezoneH + safezoneY;
w = 0.0590625 * safezoneW;
h = 0.028 * safezoneH;
OnCheckedChanged = "systemchat 'yes';";
};
i can't seem to find the right EH or whatever it is used for this one
it does change color when i click on it in the UI.
nevermind, switched to toolbox. way better at what i was aiming for.
onCheckBoxesSelChanged
I see a Battlefield 2. Neat.
I have never seen that number icon tho, is that project reality?
Ah its the 2000 one with the flying thingies
Yup 2142 titan mode
ouch! right in the nostalgia! haha. loving it
is this too busy?
You might wanna dim down the background.
What's the empty space at the bottom right for?
buttons when i make them
things like confirm, save loadout etc
i would maybe blur the background or dim it like r3vo said
Hypoxic - Spawn Menu
Hey, I am wondering why my IGUI does not keep updating the text and complelty makes it invisible the second time you call it. So basically I have a IGUI that pops up for 5 seconds and then vanishes with a image and a text below it. If I call it like that for the first time everything works. But when you call it within the 5 seconds that it is still present on the screen it buggs out the text and the script thinks that the display is null. IDK why cause it should override the old one (and it does for the image) but it does not for the text. In the profiling & dev version it is fixed, but for current stable it is stull bugged. IDK what I can do here.
// Create layer to display info
(QGVAR(speedDisplay_onLoadSave) call BIS_fnc_rscLayer) cutRsc [_IGUItoDisplay, "PLAIN", 1, true];
// Get IGUI
private _display = uiNamespace getvariable [QGVAR(speedDisplay_onLoadSave), displayNull];
// If IGUI does not exist exit
// if(isNull _display) exitWith { systemChat "EXIT NO DISPLAY"; };
// Get textSize controll
private _control = _display displayCtrl 1001;
private _textSize = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(speedDisplay_Preset),H)), 0.136];
_textSize = (_textSize * 0.357) * _customTextSize;
_control ctrlSetStructuredText parseText format ["%3" + _text + "%2", _limitReached + (str _value) + "%" + _customTextColor, _stringEnd, _customTextColor];
_control ctrlSetFontHeight _textSize;
make sure the layer is properly removed before trying to create a new layer
well removing that layer is kinda impossible I think. I added a check that checks if it's set in allLayers and when it is do not create a new one, well that solves the problem of it not changing but when the 5s are over it is not creating a new layer anymore cause the layer persists in the allLayers array. I tried to remove it but there is no command to do so. I tried cutRsc with default but it did not work. Said it could not find default.
Does the draw ctrlEventHandler fire at all times? Or only when the ctrl is shown?
ANSWER: No, it only fires when the control is shown
I have a map control in my display's control class (not in a CT_CONTROLS_GROUP). Any time I click off it, I lose control of the map and can't regain it. It should be the most top most displayCtrl. Anyone know a fix?
Don't use map in any Controls Group
No but that's the only proper usecase
Ah okay, think I've misunderstood your situation
its possible to use a structured text with colors inside of a tooltip?
Tooltips only support linebreaks, no structures text
You could script your own tooltip though

Is there like any premade ones on the forums?
Maybe
do cutText and cutRsc layer numbers effect each other? or are they independent?
when using strings as the layers, can you order the layers somehow as well?
I think they use same layers
Strings are ordered in creation order
The solution is to pre-init all string layers in needed order beforehand
then you can re-use same string layers later so they appear in your original wanted order
By pre-init I mean initialize some dummy display/text on these string layers first, then when you actually need displays there, first used order will remain
can I disable item in list-box with ctrlEnable ?
want to prevent adding item to player when he pick grayed-out item from list, but still show it in list-box ( some how override it with ctrlAddEventHandler ) ?
I use a selection event handler and if it is selected, I change the selection back to something else
Anyone know how to dynamically size row heights in list boxes?
For example if the text is too long to display in one row set it's height to 2
RscListBox seems to have rowHeight attribute
I don't think you can have line breaks in list boxes?
Better build your own with scripting
There you'll be able to do anything you want
control group with buttons is one way to do custom menu. I have personally used that
There are also control tables. Haven't used those yet though
so at
https://community.bistudio.com/wiki/Arma:_GUI_Configuration#Control_Styles
where it says
Note that drawing of vertical text is not supported and any attempt to use ST_UP, ST_DOWN, ST_VCENTER is likely to result in the following .rpt spam:
Obsolete, sizeH and sizeW calculation missing
In addition, ST_UP, ST_DOWN, ST_VCENTER are stand alone styles and should not be mixed with any other styles
the 1st line is saying they dont work, so why does the 2nd line matter about using them stand alone?
probably applies to some arma titles, and some not, since most wiki pages share info accross all Real Viruality engine games
oh dang, okay ill keep trying to center this text both horizontally and vertically then
its not doing vertically :/
If I wanted to patch a resource in another mod's dialogue (in this case, make the ACE microdagr use a slightly different case), how would I correctly reconstruct the inheritance?
The resource ( configFile >> "ace_microdagr_TheDialog" >> "controls" >> "MicroDagrShell" ) is set in config as having
text = "\z\ace\addons\microdagr\images\microDAGR_shellPicture.paa";
So obviously my first thought is to just swap out the shell picture for my own.
or is this config_makers material
this is #arma3_config material, but the answer since its a root class:
class CfgPatches {
class MyAddon {
name = "My Addon";
author = "Me";
url = "";
requiredVersion = 2.14;
requiredAddons[] = {
"ace_microdagr"
};
units[] = {};
weapons[] = {};
skipWhenMissingDependencies = 1;
};
};
class RscPicture;
class ace_microdagr_TheDialog {
class controls {
class MicroDagrShell: RscPicture {
text = "newText";
};
};
};
anyone got the display or control for the loading screen?
Anyone interested in fixing this mod? https://steamcommunity.com/sharedfiles/filedetails/?id=1178716644
What's wrong with it?
@quartz granite https://github.com/R3voA3/VANA (not yet working)
There are reports that the mod does not initialize all of the time, it will lose saved loadouts, and even crash the game.
The author states that the code needs optimized and updated for it to work with the latest Arma 3 updates and that the GitHub is available for anyone to use.
Feel free to add an issue to the repository I have linked above. The more information I have the quicker I can fix these issues
Got it! I will do what I can. I'm busy with a newborn, so I'm a little slow right now
Figured the formula to calculate world meters per screen pixel for map draw commands:
getResolution params ["", "_screen_h", "", "", "", "_ui_scale", "_fov_top"];
private _meters_per_pixel = worldSize / ((_screen_h / (_fov_top / _ui_scale)) / ctrlMapScale _map);
```Maybe somebody will find it useful or suggest how to do it easier
Not sure how well it will work with fucked up FOV, probably wont
Works fine with default healthy values
Used to script draw thick arrow lines (each waypoint drawn again pixel up, down, left, right)
Hi! Does anyone know how I can make RscText text bold or change the font size? At the moment I managed to center the text using style = ST_CENTER;
sizeEx and font
You have to change to bold font
https://community.bistudio.com/wiki/Procedural_Textures#UI_On_Texture_Advanced
for this can the uniquename be auto generated for every instance that exists?
No
str random 1e6
not really auto but you get the idea
For one of my project I had it sort of auto generating based on the class name of the object I was changing the texture of + the index of the selection + the objects id (I think?) And then saved that string as a variable on the object
Would that work in p3d?
huh?
Apologizes, I was out the whole day
I guess its better to describe/show what I am trying to do. So I got this pistol where I want to show the ammo count and magazine name. Now in first person for view pilot it works fine. However if I say look at an AI's gun it shows my ammo count on their gun which it shouldnt (it should show 3/3 instead of 2/3). in MP if I look at another player I see my ammo count on their gun, and they see their ammo count on my gun.
Not sure what you can do here, texture names are baked into p3d's ๐ค
Try having different texture name for 1st person and 3rd person view?
Okay so lets say I do the follow, I was actually setting the texture via hiddenselections cause lol easier to edit config. But yea lets say I got this.
#(rgb,1024,1024,1)ui(rsc_targetlocator_view_pilot,uniquename_view_pilot)
#(rgb,1024,1024,1)ui(rsc_targetlocator_res_lod,uniquename_res_lod)
rsc_targetlocator_view_pilot is easy, already have that working, but wat would I do for rsc_targetlocator_res_lod which would be what others see?
Sadly you can't change weapon textures on the fly
- Easy solution: Make text unreadable so you can't see what it says so it fits everyone
- Harder solution: Check which character camera is looking at and display relevant info, wont work well if you have 2 characters guns visible at once
yeah #2 does sound really hard ngl, plus prob not best performance wise ๐ฆ
alas tis might be a dead end
, atleast I tried
Well it shouldn't be that bad
nearEntities of small radius together with camera position
then check if current weapon if your weapon
take zoom into account a bit too
hmmmm okay, well shit I will try that out tomorrow why not, though I am not too experienced on taking zoom into account, like at what zoom levels should matter
killzone kid the gift that keeps on giving
huh suprised a getFov command hasnt been requested?
You can't have that for a camera though?
ah whoops, there's CBAs function too
Which options do I have for better NV overlay, other than ACE?
Not a fan of the full screen NV
Currently attempting to customize a unit's UI but running into some trouble.
I was able to add the top-left status block typically found on vehicles, but the HitZones component doesn't show any of the unit hit point status indicators.
Is there a way to make this block show the status of some of the unit's hitpoints, such as body, head, right arm/leg, left arm/leg, etc.?
I've also attempted to add elements from vehicle UI such as compass, grid indicator, clock, etc, but all of these were default numbers and non-functional.
Also, is there a way to associate a UI (unitInfoType and maybe even an optics model) with a headgear item and not a unit class?
From what I can figure, the idd and idc parameters affect what the element actually is. Is there a way to see what they correspond to?
Another thing Id like to do with that is make an artillery gunner sight (like for the M4 and M5) which calculates the low angle solution instead of high angle solution
No, idd and idc are IDs that you can use to reference displays and controls in scripts. The type of the control (e.g. button, image, dropdown, ...) is determined by type.
See https://community.bistudio.com/wiki/Arma:_GUI_Configuration to learn more.
Any idea of why i have this offset on the UI that i need to scroll to find it?
class RscNsnLoadoutMaker: RscControlsGroup{
idc = 1000;
type = 15;
shadow = 0;
style = 16;
x = 40 * GUI_GRID_W + GUI_GRID_X;
y = -2.5 * GUI_GRID_H + GUI_GRID_Y;
w = 14.5 * GUI_GRID_W;
h = 27.5 * GUI_GRID_H;
class controls {
class background: RscText
{
idc = 2200;
x = 40 * GUI_GRID_W + GUI_GRID_X;
y = -2.5 * GUI_GRID_H + GUI_GRID_Y;
w = 14.5 * GUI_GRID_W;
h = 27.5 * GUI_GRID_H;
colorBackground[] = {0,0,0,0.8};
};
the size of the group is the same as the background
i just wan to use a grup so i can hide it when not needed
Controls placed inside a control group have their x/y coords relative to the control group, so the x/y of background should be 0.
it makes sense lol, thank you ๐
Is this an extension for eden editor? If yes, then you should use pixel grid.
yep is for the editor
https://community.bistudio.com/wiki/Arma_3:_Pixel_Grid_System
you mean use safezones?
Safezones + grid
Here are some examples https://github.com/R3voA3/3den-Enhanced/tree/master/addons/main/GUI
Is there some method of defining draw order for controls?
I can only inform you that, unfortunately
Currently I have a RscMapControl that is meant to be behind an overlay, but I can't seem to get the overlay to appear on top of the RscMapControl.
The order in the config is the most and only reliable option. Otherwise, it is created bottom to front order
Understood. Thanks, POLPOX.
So there's no way to make the RscMapControl element appear under my RscPicture element?
Depends on what you exactly do. The Z position is also updated if you click a GUI element too
At this point in time, I just have the map and the overlay.
If the map is interactable, I guess there is near to no way
Alright.
I know cTab somehow draws the "tablet" over the map but I can't for the life of me figure out how.
The above is my own attempt btw
Probably controlsBackground
Ah, yeah could be... Hmm...
Yes, that worked, thanks again POLPOX
I'm sorry to bother you here, but which channel do I turn to for font scripting?
Saw the Comic Sans mod by T0bi and I want to work something similar into my game on the client side too.
Got the game to recognize that a different font should be there, but no font on main menu, in arsenal, in game either...
Am I missing a class include or something, bc Mikero's pbo maker keeps saying the font files are missing.
link for original:
delete the space after the : to access
||https://steamcommunity.com/sharedfiles/filedetails/?id=2579581237||
@indigo cipher this might be the best channel. do remove the other ones. we have rules agains crossposting
when in doubt you got to pick 1 channel to start from
understood, sorry. deleting others now.
so upon review Ig im trying to learn how to do this
#arma3_editor message
and then replace the new font where EtelkaMonospacePro is, and Im not sure what the exact issue is. @_@
sample code attached for the config file, + sample code tree
code tree
(@ folder name here)
| |
addons, mod.cpp (standard)
|
arame_stencil
|
arame_stencil
| | |
fonts, config.cpp, icon_ca.paa (WIP)
|
ArameMonoStencil
|
ArameMonoStencil files here (fxy, paa)
If you take a look example of A3,
You need define your prefix before your folder.
"PREFIX/fonts/..."
What ever is your mod prefix.
See
https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon>
Is there any way in hell to modify a RscControlsGroup with child controls in the GUI editor after the GUI Editor project has been closed?
ty, I've been looking thru so much code istg it felt like my eyes were bleeding. >.<
"In simple terms, Addon Prefix is a virtual (in-game) path to the root of an addon. "
why do they usually mention root of an addon folder if most addons I see dont have one there? do they delete it after, or is the PBO unpacker misfiling something?
usually I see
addon/something/something/config.cpp
instead of
addon/config.cpp
...bah, time to see if I get this right I suppose, ty for the tips.
aaack.
is there a way to tell where the base folder it checks first?
trying to see if I should do a full file path or a word and then see if it recognizes from there. >.>"
Anyone know how to add the hover text on a button?
Tooltip shows up when hovering, but if you want on button text when you hover you could use
https://community.bistudio.com/wiki/CT_ACTIVETEXT
could be just that
sincerely, though-if I settle mod folders prefix, does that prefix/ @mod folder count as the start of the address lines, or the point of reference the addon folder?
i have a dialog which displays custom actions when inventory is opened, however i want those custom actions to only be available if certain items are in player's inventory for each, the code is long do i paste it or upload the file?
Use pastebin for example
description.ext code
https://pastebin.com/vNgDGJaw
init code
https://pastebin.com/abCufQqf
private _hasFirstAidKit = false;
private _inventory = assignedItems player;
{
if (_x == 'FirstAidKit') then {
_hasFirstAidKit = true;
};
} forEach _inventory;
hint format ["Has First Aid Kit: %1", _hasFirstAidKit];
if (!_hasFirstAidKit) then {
(findDisplay 12345) displayCtrl 1600 ctrlShow false;
};
for example i tried this code which checks for first aid kit if its in inventory to make sure that action 1 named (bottun 1) isn't visible unless first aid kit is in player's inventory, but it doesn't work properly
ops that was just a test, im no longer using that file, my mistake
Does it detect the FAK?
i will update init file using this code for inventory open handler
(findDisplay 12345) displayCtrl 1600 ctrlShow _hasFirstAidKit;
A bit nicer.
Also, for FAKs you might wanna check the inheritance of the object as modded FAKs will not be detected with that method
@loud fulcrum Why use assignedItems? Shouldn't it be just items player ?
yes i tried both, but seems assigneditems worked
much nicer, thnx ill try it
(findDisplay 12345) displayCtrl 1600 ctrlShow (items player findIf {_x == "FirstAidKit"} > -1);
This should be the final code
player addEventHandler ["InventoryOpened", {
//[] execVM "condicheck.sqf";
0 spawn {
sleep 0.5;
([] call BIS_fnc_displayMission) createDisplay "SimpleDialog";
private _display = (findDisplay 12345);
waitUntil {!isNull _display};
private _ctrl = _display displayCtrl 1600;
private _hasFirstAidKit = "FirstAidKit" in items player;
_ctrl ctrlShow _hasFirstAidKit;
};
hint "Inventory opened!";
}];
// Event handler for when the player closes the inventory
// Event handler for when the player closes the inventory
player addEventHandler ["InventoryClosed", {
private _display = (findDisplay 12345);
_display closeDisplay 1;
hint "Inventory closed!";
}];
Just wanted to test.
Works.
thnx, i'll give it a try
its just on point, now im gonna try to loop the condition code to make sure it also activates if player throws away FAK while inventory is opened
i got it! here is the final code if anyone would want to use this in future
[] spawn { while {true} do {
private _display = (findDisplay 12345);
private _ctrl = _display displayCtrl 1600;
private _hasFirstAidKit = "FirstAidKit" in items player;
_ctrl ctrlShow _hasFirstAidKit;
};
sleep 1;
};
thanks @hoary estuary @quiet arrow @solid gyro
it's working really nice and smooth
basically the purpose of this is to add additional options for inventory to the items that are available in player's inventory, no need to double click items in this case
You could do same with these without looping
player addEventHandler ["Put", {
params ["_unit", "_container", "_item"];
systemChat format ["_unit: %1,_container: %2,_item: %3", _unit, _container, _item];
private _hasFirstAidKit = "FirstAidKit" in items player;
systemChat format ["_hasFirstAidKit: %1",_hasFirstAidKit];
}];
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
systemChat format ["_unit: %1,_container: %2,_item: %3", _unit, _container, _item];
private _hasFirstAidKit = "FirstAidKit" in items player;
systemChat format ["_hasFirstAidKit: %1",_hasFirstAidKit];
}];
and change your display ctrl show/ false
//in eventhandlers
private _display = (findDisplay 12345);
if (!isNull _display) then {
//change stuff
};
oooh yes thats very true, i never thought of it, thats even better thanks alot for this
given the sample above, @solid gyro, what would the prefix be, and what would it reference in the file architecture?
Am I to set the prefix = the path to reach the addons folder or something, or just a one-word name, or...ig thats the part that confuses me. >.>"
feels like it should be arame_stencil, but it doesn't work, says files still missing.
you could test
_fileExist = fileExists "\Fonts\ArameMonoStencil\ArameMonoStencil6";
_fileExist = fileExists "arame_font\Fonts\ArameMonoStencil\ArameMonoStencil6"; // rename arame with your prefix , do not know what its
and this (class Tahomab) is missing };
class Tahomab
{
fonts[] = {
[{"\Fonts\ArameMonoStencil\ArameMonoStencil16", {"\core\data\fonts\tahomab16"},
};]
};
class cfgMods
{
author = TBD;
timepacked = "1551812047";
};
that bit I sorta disabled until I got the rest working, but ty for the reminder. ๐
ahh, ty. ๐
Yo does anyone know where I can find the atak overlay?
Where i can find define this kind solution?
So in same attribute category.
And if i select other it will force select other and make it grayed (so cannot be unselected), but other way , if i set 1st false then i can selected 2nd to true, but that doenst affect to 1 selection.
Do i need create some own ctrl under
//example
class Cfg3DEN {
class Attributes {
class Slider;
class GVAR(timeSlider): Slider {
Or is there somewhere definition to isPlayer, isPlayeable controls
class purchaseGUI
{
idd = 1234;
class Controls
{
class primFrame: RscFrame
{
idc = 1800;
type = CT_STATIC;
style = ST_FRAME;
x = 0.350469 safezoneW + safezoneX;
y = 0.28 * safezoneH + safezoneY;
w = 0.299062 * safezoneW;
h = 0.451 * safezoneH;
colorBackground[] = {0,0,0,0};
color[] = {0, 0, 0, 0};
};
class rustyButton: RscButton
{
idc = 1600;
text = "Rusty Excavator (100$)"; //--- ToDo: Localize;
x = 0.355625 * safezoneW + safezoneX;
y = 0.368 * safezoneH + safezoneY;
w = 0.128906 * safezoneW;
h = 0.044 * safezoneH;
colorText[] = {255,255,255,255};
colorBackground[] = {0,0,0,0};
};
};
};
Does anyone know why in my GUI my frame is completely translucent?
I attempted to change the color with no avail
i mean
isn't colorBackground[] = {0,0,0,0}; fully transparent?
well, changing to [0,0,0,1] (or [1,1,1,1] for that matter) doesn't change the outcome
Example 5 at https://community.bistudio.com/wiki/ctrlCreate uses RscTextMulti for background, maybe you can too
and vanilla game content does as well. hpp class RscDisplayArsenal { ... class ControlsBackground { class BlackLeft: RscText for example
I think I figured it out-no .paa file ending, or some prefix issue (still)... Is it possible for me to load multiple PAA files into one entry, say, {[1a.paa, 1b.paa, 1c.paa, 1d.paa], orig file to be replaced}, or shall I edit my prefix better to fit?
are you supposed to call the individual sized by .fxy file instead? ๐
Hey, Today Im gonna tell you how to import a font to Arma 3. This tutorial is Windows only. First of all sorry for the mistakes in English, Im french. Because I am a kid, ill take a kid font for demonstration. Here is the demonstration font : http://www.dafont.com/fr/soymilk.font First of all, do...
that is the one I'm referencing, andddd that is what Im stuck on
$PREFIX$ properly setup in your pbo ?
I get the class -> usage below, but frankly the prefix stuff is the issue for me. Im trying to understand exactly what Im to put there.
I can get the font images going, as seen by the logo symbol in the main menu, it's making arma recognize the stuff as a new font that ticks me off.
sorry, was still editing last post as I posted this
...that might be it. o.o
do you mind me showing what I have, then compare what I mite need from there?
Im not even planning on publishing, I just wanna have the option to do this tbh.
$PREFIX$ - This file tells the game which "path name" the pbo has
If you reference a file in the config or script you use that name like seen here if you look at the paths #arma3_gui message in the screenshot.
so this is honestly all that needs to be placed in the prefix file?
ngl the mikero tool pbo breaker bamboozled the heck out of me tbh
That's how i learned it, that's how it works for me.
Maybe there are other ways 
honestly your way may work better lol, im not too picky atm. I just want it to be able to run. XD
omg, mine is marked PBOPREFIX smh
heres hoping thats what the issue was
Depends on your packing tool also.
Some tools do it differently ^^
using base arma 3 tools, which I think has built in pbomaker
Prefix files don't have any effect once they're in the PBO. They indicate to some PBO packing tools what the prefix should be when it's built. Different tools have different methods of specifying the prefix.
The official tools just ignore them, IIRC. For the command line tool you specify the prefix on the command line. For the GUI tool it's in settings, and you have to change it for each PBO you build.
so what is it exactly that makes arma think "Aha, this is a font!"
bc I saw the half life 3 example and the comic sans one by nero, and I cant make heads or tails of what that it factor is. >.<
That's the CfgFontFamilies stuff.
The prefix is important because that's what sets the path that files in the PBO are placed at.
And the fonts[] line in CfgFontFamilies is pointing at that.
Read the "Addon Prefix" section there until you understand it. Might take a while :P
ik one version said something about the arma editor to check, but idk how to make the mod appear within the editor...ig my prefix is wrong, but idk how or where Im supposed to have it reference in arma
ah, noted. Been beating my head against this for about 10 days by myself, ran across that bit which is why mine is quasi-legible now. >.<
I'll look a 2nd time, sounds like its worth a shot
I don't think there's any way to browse the virtual file paths from inside Arma, so it's hard to debug.
You just have to understand the methods well enough to get it right.
fuuuuuuuuuuu @_@"
They probably don't give you any file browser functionality to protect the encrypted PBOs.
so we all suffer for that shit
editor->config-> double click gets partially there, but the big issue on my end is knowing where THAT connects in the irl windows folder.
Oh sure, you can check config. But not where the files ended up.
stg Im working backwards by reading from mods that work, feels like im trying to make an arma rosetta stone lol
So you can check that your config is pointing at /myaddon/myfont5 or whatever, but not where your font files actually are.
Although you can check using PBO manager. Click on that cog icon and it'll tell you the prefix of that PBO.
And then everything inside that PBO is relative to that.
...I mean I sorta understand protected pbos
but it feels wierd that UI/font is the cutoff for this angle ig. ๐คทโโ๏ธ๐
...fair point, ty, that might be what Im looking for.
ty to you and @placid hare for the assistance earlier, made my head hurt a little less and helped me over a hump, hopefully. :3
it could be scripted by using allAddonsInfo/addonFiles to list up all files in game in a tree view.
But its a bit of effort, and I haven't seen anyone do it yet.
It would probably be a nice tool to be in 3den Enhanced. Afaik that has a github with PR's open, if anyone has time for that ๐
I just open the pbo in Notepad++, the prefix is close to the top.
From there its pretty easy to figure out where the files are at, but you need a bit of experience for that
If its an option, you could also post your non-working pbo here and let someone else look at it
I have such a tool already kinda.
It allows you to browse sqf files, hpp, Inc etc.
Feel free to open a ticket on GitHub if certain files are missing.
Does anyone know where I can find the atak background paa file?
Is there a way to change aspect ratios for the pictures in CT_Tree / tree views or force them to respect aspect ratios? It seems like things work properly for listbox, but in tree view, they just all get squished into a 1:1 square.
Don't think so. Perhaps by adjusting line height. No clue if that is a thing for tree view though.
Try your luck if it does support ST_KEEP_ASPECT_RATIO (2048)
Didn't support it with the keep aspect ratio flag with or without the picture flag. :/
Then probably you're out of luck
Oh yeah I guess I can paste them on based on what I know about positioning and such
Was just hoping there would be a better solution
@placid hare @opaque crag I figured it out!
Apparently packing directly thru arma 3 tools-> addonbuilder directly doesnt account for the proper prefix...and won't even try to look for one either/ Using the packing tool THEN manually building the addon seemed to work with ^ the original suggestion bc the packer can actually find the prefix.
trying to redo it all now correctly, but thanks for explaining stuff yesterday-never would have gotten it without either of your assistances. ๐
now arma READS both the CfgFontFamilies AND the CfgPatches references! X)
It's not done, but at least ik where to put the code now and how to generally modify it...once I get that down its referncing the other fonts correctly, then im golden. :3 (knock on wood)
.
.
.
aaand now it places the replacement font in the right place it just won't show any font on screen.
.<
I would recommend using hemtt.
addon builder is bad packer.
Here's my repo with a mod that replaces the game font with monocraft, done with hemtt.
https://github.com/veteran29/VET_A3_Monocraft
holy crap, ty ty ty.
the HUD interface our unit is using is Purista, been working on trying to replace it. ty >.<
mikeros or hemtt
Iโve seen a few people use hemtt but not too widely spread tbh
https://brettmayson.github.io/HEMTT/ this is the user manual for hemtt
Everything you need to build Arma 3 mods with HEMTT
ty!
I managed to cobble together a halfway decent run at only the packing pbo portion of addon til now, and it worked...
here's hoping yours works even better-probably will install when I'm next free. (getting g a tad too sleepy now to work on it yet lol)
how do I point hemtt to the .toml folder?
keep getting
ERROR
.hemtt/project.tomlnot found
You don't. It auto detects it if it's in the correct path.
You don't need.
Just make sure you have in mod folder
.hemtt ,
Where you have project.toml
There are some examples on git for folder structure, or you can look up how like ace or CBA is done
@quiet arrow @solid gyro ty for explanation ๐
The manual should be pretty clear on it. If it isn't let me know how to improve it.
sorry for all the questions-tbh im more used to GUI based arma editing lol. ty for your patience so far and for helping out. : ,
hm...I have hemtt in the same folder, but gui wont activate...is it powershell only, or cmd line only?
ref'd the one you shared to see if I could at least open it, seems that unless (.\hemtt new ) cmd is used hemtt doesn't know where to look
Have you used Winget to install it? That's recommended.
Then you can start it from any terminal.
This is the server for hemtt. You can ask questions there.
Does anybody know what this
https://imgur.com/X9RJUvK
I want to access the CtrlList or whatever it is via scripting/config
To explain my goal. I want to assign the slot of a player based on a value I have stored, so need a way to access this list, so I can assign them if there is a BIS function that would be even better
Alternative method: A way to enable the autoassignrole from a script on a mission that may not have it enabled by default
my dumb self did not, ty for clarifying, and for the link.
All this stuff is heavily hardcoded, not sure how much you can control it with script
The display is RscDisplayMultiplayerSetup
idd=70
@hoary estuary know if thereโs a way to do this? But yeah I found itโs 70, 109 I can script highlight but not โassignโ unfortunately
ty for letting me see this btw-it helps alot with dipping my toes in the deep end. ๐ so far got the program to load, pack, analyze files and stuffs thanks to the help of every1 here so far.
Aiming to replace 2 fonts in arma's backend, PuristaMedium
and EtelkaMonospacePro...and your plans gave me quite the tip. : ,
got it working off winget, works off terminal now. had to fudge it manually but its running. :3
Ran across some code from an example, trying to understand what its trying to do tbh. >.>"
Is there any particular reason why
class CfgFontFamilies {
class EtelkaMonospacePro {
fonts[] = {[
{"prefix\Fonts\fontfolder\specialfont9", "A3\Uifonts_f\Data\Fonts\NotoSansCJK-Light\NotoSansCJK-Light6"},
...
{"prefix\Fonts\fontfolder\specialfont46", "A3\Uifonts_f\Data\Fonts\NotoSansCJK-Light\NotoSansCJK-Light46"}]};
};
is used when other instances
just outright use
class LCD14 {
fonts[] = {["comic_sans\Fonts\fontfolder\specialfont9"}, ...{"prefix\Fonts\fontfolder\specialfont46"}};
instead?
Ig im trying to grapple with this and 1+1 somehow = 3
(why for certain cases does it ref (replace value, orig), while others use just (replace value))
Why there are sometimes two fonts in the array, vs other times only one per element?
Maybe thse second font is a fallback of some kind
yep. was wondering if it was bc arma bs or something else
https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/master/addons/core/CfgFontFamilies.hpp
The TFAR font is even easier, it only has a single entry. Total.
asddfskjfksjflksdjfkljs
we're working with the Misriah armory HUD, and im looking into which is easier: remaking and repacking the HUD or trying to get my font to work. z.z
problem is that the hud itself directly calls the font types FROM the arma 3 cfgfont, and idk how to replace the references to that table in particular.
Ik the fonts to reference and T0bi managed to do it with comic sans so it's possible, but istfg the closest I got was Vet's example, which replaces everything correctly, but doest affect the HUD bc of how HUD calls variables
link: ||https://steamcommunity.com/sharedfiles/filedetails/?id=2579581237||
You'd have to edit all GUI configs that reference the Arma 3 font
ALOT of work
Or you replace the A3 font itself, which sounds messy.
fffffuuuuu
thats why I was hoping with the font itself, but damn.
...Or....Or I can load the mod and just not use their hud...make my own I suppose
their mod works, so I can use it as a ref. (to learn what font codes Id have to swap) hm.
blegh this is...quite a mess. <.>
GUI problem I haven't seen before.
And I don't know if there is a doable solution.
I have a text element. x=0;y=0;w=1;h=1;
It stretches over whole screen.
I want the text, to fill the whole width.
So if text is "A" the font size is large, so you get a big A filling whole width.
if text is "AAAAAAAAAAAAAAAAAAAA", the text is small, so that all characters fit in screen width.
I tried using getTextWidth to calculate what size it should be to fill the whole width.
But the widths seem erratic.
"A" getTextWidth ["RobotoCondensed",2.8] -> 0.793559 is full width
"AAA" getTextWidth ["RobotoCondensed",0.89] -> 0.756715 is full width.
"AAAA" getTextWidth ["RobotoCondensed",0.667] -> 0.756148
"AAAAAAAAAAAAAAAAAAAAAAAA" getTextWidth ["RobotoCondensed",0.1] -> 0.693797
I just want text to fill the whole width.
I know how to calculate a controls width from the text width. But how to do it the otherway around, calculate text width from control width
Maybe my mistake is not using a monospace font ๐ค
But I am testing with all the same characters, only A's so shouldn't matter?
1 / getTextWidth = ur answer, maybe?
1/0.8 is not 2.8
1/0.69 is not 0.1
https://forums.bohemia.net/forums/topic/174131-scaling-text-control/ seems others have attempted without solution.
ah, nvm >.> sorry
I've been trying to math this for hours now..
linearInterpolation was fail.
Collecting a dozen values, and calculating a polynomial curve out of it is quite close, but its still not right
And seems I'm doomed either way.
0.280495 is ok
0.280497 is ok
0.280496 makes the text be invisible...
And ofc that is the value the curve calculates..
Guess I'll have to use a hardcoded width per box time and live with it looking bad
The text on the bottom left and top left box, both have size 0.1 ๐
It would just be so much better, if it actually fit well.
Also the hidden selections for signage/symbols is crappy. The offsets are all weird..
I could make it all UI to texture, hardcode UV offsets and put text at right position over top of the original texture to overlay it anywhere.. uuugh
Now I kinda feel if we have more easier way to make fonts...
isnt there a tool for it
But painful. Especially we do CJK
I could make it all UI to texture, hardcode UV offsets and put text at right position over top of the original texture to overlay it anywhere..
Not even that. Plastic boxe's textures are hella weird.
Of the texture, only about half is actually used.
And conveniently, the center where I would like to put text. Is actually split in half, by the same part of the texture duplicated left and right.
So if I put text on the right side, it'll also be duplicated on the left.. And I can't put anything centered
I guess the texture is shared with the medium/small sized variants. That'd explain why only so little is used. But it foils my plans ๐
Not even duplicated... MIRRORED. AH
Even here getTextWidth doesn't work :/
Text that is one character too large and goes out of bounds, returns getTextWidth of 0.8, but the UI control is 1.11 wide and doesn't fit the text..
FYI in order to make CJK (Chinese, Japanese, Korean) font, you need to generate massive amount of characters to make it barely useable. About 10000, maybe more or less dunno. But apparently making FXY and TGA already takes a huge time and CPU, converting to PAA too. I recently made two fonts just to add semibold and bold fonts to NotoSans that is to fill up CJK, but that ended up about 500MB of PBO
I still don't know why falagor said it can't be done vanilla. /rant
ouch
Worst thing is, in vanilla there is no weighted NotoSans. Just one thin weight. Which makes nearly unreadable in certain condition
https://feedback.bistudio.com/T128076
Like seriously
Not to mention that there is no Italic or monospace or handwritten fonts too
Sidenote: 500MB is fairly reduced weight by using removing mipmaps from these PAAs (thanks to Ded's tool) so it is reduced by... about half?
TFAR's font was also quite big
then I deleted all files besides two, and it still worked the same as before ๐คท
cutRsc["moneyHUD", "PLAIN"];
(moneyHUD displayCtrl 1001) ctrlSetText "200"; ``` I'm calling this code in my initPlayerLocal.sqf file, and in my hud.hpp looks like this ```sqf
class RscTitles{
class moneyHUD{
idd = 1000;
onLoad = "uiNamespace setVariable ['moneyHUD', _this select 0];";
duration = 1e+11;
class Controls{
class moneyHUD: RscText
{
idc = 1001;
text = "";
colorText[] = {1, 1, 1, 1};
x = 0.0153125 * safezoneW + safezoneX;
y = 0.016 * safezoneH + safezoneY;
w = 0.12375 * safezoneW;
h = 0.077 * safezoneH;
};
}
}
}
``` It throws an error, saying it doesn't recognize the moneyHUd when i try to display control. Anyone know why? I tried adding it to the UInamespace, do i need to call UInamespace again on displayctrl?
implementing this fix seemed to do the trick ```sqf
uiNamespace getVariable ["moneyHUD", displayNull] displayCtrl 1001 ctrlSetText "200";
Never tried, but I know that working with engine-driven dialogs is often useless, you'll need to come up with hacky solutions for stuff to work
Is there some way to prevent a control group from taking priority over a CT_MAP_MAIN when it comes to mouse actions? I am attempting to have a controls group overlayed on top of a CT_MAP_MAIN but I am unable to RMB-drag the map around
I want the black box to basically be a non-interactive and not "commandeer" the mouse actions.
cutRsc may be a shout
I just decided to get rid of the ControlsGroup.
Nah I wanna know where the fox is from
lmao
https://opengameart.org/content/fox-and-shiba Should be this one
I use it as a arsenal box
splendid
Maybe its just easier to attach UserTexture1m to the surface of the box and have ui2texture on it
to avoid uneven ratio, mirroring, etc.
Most arma models are not designed for text in mind, lots of mirroring, stretched textures, angled textures, etc.
attaching user texture will only work for prefeclty flat surfaces with little bumps though
Probably but I'm concerned about perf
butting a texture on is one thing.
A new entity, that needs to be attached, simulated and network synced.. uff
createSimpleObject local=true
But yeah still its attached and won't auto hide with the object, etc., etc.
Gib entity decals 
Good day. I'm trying to use the GUI editor, but the following error keeps popping up:
XX:45:04 Error in expression <,"e","i","o","u","y"];
GUI_exportHash = format ["%1%2%3%4%5%6%7%8",
toupper (_al>
XX:45:04 Error position: <format ["%1%2%3%4%5%6%7%8",
toupper (_al>
XX:45:04 Error 6 elements provided, 7 expected
XX:45:04 File A3\functions_f\gui\editor\GUI_fnc_export.sqf..., line 462
Is this known? Will it be fixed? (No mods, Perf branch)
๐ค
I'd remove that error from format to be honest, so much backwards compatibility headaches are coming
@formal brook Add that error to the ticket here https://feedback.bistudio.com/T182822
Done, thanks
Cheers
Sorry if that's a dumb or often asked question, but if I created my UI in GUI Editor, how can I ensure it will scale properly for all the screen resolutions?
I added some defines as per the tutorial page
https://community.bistudio.com/wiki/Arma_3:_User_Interface_Editor
Would that be enough? I see it uses pixelW * pixelGrid combination
#define UI_GRID_X (0.5)
#define UI_GRID_Y (0.5)
#define UI_GRID_W (2.5 * pixelW * pixelGrid)
#define UI_GRID_H (2.5 * pixelH * pixelGrid)
#define UI_GRID_WAbs (0)
#define UI_GRID_HAbs (0)
IIRC pixelGrid is relative to UI scale
Ok. thanks
Might keep it profiling/dev only.
Normal players won't see errors on Screen anyways so whatevs
I still think this is excessive strictness, personally I got used to this relaxed requirements for arguments in format and often just comment out arguments or dont use provided arguments
You might intentionally do it wrong. Most people probably don't.
It wasn't wrong for years, I was just using this as a feature
My vote is to revert it or enable this strictness manually instead of by default
Should
cbChecked _ctrl
give an error if you are checking CtrlGroup (array) not Ctrl?
-debug only makes sense. Only enable it for developers
I still have flashbacks from the time waitUntil was changed to complain about nil
multiple gb rpts of fun
I want undefined variable reference errors in unscheduled in debug :P
addMissionEventHandler ["eachFrame" , {
if (!isnil {uiNamespace getVariable "BIS_dynamicGroups_display"} && isNil "GroupTagDialog") then {
GroupTagDialog = [] spawn {
disableSerialization;
private ["_display" , "_cntrlGroupEdit" , "_cntrlsquadDescription" , "_cntrlGroupList"];
_display = (uiNamespace getVariable "BIS_dynamicGroups_display");
_cntrlListboxGroups = _display displayCtrl 9877;
_cntrlListboxGroups tvSetSelected [[0], false];
tvCollapseAll _cntrlListboxGroups;
waitUntil {uisleep (1/diag_fps); isnil {uiNamespace getVariable "BIS_dynamicGroups_display"} };
GroupTagDialog = nil;
terminate _thisScript;
};
};
}];
I would like to automatically collapse dynamic group's group view.
However, the group tv collapses and expands automatically right away.
What could be wrong?
Hide top right status
This channel is not #arma3_troubleshooting
I gotchu
Anyone familiar with making vertical slider bars or standalone scrollbars? I'm not having much luck
https://community.bistudio.com/wiki/CT_CONTROLS_GROUP
Are you talking about these?
Ya I suppose so, I just want a vertical slider that the user can move and I can get its position value from
I tried something like this, with the vert part in style, but its still horizontl:
class RscSlidertest
{
idc = 1332;
x = 0.45 * safezoneW + safezoneX;
y = 0.4 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.02 * safezoneH;
style = "0x400 + 0x10";
type = 43; // this is the more "modern" slider. Type = 3 is the old dull one.
shadow = 0;
color[] = {1,1,1,0.4};
colorActive[] = {1,1,1,1};
colorDisabled[] = {0.5,0.5,0.5,0.2};
arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa";
thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa";
};
Type 43 is https://community.bistudio.com/wiki/CT_XSLIDER ๐
Ok? Should I be using a different type to make it vertical then?
import ctrlXSliderV;
...
class MySlider: ctrlXSliderV
{
...
};
Sorry, that didnt help. The only context im aware of import in is to import a variable and thats only available in dev rn
https://community.bistudio.com/wiki/CT_XSLIDER claims ...
Default scrollbars are vertical. Use ST_HORZ to change orientation.
... and the only place I can find a style like0x400is https://community.bistudio.com/wiki/Arma:_GUI_Configuration#CT_SLIDER_Specific_Styles, and that lists it asSL_HORZ.
You probably just need to get rid of that style ๐
import can be used in description.ext to load classes from global config into it
I tried it with this and it didnt work either, it actually didnt even show up anymore style = "0x00 + 0x10";
Thanks, not using description.ext though
Since you're using RscXXX:
#include "\a3\ui_f\hpp\defineResincl.inc"
import RscXSliderH;
...
class MySliderV: RscXSliderH
{
style = SL_TEXTURES;
...
};
This didnt show anything. I used this
class RscSlidertest: RscXSliderH
{
idc = 1332;
x = 0.45 * safezoneW + safezoneX;
y = 0.4 * safezoneH + safezoneY;
w = 0.2 * safezoneW;
h = 0.02 * safezoneH;
//style = "0x400 + 0x10";
style = SL_TEXTURES;
};
Plus the include and import at the top
Try with a larger value for h, maybe it's too small for a vertical slider ๐คทโโ๏ธ
Provide full file.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
The control is at the very bottom
I was able to get it to be vertical with the type=3, not 43 though unfortunately
Very strange. Only ctrlXSliderH worked for me.
I don't remember vertical sliders in the game. Has anyone seen them?
Well, seems like modern sliders can't be vertical.
Yes, only the old ones can.
I made a thread for it but we're having no luck in there, does anyone know how to hide these elements in the weapon status UI.
I have tried various display/idc combos and cannot get any to work.
im trying to do a hud with a minimap.
this minimap works fine, but i had some stuff to draw in it ( fist image)
In some vehicles it works fine, but in other dont, and the markers appear when im in pause menu.
i guess is the extra HUD of the vehicle from RHS, any way to fix this?
its just the RCS map, since i use the onDraw on the rscMap to update the other parts of the hud and it works
yea, if i turn out ( the aditional UI disapear) it works perfectly
ive tryed both ondraw and missionEventHanlder 'eachframe'
i guess i have that kind of problem that no one has lol
With 2.18 there is a new draw2D eh that runs after all UI was drawn. Give that a try
btw, I wanted to pop back in and thank you for your assistance-your mod works wonderfully. ๐
still working out kinks with hemtt, but font itself is 5/5. ๐
yea, or ill need some compat mod to modify the UI from RHS ( or just remove it).
The only problem with removing it, is that i lost the topright default UI for some reason
hmm...so I think I figured out what I needed to complete my modset, now it's down to implementing it...
looking into how to properly spit out a textbox (or three small ones) in a hemtt build, pass player variables from ace_medical to make this little addon work.
trying to pass ace medical
heart rate (_hrtBPM), blood pressure(_bloodPress), and how much blood is in the body (_blood)
I can get the debug menu to spit out the right values, but my main problem is applying them to the text boxes themselves, trying to do so via an Hemtt build-if I can get the files to match, at least I can build or test the dang thing accordingly. >.>"
Any pointers would be greatly appreciated.
||to prove im not just begging for ez help but actually did a decent amount of digging-what I have so far:
BASE SCRIPT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
_hrtBPM = round (player getVariable ["ace_medical_heartRate", 80]);
_bloodPress = (round (player getVariable ["ace_medical_bloodPressure", [0,0]] select 1));
_bloodLvl = player getVariable ["ace_medical_bloodVolume", 6.0];
_blood = round ((((_bloodLvl)* 100) / 3) - 100);
testString = "HR: "+str (_hrtBPM)+ " [] Blood:"+ str (_blood)+ " [] Blood Pressure: "+str (_bloodPress);
testString;
[round (_target getVariable ["ace_medical_heartRate", 0]), (round (player getVariable ["ace_medical_bloodPressure", [0,0]] select 1)),
(round (_target getVariable ["ace_medical_bloodPressure", [80,120]] select 0));BASE SCRIPT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
||
Goal is to split them amongst three text boxes and slap (while (player is not dead || not in map mode)) {display mod on init or if key is pressed}
I can work on the triggers but its the file crap that irritates me. >.>"
||love Kill Confirmed, but between licensing and how Hippo Edit doesn't cover the medical side I'm sorta starting from scratch...hence, ace_medical directly. Wanna test those 3 variables first, then see what I can add.||
@indigo cipher I think this may be the answer to your query, but I'm not really sure what your question is:
Define the text boxes in config (or create them with ~10 script commands each ๐คฎ) and update their text using https://community.bistudio.com/wiki/ctrlSetText.
completely unrelated but this looks like a cool project, nice work
thanks! im doing a "war thunder" gamemode to have some fun with vehicles
Yeye I figured, vehicle on vehicle pvp is so hard to balance and set up as a normal mission, having a preset mission is wonderful
is it compatible with like every vehicle or just select mods
im doing a config file where you can setup the vehicles you want, and the map it works with a few markers and thats it
wow thatโs really nice
define the boxes with an event handler, define with 1 calculation.
I need a visible way to prove debug code in GUI mode.
ik ill set other code in the background for the rest.
sorry for delay, only got free rn
well... can be better, but it works
class RscBlitzHud {
idd = -1;
onLoad = "uiNamespace setVariable['RscBlitzHud',_this # 0]";
duration = 1e+6;
fadeIn = 1;
fadeOut = 1;
class Controls {
class blitz_header_text: RscText
{
idc = 1000;
text = "Blitz Info";
x = 39 * GUI_GRID_W + GUI_GRID_X;
y = -14 * GUI_GRID_H + GUI_GRID_Y;
w = 14.5 * GUI_GRID_W;
h = 4 * GUI_GRID_H;
colorText[] = {55,96,0,0.75};
sizeEx = 4 * GUI_GRID_H;
};
};
};
text doesn't appear when using cutRsc ?
ui var gets set. What gives?
Are all the macros are defined? Text not appearing usually is caused by the sizeEx not being set correctly.
yeah macros are set properly
Okay, so it's not pure RGBA it's a Arma format
how do you mean?
if you want to use rgba format, the standard one than writing it as division is the closest you can get
colorText[] = {55/255, 96/255, 0/255, 0.75};
Oh yeah of course sorry I misinterpreted what you said
are math operators evaluated in a class like this?
yes
okay sweet
cutRsc ["RscBlitzHud","PLAIN"];
anythign wrong with this? Don't think it explicitly needs a layer given?
Should be fine.
Weird, and yeah I see the RscText class defined and all it's properties in the config viewer underneath my missionconfig
is it in RscTitles?
.hpp file containing the resource class and controls is insde of (description.ext)
class RscTitles {
#include "blahblah"
}
So weird. I don't understand. I'm gonna double check that not only RscText is defined but then the resource yeah
yep it's there!
D:
Do the properties look like on my screenshot?
Nope, macros are busted
don't you need to define titles? ```
class RscTitles
{
titles[]={RscBlitzHud};
w t h
that's a good point but R3vo I believe used the given class and it worked. But idk
class RscTitles
{
class RscBlitzHud
{
idd = -1;
onLoad = "uiNamespace setVariable['RscBlitzHud', _this # 0]";
duration = 1e+6;
fadeIn = 1;
fadeOut = 1;
class Controls
{
class blitz_header_text: RscText
{
idc = 1000;
text = "Blitz Info";
x = 39 * GUI_GRID_W + GUI_GRID_X;
y = 14 * GUI_GRID_H + GUI_GRID_Y;
w = 14.5 * GUI_GRID_W;
h = 4 * GUI_GRID_H;
colorText[] = {55/255, 96/255, 0/255, 0.75};
sizeEx = 4 * GUI_GRID_H;
};
};
};
};
are the GUI_GRID_W,_H,_ETC supposed to resolve to the safezone values like you have in your example ?
because yeah that's exactly what I have
yeah, I only ask that because I didn't know if the config viewer interpreted values or it gets "transpiled" at runtime
Perfect ๐
I appreciate the patience. Haven't touched the editing side of a3 since 2018 ๐
Don't worry. We've all been there
Sorry, I don't really understand what you're trying to tell me.
if you only need stuff during debug, it may be easier to just load Advanced Developer Tools and create some watch expressions 
ah, that's on me. >.<
tldr I can sorta understand the coding aspect, but I'm having a hard time understanding how to convert my things into the GUI structured text type.
I can test code in debug menu, but I'm trying to make it appear on screen.
naw, issue is making the working code appear on screen in a GUI structure, not debug-but ill SS ur tip. good idea regardless ๐
@strange arrow think I forgot to ping you-my apologies
https://community.bistudio.com/wiki/composeText/https://community.bistudio.com/wiki/formatText to create Structured Text contents 
So you have some controls that can render structured text on screen (i.e. controls with type CT_STRUCTURED_TEXT) and you are having trouble creating / previewing those controls in the editor?
(hidden to save ansin from looking at code-created GUI control)
minimal-ish code example of creating a structured text control and updating its contents each frame 
||```sqf
private _stextbox = findDisplay 46 ctrlCreate ["RscStructuredText", 42070];
_stextbox ctrlSetPosition [0, 0, 0.2, 0.2];
_stextbox ctrlSetBackgroundColor [0, 0, 0, 0.5];
_stextbox ctrlCommit 0;
addMissionEventHandler ["EachFrame", {
findDisplay 46 displayCtrl 42070 ctrlSetStructuredText composeText [
str velocity player, lineBreak,
str vectorMagnitude velocity player, lineBreak,
str direction player];
}];
not much trouble previewing the physical structures as in knowing how to properly encode it to spit out the result of My Function to the screen.
It would be the equivalent of knowing your home language and being able to read another language, but not yet write it...I don't know the gui outputs well enough to know what wouldwork and what wouldn't.
that...tyvm for the example, it helps immensely.
ty to ansin as well for trying to help me understand the issue better too. ๐
man, that looks awesome. :3
planning on publishing, or keeping it a private script? would download the heck outta it.
yea the code will be public probably, but ill host a few events too
noice, congrats, dude :3
ive just found this command: https://community.bistudio.com/wiki/ctrlMapDir
this mean i can rotate the minimap? 
No, but you can get the angle at which the minimap (GPS) is rotated.
oh, the GPS is in engine, not a rscmap with scripts on it ๐ฆ
well, i keen investigating, and still cant find a solution to it.
the display that is on top is uiNameSpace getVariable "RHS_compass_Ctrl";
with that i added a minimap with ctrlcreate and still dont work.
the ondraw eventhanlder is trigged fine, but i cant use drawicon in the map for some reason
well... the solution is not use execvm in the ondraw eventhanlder 
When using this include to use these macros, the addon builder complains that it cannot find this file to include. Is there a workaround to prevent this, or do I just have to make a copy of this file to include in my mod?
#include "\a3\ui_f\hpp\definecommongrids.inc"
i dont understand how can addon builder look for includes
ok sorry i didnt know that was possible. I thought the errors only came when running the addon
Depends if you binarize.
If you binarize, addon builder needs access to every file you #include.
Hence all that P drive stuff.
shouldnt the path start with \a3
it does
oh i was looking at the screenshot
If you don't have a lot of config then you could just turn off binarization.
I am currently just putting that file in the mod itself, in a "depends" folder
was just curious if there was a cleaner way to do it
I don't know about "cleaner".
Options are:
- Extract the required bits of Arma to a (P) drive.
- Make a local copy of the file.
- Turn off binarization.
I can only recommend forgettin about addon building and use hemtt instead
Hmm. That's kinda fundamental though, isn't it?
Whatever binarizes config needs access to the includes.
Yeah, you just (by default) put it in a folder called include and then match the folder structure
{
idd = 19935;
enableSimulation = 1;
movingEnable = 0;
fadeIn = 0;
fadeOut = 1;
duration = 1e+11;
onLoad = "uiNamespace setVariable ['KRM_Garmin', _this select 0];";
class ControlsBackground
{
class GarminImage: RscPicture
{
idc = 22000;
text = "\x\krm\addons\watch\UI\watch_garmin.paa";
x = "0.0328437 * safezoneW + safezoneX";
y = "0.622 * safezoneH + safezoneY";
w = "0.225 * safezoneW";
h = "0.4 * safezoneH";
};
};
class Controls
{
class GarminTime: RscText
{
idc = 19800;
text = "12:00"; //--- ToDo: Localize;
x = "0.104 * safezoneW + safezoneX";
y = "0.8058 * safezoneH + safezoneY";
w = "0.061875 * safezoneW";
h = "0.033 * safezoneH";
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = "2";
};
};
};```
For some reason, whenever I pull up this group, it always has the GarminImage above the GarminTime text, despite being under controlBackground. I know both exist because I can pull up the group in the GUI editor and see both elements, just that GarminImage is covering GarminText. Any ideas on what is going on? I've been at this for a while and am starting to pull hairs
Try to reorder of controls classes. Or place control classes in one group.
Iโve already done that and it doesnโt seem to make a difference. Iโve already tried putting them both under control and under controlBackground with no effect
The reordering does nothing as well
have you tried without the GarminImage? to see if text shows up
Yeah, without it the text shows up with no issue
Yeah
The weird thing is that I can put other UI elements on top of GarminImage no problem, but only when they are RscPicture
RscText and RscButton always get pushed behind it
well this is just guessing but try without these: ```
enableSimulation = 1;
fadeIn = 0;
fadeOut = 1;
i always use 3700 idc for backgrounds but no idea if that matters
I mean it shouldn't. They are high enough IDCs and I'm testing only with this, ACE, and CBA so nothing should be up there
try without mods?
The thing is I can even mirror the ACE RscTitles setup for the altimeter and it still doesnt work
I can't, ACE and CBA are required
ok
I am working with a HUD based entirely off of images and there is a problem where the whole HUD flashes when a new image is loaded for the first time, is there any way to prevent this? Do I have to do some trickery where all the images are always present off-screen so they are ready to be used without any loading?
huh weird, you could set the images alpha to zero at start and then back to 1 when images are loaded
Try to load them off screen first.
maybe the code isnt working fast enough you could try using isNil to run the code instantly isnil { // Image load code here };
ST_PICTURE doesn't support shadow=1;, right?
how to disable blur off when opening video options ? Tried to modify RscDisplayOptionsVideo script and its display by deleting these lines from original script
'dynamicBlur' ppEffectAdjust [6];
'dynamicBlur' ppEffectCommit 0.0;
'dynamicBlur' ppEffectEnable true;
but it doesn't help
perhaps just change effectenable to false
doesn't help
Do you guys have any advice?
I'm having a helluva time with gui for my current project trying to port sonoran cad from gta 5 into arma... and my current pitfall has been the gui.
Are there any tools other than the in game gui editor that work well?
-# ping me... thank you.
People usually write config by hand through text editor. That's the most efficient way
I guess its time to learn how to do that.
I just hope it doesnt feel like slamming my regions into a door stop.
That's learning to mod arma, and even worse with GUIs
Bout to go on fiverr or something... ive been tackling the gui stuff for way to long and the most progress I made was by committing sin by asking chatgpt for help (which worked more than I thought- but still failed to yield desired results)
You'd be breaking the A3 EULA
Only if you were paying someone to use Arma tools, which shouldn't be relevant here because the Arma tools for writing UI are useless.
I guess it depends on whether they mean actual textures or config. I assumed config.
Which pretty sure was ruled that if it was used in-game, such as to see if it's actually looking as expected, means you can't sell it
Nah, the Arma 3 EULA doesn't mention anything about user-created content. Only the tools EULA does.
Good luck finding anyone willing to write Arma UIs for peanuts though :P
You'd have to pack the addon with the tools though
Although there are better non-A3 Tools options for building a mod
you can do it in description.ext
Fair point
Arma 3 EULA also forbids commercial use of the game itself.
But if someone wants to pay for a untested GUI, sure.
I'm feeling like I would be able to write fully working GUI without launching testing in the game if it wouldn't be overly complex ;d
GUI grid is not that hard.
You kinda have to when you're writing mod UI :P
anyone know hint type message that's always shows on top?
The class of it?
i mean some function that does that (creates message on top)
class timerHUD
{
idd = -1;
onLoad = "uiNamespace setVariable ['timerHUD', _this select 0];";
duration = 1e+6;
class Controls
{
class RscText_1000: RscText
{
idc = 1000;
x = -27.5 * GUI_GRID_W + GUI_GRID_X;
y = 6 * GUI_GRID_H + GUI_GRID_Y;
w = 10.5 * GUI_GRID_W;
h = 3 * GUI_GRID_H;
colorBackground[] = {0,0,0,1};
text = timeLimit;
};
};
};
};
``` I defined my timerHUD here, and i want to display it but it doesn't seem to show.
cutRsc ["timerHUD", "PLAIN"];
any ideas?
Firstly, make sure your config is actually loaded
Yep itโs loaded in my .ext file
Check that it's actually loaded into config with config viewer.
You can also check there that the macros are working.
What is RscText? Is it default imported class or customly defined one?
Also text = timeLimit; doesnt seem right
It was a default imported class
Oh awesome, I've never heard of this tool before.
Interesting, I found that when i looked under my config viewer in RscTitles I see the class
However now it's displaying in game so I'm kind of confused there, however when I try to edit it's position etc. it doesn't seem to work.
Here's what it looks like within the config viewer.
Both huds are loaded, the timerHUD displays, however percentageHUD does not. I made sure to also put it in it's own layer with cutRsc ```
percentageLayer" call BIS_fnc_rscLayer) cutRsc ["percentageHUD", "PLAIN"];
How are you testing?
If you're using a mission in Eden to test (which is recommended), you need to return to the Editor and then go back to the mission preview again to apply config changes.
Yeah Iโm testing using Eden, returned to editor and reloaded mission and no dice
some of the mods on active deletes logo in mainmenu
but i want to change that logo in my config
here is my config
can i override my config or any other solution?
https://community.bistudio.com/wiki/CfgPatches
"requiredAddons is the most important setting, because it defines the initialization order of addons. "
Try change this.
https://community.bistudio.com/wiki/Class_Inheritance#Addon_Loading_Order
requiredAddons[] = {"A3_Data_F_AoW_Loadorder"};
Should do it for the main menu.
I think this would be the right place for this question:
I'm adding a command to shoot at a target with a given unit's underbarrel GL. I added a command to RscMenuEngage via a mod that calls a script sqf. How can I pass the location data, that being from the map or the player's crosshair, to the script like the default commands do?
idk how default commands do it but you can get object pointed by cursor with cursorObject command
That only works for objects, not positions. Currently, im using lineIntersectsWith to return the first collision from player eyePos to screenToWorld [0
5,0.5] which works, but obviously not from the map.
Incidentally, im also spawning an object for the unit to fire his launcher at, and a separate issue is he'll only shoot to about 75 meters because I think he can't detect it beyond that range. I'm using the signSphere10cm for testing.
screenToWorld it self should give you surface pos
Only terrain, not objects or buildings. A classic example is, if I'm pointing at an enemy skylines against a hill, screentoworld will return a position arbitrarily thousands of meters away.
Same goes for buildings, it'll return the back yard of a house instead of the front door, that kind of thing.
have you tried lineIntersectsSurfaces? theres lot of different intersect commands
Yeah, come to think of it, that's the one I'm using. Let me post the script:
ugl_command_fire_ugl =
{
params ["_group_units","_position"];
{
private _aiUnit = _x;
//private _worldPos = _this select 1;
_ins = lineIntersectsSurfaces [
AGLToASL positionCameraToWorld [0,0,0],
AGLToASL positionCameraToWorld [0,0,1000],
player
];
//hint format ["%1",player distance (_ins select 0 select 0)];
private _worldPos = _ins select 0 select 0;
_target = "Sign_Sphere10cm_F" createVehicle _worldPos;
_target setPosASL _worldPos;
_aiunit doTarget _target;
_aiunit lookat _target;
_aiUnit doWatch _target;
_aiUnit reveal [_target,4];
private _grenadeLauncher = primaryWeaponItems _aiUnit select 1;
_aiUnit setCombatMode "YELLOW";
_aiUnit selectWeapon _grenadeLauncher;
_PrimWeap = primaryWeapon _aiUnit;
_primMuzzles = (getarray (configfile >> "CfgWeapons" >> _PrimWeap >> "muzzles"));
_muzzle = _primMuzzles select 1;
_aiUnit selectWeapon _muzzle;
_aiUnit doTarget _target;
_aiUnit commandFire _target;
sleep 5;
deleteVehicle _target;
}forEach _group_units;
};```
It's still messy since it's just in testing, but it shows the full method. In config.cpp I'm just calling preinitializing the script and calling it with
expression = "[groupSelectedUnits player,screenToWorld [0,0]] spawn ugl_command_fire_ugl";
In the expression screentoworld[0,0] is a typo, but if you look at the script I'm not actually using it.
I would expect the command menu to pass the location information by default, I just don't know how to access it or which argument it would be.
one thing I noticed is that your doing _worldPos but the command returns intersectPosASL
Yeah, I haven't gone back and cleaned up the naming convention yet, it's mostly a hodge podge of script fragments from around the internet of people doing other things I can steal from.
you need to convert the pos to ATL, with ASLtoATL command
I've got the position working fine, it spawns the sphere object exactly where I'm pointing on terrain, objects, units, or buildings.
I just don't want to have to use that method because it can't be used from the map.
ok
i think youd have more luck asking this in scripting channel, Im bad at vector maths :/
@idle trench write _this in expression and check results
expression = "Diag_log _this;hint str _this";
I think this is what you are looking for.
https://community.bistudio.com/wiki/showCommandingMenu
ps.
I check and _this no work in comMenu
hint str [_target,_pos,_is3D]
in expression
So maybe the default commands use the same method I had, but also check to see if the player has their map open, and if so use something like
ctrlMapScreenToWorld getMousePosition?
Oh wait, that seems to work
Does it work if you're not in the map? I.e. looking at a building?
MY_MENU_inCommunication =
[["User menu", false],
["First", [0], "", -5, [["expression", "hint str [_target,_pos,_is3D]"]], "1", "1"]
];
showCommandingMenu "#USER:MY_MENU_inCommunication";
Check all what you need.
Damn, that's awesome, thanks!
On map _target work only on icons
I'm at work and can't try it myself RN, can you createVehicle at those coords to make sure it's colliding with the tent and not given the location behind it?
Okay, I don't actually need _target since the goal is specifically to engage on a position.
Alright, thanks. At least that's a step in the right direction.
But the center may not be in the real center... the sphere of TP in the door
Oh, okay. _pos muat return the object's position of there is a target.
Splendid camera key space teleport work better for seek cursor position. But need find this script 
Haya! I'm trying to get a setup script to run on a vehicle only when a checkbox is ticked. I've set up an attribute in 3den, and I've got the script running, but I am unable to pull the data from the other two attributes to send to the script. Does getVariable work to get other attributes from within an attribute expression in 3den?
expression = "if (_value) then {[_this, _this getVariable 'AircraftImpulseMaxSpeed', _this getVariable 'AircraftImpulseStrength'] call HYCK_fnc_setupAircraft}";
``` The `_value` is a Boolean
Also, is it possible to only execute the expression if it's loading into a mission, rather than also executing in editor?
Should I use get get3DENAttribute instead?
For context, usually I'd be calling that function in the initServer.sqf as [aircraftVar, 100, 20] call HYCK_fnc_setupAircraft;
do you set in attributes your values like
Yes you can.
class myClass {
displayName = "myClass";
tooltip = " myClass Tooltip";
property = "myClass";
control = "Combo";
expression = "_this setVariable ['%s',_value];";
defaultValue = "false";
typeName = "BOOL";
};
here
class AircraftImpulseStrength
{
displayName = "Aircraft Impulse Strength";
tooltip = "The strength of the impulse. The higher the number, the more the boost.";
property = "AircraftImpulseStrengthID";
control = "Edit";
expression = "_this setVariable ['%s',_value];";
defaultValue = 20;
unique = 0;
validate = "number";
condition = "objectVehicle";
typeName = "NUMBER";
};
class AircraftImpulseMaxSpeed
{
displayName = "Aircraft Impulse Max Speed";
tooltip = "The maximum speed in m/s that an aircraft can reach using the impulse boost.";
property = "AircraftImpulseMaxSpeedID";
control = "Edit";
expression = "_this setVariable ['%s',_value];";
defaultValue = 100;
unique = 0;
validate = "number";
condition = "objectVehicle";
typeName = "NUMBER";
};
class AircraftImpulse
{
displayName = "Aircraft Impulse";
tooltip = "Whether or not the vehicle can use the aircraft impulse.";
property = "AircraftImpulseID";
control = "Checkbox";
expression = "if (_value) then {[_this, _this getVariable 'AircraftImpulseMaxSpeedID', _this getVariable 'AircraftImpulseStrengthID'] call HYCK_fnc_setupAircraft}";
defaultValue = false;
unique = 0;
validate = "none";
condition = "objectVehicle";
typeName = "BOOL";
};```
Do you change those or not?
if you dont , unchanged values does get saved.
so you should get "default" value
I changed the property names so they're not the same as the class names, that's all.
That's the issue, I don't seem to be getting any value.
expression = "if (_value) then {[_this, _this getVariable ['AircraftImpulseMaxSpeedID',100], _this getVariable ['AircraftImpulseStrengthID',20]] call HYCK_fnc_setupAircraft}";
I changed the attribute values in editor and it still doesn't seem to be getting any values.
I'll try the defaults for getVariable rq just to make sure that my script works even if the get variable doesn't.
Works fine with the default values from the getVariable, but doesn't update the strength and max speed when I change it in editor.
then test if you get those variables in function not in expression
and test with after that with little delay if it doenst work without delay
Well it's giving me <null> for the variables I'm getting atm.
what exactly is %s saving as
The display name?
The property?
What is the "attribute config name" exactly?
ok so getVariable doesn't seem to work inside of the expression.
ah it does seem to work
very odd.
so the %s in the expression seems to be the class itself, not the property.
is there any way I can make the rows in my RscListNBox have alternating background (not text) colours? without it, the readability of my scoreboard is a little difficult:
Row or column? For column, it's as easy as making RscBackgrounds. For row... I guess you want a very overcomplicated script
well shoot, I suspected it'd be possible as there's an old UI screenshot in the game files showcasing this (for anyone curious, a3/ui_f/data/GUI/Rsc/RscDisplayGameOptions.paa):
but I'll gladly accept all the help I can get - how would I make the columns have individual background colours? I'd have to split the listbox into multiple ones, wouldn't I?
Nuh. Just make multiple RscBackgrounds in the background of the ListNBox
Look at Arsenal's Template or Presets menu, it's simple as that
This TBH reminds me of, it could be a very niche idea/command to have. Deeedmeeen?
I guess lnbSetBackgroundColor/lbSetBackgroundColor?
that would be lovely, as I'm already populating my listbox via script ๐
I ended up putting background lines manually and moving scrollbar to controls group to achieve that
Good thing is you can EventHandler it, bad thing is you need to EventHandler it
Yeah, wish there way a way to set background color to each row, column or even cell
Also keep it mind that rowHeight may not be equal to real height
CONTROL lnbSetBackgroundColor [ROW, COLUMN, COLOR]
Yeah, ended up having this problem, didn't get to fix it yet
You can fix it actually
Yeah, I remember talking about it here some time ago, it need some rounding when calculating row Y
It is basically because the height is rounded into pixel
So subpixel height is not considered and rounded into the actual pixel
CONTROL lnbSetBackgroundColor [ROW, nil, COLOR] => Set row color for all cells
CONTROL lnbSetBackgroundColor [nil, COLUMN, COLOR] => Set column color for all cells
CONTROL lnbSetBackgroundColor [ROW, COLUMN, COLOR] => Set individual cell color
CONTROL lnbSetBackgroundColor [ROW, COLUMN, nil] => Remove individual cell color
One can dream...
This. Oh you even replied to this topic. You forgo ๐
sending nil could be bad though as it can get there as a result of an error rather than intent
Oh yeah
I changed my LNB to work with custom pager rather than scrollbar so its not as noticeable as it was before
might fix it properly one day
well, at least it's reassuring knowing I'm not going insane and just not seeing an obvious solution to this - cheers ๐
Nevermind, it is very noticable if you know about it
There, perfect now
#define SCORE_ROW_HEIGHT (round(A3_SIZE(0.9) / pixelH) * pixelH)

?
Nice icon face)
follow up on my previous posts - I've added column highlights and it seems to me that this is good enough to enhance readability, especially when combined with the player and squadmate highlighting:
I find it interesting how a few small tweaks can have a fairly significant effect on overall readability
UX is an art
Make one list de-select another list when selected
So you only have single line selected between two lists
lnbSetCurSelRow -1
oh I won't need to, right now both lists show all units on the map for debug purposes (eventually each unit will only ever appear in one list), so that won't be a concern ๐
yeah, sure is - I'm not looking forward to redesigning my spawn menu once this is done; you can tell it's way older ๐ฌ
alas, at least it works, so it gets the job done
how save show parent display in createdisplay ?
I want new windows to appear on top of the parent display.
im not proud of the time i spended on this thing lol
beatiful af
Is there a way to get multiple selections activated in unit attributes?
Tried with CT_LISTBOX + CT_MULTI
Tried with LB ..
Only get 1 activated at time.
For example roles are done columns = x,
Strings [] = x,
..
So just wanted to do East, west , independent and civ.
Boxes/ icons and I want be able to select 1-4 sides , and after that figure out how to get these saved etc.
@solid gyro Are you building a custom attribute control?
Yes, if I can't find an existing solution
There is no exsting solution for that.
Easiest way would be to have a control with 4 checkboxes.
I have done a couple,
But I just don't know how to setup this kind
Could those be added to the row in one "Ctrl"?
Like create a Ctrl group and handle the position of the boxes in there?
And yes.
That should be an easy way to do that
If you happen to own Spearhead 1944, check out the custom attributes. I did a few custom controls, including multiple checkboxes, tables etc.
Awesome
Thanks
Hi I'm looking to create arma 3 scenarios anyone can help?
- Don't ask to ask just ask
- Is this GUI related
he posted in many channels and pm'd people. he wants someone to modify kp lib for him so i sent him to creators recruiting
Hello, I tried to find a lot of documentation, but after trying a lot of things, I rely on your knowledge!
I'm looking for a way so that even with an open interface/dialog, my player can move around.
Or at least be able to use Taskforceradio to talk.
I created a fairly complex radar, and therefore, to report positions, it would be nice to be able to communicate with the members of your team :).
Thanks for your answers guys !
you could create overlay and start it with cutRsc command. then you can still move around
I will try this, thanks !
I tried, indeed I can move, but I no longer have access to my interface buttons. I think there is no "mixed" solution, too bad! Thanks for your help anyway!
how rangefinder works? I find no function or script in config,
some old forum says its on GUI configFile >> "RscInGameUI" >> "RscOptics_Rangefinder" >> "CA_IGUI_elements_group" >> "controls" >> "CA_Distance"
so if i define a class with idc = 151 or idc = 198 then it will work magically...?
Yes
thanks
Hello, how might I set about making a UI dialog that scales properly with different aspect ratios?
I've been trying to wrap my head around making them with Pixel Grid System but I honestly have no clue how I am supposed to translate coordinates from in-game GUI Editor to pixel grid values.
The GUI editor is obsolete. It doesn't support pixelGrid out of the box and afaik also not anchoring stuff to savezones.
I'd recommend to look for an existing UI, copy it's config and macros and start from there.
Modify and copy existing controls etc.
Understood, guess I'll have to reverse-engineer and trial-and-error my way forth.
Fastest way is it to create the UI in a description.ext. Then you can make changes in the text editor, save the description.ext, save the mission in eden editor and show the UI via script.
That's way better than my idea, thank you R3vo.
For macros you might be interested in this file a3\ui_f_decade\ui\macros.inc
It contains basic grid macros that are used in eden editor
Got it, thank you, I'll have a look in there.
You can include the file in the description.ext via #include "\a3\ui_f_decade\ui\macros.inc" just in case you don't know