#arma3_gui
1 messages · Page 3 of 1
I see. Thanks for the help!
From https://community.bistudio.com/wiki/CT_BUTTON:
If you want to add an image to the button check out CT_SHORTCUTBUTTON or RscActivePicture instead.
Curious then, how is it this works, what is the difference?
class PRE_PictureButton : PRE_Button {
style = ST_PICTURE + ST_CENTER + ST_VCENTER + ST_KEEP_ASPECT_RATIO;
// ^^^^^^^^^^ (?)
};
class PRE_inventoryMgr_btnSearchBase : PRE_PictureButton {
text = "\a3\ui_f\data\gui\rsccommon\rscbuttonsearch\search_start_ca.paa";
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (?)
};
or would I need to include those assets as part of a rsc addon or something in order for this to work as such?
either way, I'll look into the RscActivePicture approach. pretty sure I'd done it that way in another area anyway.
thanks again...
What is the type of PRE_PictureButton?
type = CT_BUTTON;
which is a real head scratcher... wondering if A3 sees the rsccommon differently somehow...
In that case I have to agree 😄
anywho going the RscActivePicture route...
got 'er sorted and starting to see some sensible, if measurable results.
fun fact, one strategy I am using more of is a sort of Occams razor logging approach, documenting config xywh dims. finding that very useful isolating geometry issues.
Howdy, do I need to convert my mod config from CPP to BIN? Or can I just keep it CPP and if so, will that cause a bunch of issues?
Someone who knows better correct me if I'm wrong, but keeping it as a cpp just makes it slower for the engine to read. It does keep it in an editable format though which can be handy
IIRC there are some specific things that need to be binarized (animations? not sure) but it depends what your mod is doing.
If you're using __has_include to do runtime dependence on loaded mods then you can't binarize.
For most things it doesn't matter other than being slower.
Hey guys I'm new to GUI editing so bear with me, thanks.
What I'm trying to do is make a "radar screen" that correlates to the entities on the real map but, crucially, does not display an actual map. I've inherited ctrlMapEmpty and set all the colors to transparent which does the trick mostly, however I still get a few very annoying location names like bays, airfields and small towns floating freely in the big void. Anyone got a hot take on how to get rid of these as well?
Thanks in advance!
P.S. please tag me if you respond so I see it
@brisk hemlock You can hide locations with the createLocation alt syntax + setType "Invisible", although this would likely hide them on the map as well.
Okay I'm looking into that right now. Seems like a Plan B type of solution, sure I can restore the locations when I close the UI but it's a hassle storing all the locations and types to restore etc
I find it baffling that I can hide every element of that map except those few location names...
Edit: I managed to pull it off by simply drawing a rectangle the size of the map over the map itself filled with background color :3
Next question: anybody know how to automatically orientate the map to player dir like the minimap?
Q: is it possible to show a tooltip for idcLeft and idcRight buttons supporting for instance CT_LISTNBOX controls? do I need to not set the tooltip for the row?
_leftCtrl = display displayCtrl idcLeft;
_leftCtrl ctrlSetTooltip "tooltip test";
``` Idk but you could try getting the left/right controls first like above and then try setting the tooltip
yeah I ended up going that route, tooltip for the row indicating the overall left/right state, i.e. "local profile", "Shared snapshot", "Shared snapshot by others", along these lines. works decently. along the lines what one might find in an arsenal loadouts list, except for inventory cargo profiles.
Q: working on a UI with some CT_LISTNBOX controls, starting to get some live data in there, so far so good. and it is a long list, as expected. I scroll wheel up and down no problem in and of itself. but I am also engaging a camera view, which I want to prohibit zooming behavior while the lists a responding. so I handle the list and/or mouse scroll wheel events in order to prohibit that from happening?
You can check the focus I think
If not check inArea
I'm not sure I follow, in which control and/or display EH code? IIRC, returning BOOL whether the event required further response, i.e. from a camera, yes?
i.e. the mouse Z changed EH(s)? for what, DISPLAY? CONTROL(s)?
conversely, camera EH is beyond the immediate scope of necessity, IMO, that's the last thing I want to get into for this purpose, I think, if it can be contained in either a DISPLAY and/or CONTROL EH.
I think I got 'er sorted, although to clarify, in this instance, it is a GUI display with a camera, for perspective, not the other way round.
ended up putting onMouseZChanged EH on the relevant controls and toggling camera manual on/off within.
for my edification, trying to understand a bit better, the default camera control is what automatic (?) i.e. "manual 'off'" in terms of camera commands? which would make sense in the scenario above which I solved.
Q: is it possible to gain image resource dimensions from scripting commands or BIS functions? got a scenario in which would be interesting to know aspect ratio in order to potentially gauge CT_LISTNBOX column widths, size to fit, along these lines.
couple of cases in point, i.e. for long arm rights and such, bit wider image than, say, backpacks or vests, along these lines. size to fit would be fantastic in these scenarios.
another possibility is that I use CT_LISTBOX instead of CT_LISTNBOX. for instance, if I set the picture for a row, does that respect the width automatically, and left align the text abutted to the right of the image?
similarly for the picture right... the challenge in either scenario being, I am also leveraging the idcLeft/idcRight controls, so don't know if there is something latent there that could conflict.
Q: is it possible to gain image resource dimensions from scripting commands or BIS functions? got a scenario in which would be interesting to know aspect ratio in order to potentially gauge CT_LISTNBOX column widths, size to fit, along these lines.
getTextureInfo
works great. the math is a bit tricky. aspect ratio this, relative ratio that, throw in a coefficient for good measure. but works quite nicely.
troubleshooting some control dims, left hand sidebar left aligned, right hand sidebar, for the most part right aligned, and as far as I can tell the x coordinates are all correct. But there is this mystery vertical scrollbar gutter which seems to be jutting out to the right, which I rather want it within the bounds of the CT_LISTNBOX. checking the actual dims as the "onLoad" EH are resolved so I can verify I am not lying here, but maybe something will jump out at me there, I dunno.
https://pasteboard.co/SmSvgrM7ew2b.jpg
verified in my logs, the right hand sidebar control dims, x, y, w, h, for the controls in question, all agree, width to width, x coord to x coord. So how/why the scrollbar gutter juts out to the right, do not know, at the moment.
the goal there is for the category list on the right to look and feel like tabs, in much the same way those on the left hand sidebar are doing.
wonder if there is some scrollbar attribute, style perhaps, that is smart enough to detect left/right screen edges (?), it is a wild guess.
hmm another thought comes to front of mind, I'll check the background...
that's it, and a couple of root dims influencing that arrangement.
Q: about CT_CONTROLS_TABLE, but on closer review, I'm not sure this is quite the right fit, but will see...
I have a case that it does need to behave like a CT_LISTBOX, each row being one distinct element in a rendered view behind.
But further, I have from 2-3 templates that I might like to represent a bit differently for each template.
I may be able to reduce one of the cases from 2 to 1, possibly, but that's TBD.
https://community.bistudio.com/wiki/CT_CONTROLS_TABLE
It's for, inventory manager, the actual inventory control. I think I have at least three row template use cases, if possible:
- weapon template, similar to the player inventory, showing the weapon in inventory plus any accessories
- containers, such as uniforms, vests, backpacks, the object config picture, with a cargo oriented summary, maybe also object mass subtotals
- finally, a simple item template, the item picture, count, etc
Like I said maybe if I get creative about it I could reduce 2-3 of these to 1-2 template use cases, not sure at this point.
wondering if I pursued the CT_CONTROLS_GROUP path, how is ctrlCreate handled adding a CONTROL to the group dynamically, there is no automatic IDC pooling is there? also how are coordinates and geometry handled? Oh and scrollbars, as I expect the vertical would definitely exceed the geography of the parent control.
You just use ctrlSetPosition and ctrlCommit.
scrollbars adapt on commit.
You can store IDCs with setVariable on the control group or figure things out from position.
yeah, the bookkeeping does not frighten me, especially. and child controls are handled in controls[] order of the parent, I assume?
...so IDC has a variable name? or you are saying that is handled apart from the baked in commands. 👀
I think I understand however...
how is other intrinsic plumbing handled, EH and such, i.e. "onLoad", also on ctrlCommit?
Not sure why you'd put onLoad on a script-created control.
fair point, what about any other EH, though?
I don't see any scope for doubt with the other EH.
fair enough. thanks for the feedback.
I don't think I actually used any event handlers on dynamic controls though. The lnb emulation only had an EH on the parent controlsGroup and the other one didn't need any.
sounds good.
how about onUnload? I do foresee that happening, potentially a lot...
and besides also the onLoad would be a moment to do the IDC bookkeeping IMO
another question I have about the CT_CONTROLS_GROUP, it emulates a CT_LISTBOX at all? especially in terms of idcLeft and idcRight? or is that something I need to shoe horn in around the custom controls views?
Hello,
is there any example to add own item in tools menu to editor?
I do not know how to do it without breaking all.
class MenuStrip: ctrlMenuStrip
{
class Items
{
items[] += {"ENH_About"};//new main category
#include "menuStrip_about.hpp"
#include "menuStrip_tools.hpp"
#include "menuStrip_help.hpp"
};
};
class FunctionsViewer//Overwrites the default function viewer
{
action = "findDisplay 313 createDisplay 'ENH_FunctionsViewer'";
data = "";
opensNewWindow = 1;
shortCuts[] = {INPUT_ALT_OFFSET + DIK_F};
};
If i want my own
class mySuperDisplay// Dont know is this possible
{
action = "findDisplay 313 createDisplay 'prisoner_superDispay'";
data = "";
opensNewWindow = 1;
shortCuts[] = {INPUT_SHIFT_OFFSET + DIK_DOWNARROW};
};
Figured out. 😄
Q: again about CT_CONTROLS_TABLE, can row template controls be made enabled or disabled? shown or hidden?
thinking this is probably the way to go assuming I can do that.
shame though cannot support multiple different kinds of row templates.
🤔 is there a possibility to add/ can I add an example of how to add items to the toolbar - tools menu?
Maybe Im not best person to do example, just thought because there is any of example on wiki. Or if there is i did not find that
Q: my recollection is a bit fuzzy, is there a GUI controls z order?
I think the only strict rule is that ControlsBackground is rendered underneath Controls
otherwise it's generally in definition order but some elements like the map control will break it.
To add it to the toolbar you need to edit the controlGroup itself
I'd personally avoid touching that toolbar as it might conflict with other mods placing buttons there. Instead use the menu strip.
What exactly do you mean?
Could you give example?
I got my config work, cannot paste it currently.
But
class Edendisplay {
...
....
MenuStrip: ctrlMenuStrip {
class Items {
...
Q: ctrlDelete automatically removes the deleted control(s) from the parent CT_CONTROLS_GROUP instance?
That's the menu strip. You were asking about the toolbar, weren't you?
Yeh, but i stay there and use my item via that.
It's only 1 click more and seems hotkey works.
So I won't touch the toolbar like you said 👍
Cool, that's why I initially meant. Menu Strip is so much better.
Q: ctrlCreate, can take either a CONFIG or a STRING, correct? actually I think I see what the issue is... 2.14 in dev at the moment, not released to production. nvm...
https://community.bistudio.com/wiki/ctrlCreate
so... question about visibility therein... the class must be visible how, can it be nested? i.e. I have a CONTROL CONFIG in hand, with some item 'templates' which are nested classes within? I can access those? or the classes need to be free standing, i.e. in what scope?
@opaque lynx Yes. You could create a controlsgroup with predefined child controls.
_display ctrlCreate ["RscMainMenuSpotlight", IDC_MAIN_SPOTLIGHT_GROUP_1];
For example...
right, but can class RscMainMenuSpotlight {} be nested?
i.e. I have something like this:
class RscMySidebarControlsGroup {
idc = IDC_MY_SIDEBAR_CONTROLS_GROUP;
class controls {
class RscMyInventoryControlsGroup {
idc - IDC_MY_INVENTORY_CONTROLS_GROUP;
// TODO: which will be created as a RscMyInventoryControlsGroup controls control
class RscMainMenuSpotlight {};
class controls {};
};
};
};
I think it only searches main config's root
I see BTW in 2.14+, the semantics potentially change a bit, i.e. given RscMyInventoryControlsGroup CONFIG, could potentially suss one out...
Because there could be multiple classes having the same name
Dunno about 2.14 changes. In theory if you provide the path to the config it should be able to create any control, nested or not, as long as it's properly defined.
i.e. capture the _config during the onLoad EH, then know for certain the path to "RscMainMenuSpotlight", changes things significantly. But otherwise needs to be root display class, sounds like, in the interim, and uniquely named.
well, I ask, because logically, makes less sense for the classes to be DISPLAY level classes, the only class needing to see them at all in this instance is RscMyInventoryControlsGroup. But will work with what we got in the interim.
So in other words, the meanwhile class structure something like this instead:
// TODO: which will be created as a RscMyInventoryControlsGroup controls control
class RscMainMenuSpotlight {};
class RscMySidebarControlsGroup {
idc = IDC_MY_SIDEBAR_CONTROLS_GROUP;
class controls {
class RscMyInventoryControlsGroup {
idc - IDC_MY_INVENTORY_CONTROLS_GROUP;
class controls {};
};
};
};
assuming that sorts it out, the follow on kerfuffle is to see some onLoad = "..." EH happening for the created controls...
I guess then question is, how would I provide the path? I'm not sure the syntax or commands to do that. given CONFIG of the would-be parent control, i.e. RscMyInventoryControlsGroup?
not getting any errors, but the control is not being created either, isNull _child yields true. so apparently the "nested path" (loosely) is insufficient. how do I specify something like that?
simply like this "class1/class2/class3", seems a bit naive, but maybe I am missing something...
anyone at all with any insights here? it's kind of critical because it carries with it a ton of implications, side effects, etc, how I structure the classes throughout.
goal: I'd like to limit the scope of the classes to only those classes that need to see them.
but then, how do I convey a class path for ctrlCreate?
sidebar, 2.14+ couldn't drop quickly enough, IMO, if it carries with it the implications that I think it does, but I could be wrong...
okay, so controls are created, onLoad question at least answered, for the moment. positively, yes, EH are happening. the class path issue still a major question for the afore mentioned reasons. would be far cleaner, less clutter, if we can contain these classes in the RscMyInventoryControlsGroup scope.
now on to the next interestion question, IDC pooling...
progress update, first of my created controls is theoretically 'in', but I do not see any evidence that it is there. the dims seem okay per my logs. Q: though, when I create it in the controls[] of the target control, I have verification that the IDC took, so I am at least 95 pct sure it is 'there'. what exactly am I committing in order for it to start showing up, that or any of the created control's controls[] themselves? the created control? or the host CT_CONTROLS_GROUP (?).
okay doke, after pouring over some dims and such, starting to come in, very draft form at the moment, but I don't exactly hate it. got some effort remaining there, like what to do about margins, cuz right now seems like it is rather jutted against the host CT_CONTROLS_GROUP left and top, whether idcLeft and idcRight are supported, or a vertical scrollbar, what happens with the controls[] controls. then also what to do about navigation, selection, changes therein, and so forth.
https://pasteboard.co/3CcHyzqZLcex.png (added highlights signaling the progress thus far)
I'm looking for a nice looking base-game icon for playing a sound effect, something like maybe a stereotypical speaker. I've been looking through some of the base addons and wasn't really finding anything
Q: about configProperties, returning an ARRAY of CONFIG, if I have _config >> "x", to a property, then to get the property name I need to configName (_configProperties select 0), for instance?
yes.
Hmm getting errors not finding one of the inventory item picture resources.
It was in there for a moment, but I had errors in another place, so curious why now it is not being found...
In my log,
15:05:32 [1065.79] [INVENTORYMGR] [fn_inventoryMgr_controlsGroupInventoryItem_onRefresh] Entering: [isNull _controlsGroupInventoryItem, isNull _display, count _controls, count _view, ctrlIDC _controlsGroupInventoryItem]: [false,false,6,5,76401]
15:05:32 [1065.79] [COMMONUI] [fn_commonUI_setMeterLevel] Entering: [isNull _controlsGroup, isNull _bg, isNull _fg, _fgRatio, _meterIndices, ctrlIDC _controlsGroup, ctrlIDC _bg, ctrlIDC _fg]: [false,false,false,-1,[1,2],-1,-1,-1]
15:05:32 [1065.79] [COMMONUI] [fn_commonUI_setMeterLevel] Leveling: [_i, isNull _meter, isNull _config, _isFg, _ratio, ctrlIDC _meter]: [0,false,false,false,1,-1]
15:05:32 [1065.79] [COMMONUI] [fn_commonUI_setMeterLevel] Leveling: [_i, isNull _meter, isNull _config, _isFg, _ratio, ctrlIDC _meter]: [1,false,false,true,0,-1]
15:05:32 [1065.79] [COMMONUI] [fn_commonUI_setMeterLevel] Fini: [_enable, _show, _commitTime]: [true,false,-1]
15:05:32 Warning Message: Picture rope 6.2 meters not found
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (?)
15:05:32 [1065.79] [INVENTORYMGR] [fn_inventoryMgr_controlsGroupInventoryItem_onRefresh] Fini: [_displayName, count _itemClasses, _picturePath]: ["Rope 6.2 meters",1,"\z\ace\addons\logistics_rope\data\m_rope_ca"]
Do I need to specify something like "\z\ace\addons\logistics_rope\data\m_rope_ca.paa" perhaps?
But like I said, it did show briefly, but I had meter errors that bailed prior to this being the case.
Fixed those errors, now there are no errors, AFAIK, and getting that warning.
I wonder does it have anything to do with overlaying images? The meters, for instance, are optional, this is what was failing before, they were showing, but I was also loading (successfully) the inventory item picture, in this case a rope.
However, the correct (expected) behavior is there should be no meter level for this item. So they are being hidden.
https://forums.bohemia.net/forums/topic/197066-picture-not-found-really-odd-issue-any-ideas/
im having a problem - any working picture i add to a new m60 for its menu icon - even ones that are for other m60 versions in our mod with all pictures completely working - pops up picture \uns_weap_w\m60\ico\w_x_box.paa not found if i change it to uns_weap_w\m60\ico\w_box2.paa, it says the same ...
so strange, I have disabled the ctrlSetText now, still receiving the same warning. any ideas? suggestions?
// _pbPicture ctrlSetText _actualPath;
the function is finishing, not getting any other warnings than this one.
15:05:32 [1065.79] [INVENTORYMGR] [fn_inventoryMgr_controlsGroupInventoryItem_onRefresh] Fini: [_displayName, count _itemClasses, _picturePath]: ["Rope 6.2 meters",1,"\z\ace\addons\logistics_rope\data\m_rope_ca"]
the other controls which should be seeing updates, are also not being updated, however. really bizarre.
_lblDisplayName ctrlSetText _displayName;
_lblCount ctrlSetText (str count _itemClasses);
if I follow the Occam's razor principle, suggests that perhaps _lblDisplayName is seen as a picture, but I am fairly certain (thought not hundred percent), this should be a CT_LABEL. I can verify that.
_lblDisplayName ctrlSetText _displayName;
Along which lines, allControls returns what from controls[], exactly? In declaration order?
💡 okay so allControls is rolling up literally ALL of the controls, including childrens' CT_CONTROLS_GROUP controls (?!?!)... did not expect that, or is there an option I can provide to discourage that?
which I guess is consistent, although not especially clear, by the statement:
Returned controls also include controls from CT_CONTROLS_GROUPs.
But again, in declaration order? Children included?
so... if I've got the following, what would be returned? assuming the following config:
class Base {
type = CT_CONTROLS_GROUP;
};
class BravoBase : Base {
class controls {
class A {};
class B {};
};
};
class Alpha : Base {
class controls {
class Bravo : BravoBase {};
class C {};
class D {};
};
};
what would allControls _alpha yield, assuming _alpha was in instance of class Alpha {}?
the basic assumption here is that it rolls up the BravoBase classes as well, but does that also include Bravo?
I think the choices are maybe these, but could someone confirm, please?
// 1. [Bravo, A, B, C, D]
// 2. [A, B, C, D]
alright, I embedded some UUID throughout my controls, apparently the pattern is (1).
would be great if the docs could reflect that being the case.
And now with those adjustments having been accounted for, starting to look like something modestly interesting...
https://pasteboard.co/g9IDlQ3D2ZyG.png
would be fantastic, IMO, if you could invoke ctrlCreate with an ARRAY of idcs, not just one, especially for CT_CONTROLS_GROUP. then if they are all used or not, no worries, can follow up and connect the dots through the respective "onLoad" EH, i.e. reporting to allocated [_idc, CONTROL], HASHMAP, or what have you, pooling.
https://community.bistudio.com/wiki/ctrlCreate
looking for some weapon picture accessory overlay guidance if at all possible...
specifically along these lines:
https://pasteboard.co/NmHNdn2PYPQ9.jpg
okay so WeaponSlotsInfo... what do I do with iconScale (?), is that an aspect ratio? so doing the math into the appropriate scale adjustment?
https://community.bistudio.com/wiki?title=Arma_3:_Weapon_Config_Guidelines#Inventory_icons_overlay_method
then iconPosition is the scale position, in the image itself? suppose it will be a challenge if the container picture is a bit different actual size?
there was a website someone made to help you visually adjust and set up those but I forgot it 💀
ah here it is https://10dozen.github.io/A3_GIPP/
thanks... so maybe my intentions are not clear, although that is an interesting site to visually compare notes, thank you for that.
I am dev'ing an inventory manager, and some of the item templates will be the weapon templates, arrayed in much the same way one would find in the player inventory dialog.
maybe a quick video demo to show progress would make it clearer... currently have simple items, and today sketched in containers, uniforms, vests, backpacks.
https://odysee.com/@givenlibertyor:9/v0.98.dev-s33-draft.1:5
so I literally want to design a presentation layer emulating player inventory in the manager inventory control.
tomorrow my goal is for at least one of the weapon templates to be presentable. and if I can show also weapon accessory slots, even better.
also curious how is the halo effect achieved on the slot images themselves?
nevermind, I see... 💡
but all those elements are config based, so it is a matter of lifting the correct details and doing the appropriate image size, aspect ratio math. is there guidance on how to interpret iconPinpoint?
// top, bottom, left, right, center alignment of the icon on snap point
I'm not sure what "alignment of the icon on snap point" means exactly, taken with iconPosition (x, y), for instance?
so far so good. although the bright white default images are too suggestive of it being filled, to me anyway. not disliking the draft so far, but is there a way to otherwise shade, hue, or alpha the 'empty' weapon slots? in this case, bipod and secondary magazine.
https://pasteboard.co/5v3hYWQkE1TW.jpg
ctrlSetTextColor I believe
may depend on what type of icons/buttons they are
ah, I see, I wasn't sure if it was ctrlSetTextColor or not. CT_STATIC, IIRC... meh actually I am about 50/50 on the underlying image fit for this purpose to begin with... going back to the drawing board there a bit to see if I might arrange something a bit nicer looking.
I think we have a winner. Very nice simple effect. Ended up doing this with the base weapon accessory images when a slot is unoccupied:
_control ctrlSetTextColor [0.5, 0.5, 0.5, 0.25];
The 50% gray base, but also the 25% alpha, is key. Suggests enough of a ghost accessory slot, while allowing some transparency to the background through. Subtle, but very nice looking.
someone have the code or a link to the code that use a mouse EH and display information about the ctrls u hover, like it tells u the idc, idd in a tooltip, i think the code was from Terra or R3vo cant remember, i would appreciate it if someone have it.
legend
Q: about the CT_CONTROLS_GROUP interaction... I gather I need to roll my own keyboard and mouse EH in order to emulate CT_LISTBOX, or the like, behaviors? i.e. things like 'row' selection, scrollbars positioning, things of this nature? so far at least from the bit of exploring I have done, seems like probably, "yes". thanks...
not sure what you mean but cant you just put buttons etc inside the Ctrl group? I dont see need for custom input reading
Makes row selection easier. I did it for a listnbox emulation.
Looks like this:
if (_params#1 != 0) exitWith {}; // ignore non-LMB clicks
private _mpos = ctrlMousePosition _listBoxCtrl;
if (_mpos#0 > (ctrlPosition _listBoxCtrl # 2) - 2*GRID_W) exitWith {}; // ignore scroll-bar region
private _rowIndex = floor (_mpos#1 / (4*GRID_H));
ctrlMousePosition adjusts for scroll bar positioning.
I'd like it to navigate like a CT_LISTBOX or CT_LISTNBOX, with selection events, scrollbar, perhaps even arrow buttons (i.e. idcLeft, idcRight) comprehension.
thanks I'll give it a look.
really though I might like to leverage CT_CONTROLS_TABLE, that would be ideal, but it only supports a single 'row template', I cannot select different templates there, unfortunately.
keyboard EH always confuse me a bit... particularly the modifier keys. these are delivered as a sparse matrix when gauging changes? i.e. because SHIFT was down (or up, i.e. true) does that mean CTRL or ALT should also be interpreted when the thing was not signaled (i.e. false)?
params [
[Q(_controlsGroupInventory),controlNull, [controlNull]]
, [Q(_key), -1, [0]]
, [Q(_shift), false, [false]]
, [Q(_ctrl), false, [false]]
, [Q(_alt), false, [false]]
];
in other words, only latch (down) or unlatch (up) when the state was true?
there its any way to modify the colorDisabled, colorActive of a RscListBox without having to create a class that inherit from this class?
like do it directly from SQF im pretty sure its not possible but just in case
I don't think is possible in scripts
Q: on CT_CONTROLS_GROUP 'list item' colors... realizing there is no intrinsic support for the behavior, looking for the color properties, for background colors, selected background colors, not selected background colors. I think the foreground is fine, no reason to change that. not sure I would need/want to animate any colorSelectBackground`colorSelectBackground2` colors, per se.
Re: onMouseEnter + onMouseExit EH... and assuming the controls in view of these two events are not otherwise overlapping in geography... we should see an onMouseExit for the currently 'focused' control before we see an onMouseEnter for the next control? thanks...
don't seem to be getting either onMouseEnter or onMouseExit events for CT_CONTROLS_GROUP controls[] controls. any suggestions? I need to parse that through the parent control as a filter and handle it specially for the parent?
have this in my config this far:
class MY_inventoryMgr_controlsGroupInventoryItemBase : XGUI_PRE_ControlsGroupNoScrollbars {
onMouseEnter = "systemChat str ['onMouseEnter', ctrlIDC (_this#0)]; _this call MY_fnc_inventoryMgr_controlsGroupInventoryItem_onMouseEnter";
onMouseExit = "systemChat str ['onMouseExit', ctrlIDC (_this#0)]; _this call MY_fnc_inventoryMgr_controlsGroupInventoryItem_onMouseExit";
deletable = 1;
};
side question, re: EH consumption, how do I persuade the A3 EH engine that a keyboard event has been consumed, that nothing else needs to process it? assuming I have the events handled.
I am finding that another mod is also responding to HOME key in this instance. How is it possible to tell the A3 EH engine that the key has been handled? Assuming the UI has priority, which I am assuming it does (?).
what EH are you using
the UserAction EH cannot block
in UI eventhandlers, you can return something to prevent the event from being forwarded further
that's what I need to know, what to return? BOOL, true, false? assuming the 'UI' (or at least the current DISPLAY) has precedence over, in this instance, an ACE Kestrel. HOME key is being greedily consumed by the Kestrel.
the eventhandler wiki page will say
the docs suggest true, if I am reading them correctly, but not sure of a more precise mention. and in fact, the docs also suggest, "In general one should not...", however, I can say in this instance, it's a problem.
https://community.bistudio.com/wiki/User_Interface_Event_Handlers#onKeyDown
anyway, is one among several keystrokes I'd like to support there...
Q: I am trying to ctrlSetBackgroundColor on CT_CONTROLS_GROUP controls[] controls.
_selectedControl ctrlSetBackgroundColor _colorBackgroundRGBA;
Have verified I have control instances and appropriate background colors, [1, 1, 1, 0.5] for selected, [0, 0, 0, 0] otherwise.
https://community.bistudio.com/wiki/ctrlSetBackgroundColor
However, noticing the documentation, the row 'templates' themselves are CT_CONTROLS_GROUP, which does not appear to be support (yet?).
I'm curious then, how else can I accomplish this?
Short of spinning up a really brain dead of exceptionally verbose CT_LISTBOX or CT_LISTNBOX control...
I mean I don't hate the idea, but geography is finite, especially for weapon cargo listings.
Has been an interesting thought experiment thus far; but right now, starting to gather it is a non-path forward.
Thoughts, suggestions?
Plus side I suppose at least there is intrinsic support for scrollbars and arrow idcLeft idcRight buttons. So maybe that's the right answer after all.
Also excepting for the observation, I'm not sure how player inventory listings accomplish meter levels for things such as containers (uniforms, vests, backpacks) and magazines are accomplished, excepting perhaps a creative use of an idcLeft control, and a non or idcRight placeholder control, which it could well be.
Although I sort of had in mind arrow buttons reserved for adding to ("+", idcRight) or subtracting from ("-", idcLeft) inventories...
Taking a huge two three steps back considering CT_LISTNBOX idcLeft idcRight arrow buttons ... there is nothing about those contols prohibiting them from being CT_CONTROLS_GROUPS themselves, is there?
or in other words, initially I took the somewhat naive approach with plus (+) and minus (-) buttons... but they could be more complex than that, correct?
would someone please clarify this, because I'm not sure whether there are in fact composite CT_CONTROLS_GROUP controls involved. drawing inspiration from player inventory in particular.
The description seems rather general, "The IDC of the control to be used for the left control that shows up in the selected row."
But then the first warning suggests specifically, button, but I have a question whether that is really the case, "Buttons will only be drawn if both idcLeft and idcRight are defined. Furthermore, the position of the first column needs to be adjusted so that the button does not overlap with the text. The button's height will be adjusted to the rowHeight property of the CT_LISTNBOX and the button's x, y, w and h properties can be set to -1."
https://community.bistudio.com/wiki/CT_LISTNBOX#idcLeft
Especially, I want to emulate the meter levels for things such as containers in a CT_LISTNBOX, vests, backpacks, etc. Got to be at least a CT_CONTROLS_GROUP, IMO, but is it in fact?
Most of the inventory is in engine code. That probably too
hmm... my take away is that such control compositions are beyond the capabilities available to mods?
If you cannot find how they do it, then that's likely
I see I see... thanks.
You could actually do the bullet meter thing in a listbox with a lot of pictures. Seen that done with a mag reload mod UI.
controlsGroup + tiny boxes is also an option.
I mean, it 'could' be done?
also, already been down the controls group path. that 'would' work were it not for the lack of even extrinsic keyboard mouse EH... saying nothing of the fact, cannot set background colors, also a critical feature. admitedly I just parked that feature branch filed under the 'failed' category, but keeping it as a reference. Git hard reset to the most recent SHA not that effort. Now considering contingencies. But I appreciate the feedback.
I don't recognise either of these points.
I am coming at this now with more than an educated, informed notion.
bit of a kludge, but will go the meter image route for now... not a fantastic solution, decided to go with 5% rounded increments, without getting too crazy. vertical alignment only.
Hello
How does diag_mergeConfigFile command work.
What file and where and how I can modify without repacking mod and not restart the game.
Use Diag exe
and give it full path to the config.cpp. And re-run/re-merge for every config edit
Thanks guys. I will test it out.
Yeah, it works .
Thank you.
I have a problem with CT_LISTBOX and CT_LISTNBOX, they seem to not be able to contain 500 items at once? is there a limit to how much items they can contain? whenever I run the GUI creation and run the lbadd and lnbAddRow commands from the 500 item array they sometimes list 200 items or 190 or 300 or 350 (basically they fail to list every item) is there a workaround or fix for this?
{
_displayName = [configFile >> "CfgVehicles" >> _x] call BIS_fnc_displayName;
_list lbAdd _displayName;
_list lbSetTooltip [_foreachindex, _displayName];
} forEach _500ItemArray;
this is how I'm adding items to CT_LISTBOX
Sounds like you're doing something wrong, I don't think there is a limit
Log everything you add, maybe count of list items each time you add something
Could you provide a code example please? (I know how to log just not what exactly you are referring to)
lbSize + _displayname is what you want me to log (on each add instance)?
{
_displayName = [configFile >> "CfgVehicles" >> _x] call BIS_fnc_displayName;
_list lbAdd _displayName;
_list lbSetTooltip [_foreachindex, _displayName];
diag_log ["Added: %1, lbSize = %2", _displayName, lbSize _list];
} forEach _500ItemArray;
13:49:21 "[Player Spawn Jet Menu] Added: A-10C, lbSize = 1"
13:49:21 "[Player Spawn Jet Menu] Added: To-199 Neophron (CAS), lbSize = 2"
13:49:21 "[Player Spawn Jet Menu] Added: MiG-29, lbSize = 3"
13:49:21 "[Player Spawn Jet Menu] Added: MiG-29, lbSize = scalar"
13:49:21 Error in expression <icles" >> _x] call BIS_fnc_displayName;
Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error position: <Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error Undefined variable in expression: tro_startgui_list
13:49:21 File mpmissions\__cur_mp.Altis\Functions\Player Jet Spawn\fn_PJetGUI.sqf..., line 72
13:49:21 "[Player Spawn Jet Menu] Added: MiG-29, lbSize = scalar"
13:49:21 Error in expression <icles" >> _x] call BIS_fnc_displayName;
Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error position: <Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error Undefined variable in expression: tro_startgui_list
13:49:21 File mpmissions\__cur_mp.Altis\Functions\Player Jet Spawn\fn_PJetGUI.sqf..., line 72
13:49:21 "[Player Spawn Jet Menu] Added: MiG-29, lbSize = scalar"
13:49:21 Error in expression <icles" >> _x] call BIS_fnc_displayName;
Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error position: <Tro_StartGUI_List lbAdd _displayName;
Tr>
13:49:21 Error Undefined variable in expression: tro_startgui_list
Tro_StartGUI_List is the RscList
this only happens when I have Firewill mod loaded? (basically when list size goes from 100 to 600)
I will try to see log without firewill
Post your code
to see which variable is which
Looks like you nil Tro_StartGUI_List at some point
probably by reassigning something that has a nil in expression so you end up with another nil
Either way its not RscList issue, you have bugs in your scripts
I was timed out, sorry for late reply:
https://sqfbin.com/ivuyabokemuzuhivogil
Looks like you encountered that unintended namespace switching
It switches back to mission namespace where Tro_StartGUI_List is nil, thus the error
Get rid of with blocks, always work in mission namespace
Instead of
Tro_StartGUI_Display = (findDisplay 46) createDisplay 'RscDisplayEmpty';
```do
```sqf
private _display = findDisplay 46 createDisplay 'RscDisplayEmpty';
uiNamespace setVariable ["Tro_StartGUI_Display", _display];
without with uiNamespace stuff at all, of course
Then get it with something like this:
private _display = uiNamespace getVariable ["Tro_StartGUI_Display", displayNull];
if(isNull _display) exitWith {};
Same with other controls
Put them into private variables inside unscheduled code
Thanks, but can you tell me how it being scheduled affects the listing?
Are you referring to it taking longer in scheduled to list stuff so list appears incomplete, or does namespace switching occur more frequently in scheduled?
There is a bug in the game which randomly switches namespace, described here
^
I think that's what happens there
Read the article
Thanks a lot, I should have focused on the article beforehand
you should know better than posting a URL with sex in it! 🤣 sorry about that 😛
https://sqfbin.com/sexanewobogedafabike
what's a sex new bodega bike anyway
sqfbin trolled me :(
Can I do new lines in tooltips
ok, so lets see where I messed up! :P
Trying to make a new toolbar item in 3den interface that shows syst-
As I was typing, an error occured, but since I was typing, it dismissed it weee
doh /Display3DEN/Controls.Toolbar: Undefined base class 'ctrlControlsGroupNoScrollbars'
horray main menu start up x3
But, anyway, want a thing that shows computer time.
I could just use shift+tab for steam overlay, but- eh, why not
Can I do new lines in tooltips
\n
ah ok. I was wondering if it'd just treat it as \\n or not, you see :P
x = "safezoneW - 4 * ( 5 * (pixelW * pixelGrid * 0.50)) - (pixelW * pixelGrid * 0.50)"; if I'm correct, that should put x as 4 grid tiles from the right on the eden toolbar?
Just make sure that there is not another button next to the far right one
I remember there was a "What's new" button of some sort, not sure if it's permanently disabled
How would I check that? Although, maybe having a bit of space anyway would look nice. Make the 4 by a 5 instead
Nevermind. This button doesn't exist anymore.
Do I need to have tooltip defined in the config file or can I have it undefined and still use ctrlSetTooltip on it?
Both works
Ok, and will tooltips break if given [394,392,432] (example numbers)
yea, used str
question does a command saying that it doesn't work in dedicated servers im guessing by definition that means in local host it will work?
Which command?
specifically addweaponglobal gimme a sec to get a biki page 4 u
just realized this was completely the wrong chat
Dunno what is broken with this command, but should be fine when executed on a client or host
Heh- so looking at RscTitle stuff. If I play for long enough, eventually all my HUD will disappear? ;P
Eventually. But nobody is going to play the session for more than 10e30 seconds
oh what about 1e6 seconds? D: (heh xD)
Wait, what is GUI_GRID_WAbs? it seems to be ((safezoneW / safezoneH) min 1.2) but- why? What is this doing?
this confuses me
wait- oh?
it basically make sure that you controls don#t get streched on very wide aspect actions
it limits it to a ratio of 1.2
but why is it using safezoneH?
wait- ok, so that's b/c ratio
So, new question, why is GUI_GRID_CENTER_X or GUI_GRID_CENTER_W not in the center of my screen?
What's in the macros?
it's from a3\ui_f\hpp\definecommongrids.inc
//--- New grid for new A3 displays
#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2)
#define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2)
#define GUI_GRID_W (GUI_GRID_WAbs / 40)
#define GUI_GRID_H (GUI_GRID_HAbs / 25)
#define GUI_GRID_X (safezoneX)
#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs)
//--- MUF - Test grid used in MP
#define GUI_GRID_MP_WAbs GUI_GRID_WAbs
#define GUI_GRID_MP_HAbs GUI_GRID_HAbs
#define GUI_GRID_MP_W GUI_GRID_W
#define GUI_GRID_MP_H GUI_GRID_H
#define GUI_GRID_MP_X (SafezoneX)
#define GUI_GRID_MP_Y (safezoneY)
//--- Screen Center
#define GUI_GRID_CENTER_WAbs GUI_GRID_WAbs
#define GUI_GRID_CENTER_HAbs GUI_GRID_HAbs
#define GUI_GRID_CENTER_W GUI_GRID_W
#define GUI_GRID_CENTER_H GUI_GRID_H
#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2)
#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2)
Have to checked the biki?
what sorry?
wait- is grid center the center portion of my screen?
not dead center, but the central area when broken into 3x3 grid?
Looking at the green box labeled GUI_GRID_CENTER in https://community.bistudio.com/wiki/File:GUI_GRID_defines.png I'd say that the coordinates work like this ...
//Top left of green box:
x = GUI_GRID_CENTER_X;
y = GUI_GRID_CENTER_Y;
//Bottom right of green box:
x = GUI_GRID_CENTER_X + 40 * GUI_GRID_CENTER_W;
y = GUI_GRID_CENTER_Y + 25 * GUI_GRID_CENTER_H;
```... while the size of the green box is ...
```cpp
w = 40 * GUI_GRID_CENTER_W;
h = 25 * GUI_GRID_CENTER_H;
Could be wrong though, I've never actually used GUI_GRID 🤷♂️
Computer Time?😬
secret countdown?
yes.
What did I win?
My thanks.
Meh 😢
How might I check if the arma 3 main menu is visible? x3
specifically the logos at the top of the screen
probably with the IDD: https://community.bistudio.com/wiki/Arma_3:_IDD_List
Yea but display 0 is always present
Ohhhh! 1, that's super super cool!
2: darn it, it's cool but it was messing me up xD
Arma Invaders
so that explains why I was getting weird values for shown on all the controls I could see with arma 3 logos. (Logo, LogoApex and the AI special logo)
Also, if ya go to campaign tab/window on the menu, and then back to main menu, it shows the standard logos and not the AI logo :P
I decided to just say heck it. If there's more then 1 display, itwill assume the center top of the screen is free.
Is there a way to make it appear on top of other things? Like, dialog box appears, then put the thing above the dialog box
https://i.gyazo.com/aa54bd1cd51865e5ec84009ba3d37a56.mp4 Horray! :D
And when on the main menu, it shifts. It looks a bit weird on prarie fire DLC, but I mean- eh well xD
[100, ["RscTitle","PLAIN"]] remoteExec ["cutRsc", _target];
using this command with ace interaction which is why the _target.
When I do this on local machine, it applies the UI affect to my screen, im assuming because its still running on my machine right.
This means that there won't be an issue on local machine, correct?
I've just realized- darn it
using this command with ace interaction which is why the _target.
ACE interations already run locally
your remoteExec is doing nothing remotely
it's the same as using the command without the remoteExec
_targetis the object being interacted with;
though? So_targetcan be used as remoteExec target to show stuff on somebody else's machine if used on another player?
but i dont want to execute the command on _player
on wherever _target is local then. Possibly on the dedicated server, if, say, you target AI or vehicle that was created there (or in mission and never changed locality after that) 
Q: about sliders... how are the metering levels achieved? i.e. the tall and short bars?
https://community.bistudio.com/wiki/CT_SLIDER
RscExample
class RscSlider
{
deletable = 0;
fade = 0;
access = 0;
type = CT_SLIDER;
style = SL_HORZ;
color[] = {1,1,1,0.8};
colorActive[] = {1,1,1,1};
shadow = 0;
x = 0; // position x
y = 0; // position y
w = 0.3; // width
h = 0.025; // height
};
And steps and range
sliderRange
Type
Array
Description
Slider range in format {min,max}.
sliderRange[] = {0,100};
sliderStep
Type
Number
Description
Size of the steps when slider is dragged, eg if sliderStep is 1 only integers are possible for the slider value.
sliderStep = 1;
Don't know what your question was, it is about how to set the size of the slider ? And how it works or something else
one moment, I'll illustrate
As highlighted here...
https://pasteboard.co/Gih98FCiQqqJ.png
Or is that just something we get 'for free', the tall and short segments, after setting up the range and so forth.
I mean all the rest I get... wondering if we needed to do any other properties gymnastics to achieve those, or they could be customized or what not.
it works... turns out I think we're using the CT_XSLIDER anyway...
how do I add to an existing display?
wait, do I just define it again, without referencing the old one?
class RscDisplayCurator;
class Display3DEN
{ ...
class RscDisplayCurator
{ ...
Display3DEN exists, but I can add stuff to it. I copied code from another addon, but didn't really understand what was happening. Now I wanna do the same thing again with the curator display. Would I want to remove the importing on the first line of the code segment?
actually, it probably wont hurt, so I'll just try that xD
that seems to be a yes
hey anyone know change the name of point on the maps for A3 such as citys and airfields
Theoretically, createLocation alt syntax.
Assuming that you're not making a mod and mangling CfgWorlds.
Does anyone know of a way to set a ui elements image (ex. background image) through script?
I want to provide it a new paa path when conditions are met
For stuff like CT_STATIC or CT_BUTTON you just put the image path into ctrlSetText.
Not sure if I've done live image switching but it'll probably work.
I'm not sure exactly how it tells whether to use the text as a path or actual text.
I was messing with trying to do it through structured text but wasnt having any luck, I can try the crtlSetText thing though
What exactly do you mean by dynamic?
I want to be able to determine the paa path with script during runtime, not have a bunch of presets that I flip between
I thought it would be possible with structured text, or as John points out, with just ctrlSetText. But I cant seem to get the structured text option to work
I've got it working, and I want to use the ui with the new "UI on Texture" stuff, was hoping to be able to use ctrlSetText during runtime and then push that to the texture, but it looks like it just pushes whatever the ui images originally were. It doesnt reflect that changes made
Read the page about ui on texture again
Only doc I can find on it is at the bottom of the procedural textures page. If you're referring to displayUpdate, I tried that but couldnt get it to change
yes thats what i mean
Perhaps im using it wrong?
I tried both 'displayUpdate (findDisplay *name of ui2texture generated display string)' and with the display idd of the gui
Hold on, should I be somehow using ctrlsettext on the ui that was generated from the uiontexture function and not using it on the original ui element?
define "original"
this setObjectTexture [0, '#(rgb,1024,1024,1)ui("DefaultDialog","abc")'];
this setObjectTexture [1, '#(rgb,1024,1024,1)ui("DefaultDialog","abc")'];
addMissionEventHandler ["EachFrame", {
private _display = findDisplay "abc";
private _kek = _display displayCtrl 1; // < this being the RscPicture
_kek ctrlSetPosition [
-0.5 + (sin (time * 5)) * 0.5,
-0.5 + (cos (time * 5)) * 0.5,
2,
2
];
_kek ctrlCommit 0;
displayUpdate _display;
}];``` example of code that definitely worked 
@crude berry Does displayupdate need to be used on everyframe for a single image change? Not an animation like you have
I'm trying it with this code, to no avail:
wb1 setObjectTexture [0, '#(rgb,1024,1024,1)ui("OverlayTest","abc")'];
private _display = findDisplay "abc";
private _kek = _display displayCtrl 1200;
_kek ctrlSetText "UionTextureTest\data\Image2_ca.paa";
displayUpdate _display;
waiting for a frame after creating a display seems to help 
https://sqfbin.com/citunefujupenepipeqa this is literally the entire code i'm running right now
Thankyou for your help, I got it working with the sleep, id forgot to switch the idc back
hey @crude berry Have you ever used a variable for the uniqueName portion? I cant get it to accept it
format? 
Thats what I thought too, findDisplay doesnt seem to work when given a variable thats any string, even a format created one
it worked for me... but only once, it seems 🤔 let me dig a bit
When I do it with a preset string, it gives me a display number of #-1, which the wiki implies is not good
and now it stopped misbehaving with me changing literally nothing
soo... its working for you?
https://sqfbin.com/ifapuduqifelewugidas in the init field of random vehicle 
and shows display id as -1 while working, so that's likely to not be a problem
your code actually give me a really random error referencing like 255 which you dont have lol
I was trying with a local variable, I guess I could with a global one
local at which scope?
It never leaves the scope of the code block
but perhaps uiontexture is part of a different scope then the code around it?
EH is different scope. uiontexture is no code
Can you show what code is misbehaving for you?
yup hold on
im not using a eh btw
Ok it works now
it does not work with a local variable though
here is a snippet:
uniqueName2 = format["%1_%2",getObjectID wb3, _forEachIndex];
wb3 setObjectTexture [_forEachIndex, format ['#(rgb,1024,1024,1)ui("RscDisplayEmpty","%1")', uniqueName2]];
sleep 0.001;
_display = findDisplay uniqueName2;
if I change "uniqueName2" to "_uniqueName2" then it just doesnt work
oo but defining it as a private variable does seem to work
So we have two separate dialogs, both created with createDialog. One of them is always drawn in front of hint, the other behind it. Any idea why?
https://community.bistudio.com/wiki/createDialog
If forceOnTop is set to true, the dialog will be rendered on top of displays
^ is that present anywhere?
The createDialog's just the first-syntax version.
Not sure if there's something similar in the config...
hmm, the one drawn in front does have movingEnable = false
not that though, apparently.
Do you guys use the background?
someone knows why the ctrlTextHeight command returns a an exceeded height?
https://i.gyazo.com/ef5f3e106677a95426c9d0b4708290ea.png https://i.gyazo.com/7a1b7f192ae41c8a65b0ed618605e870.png
tried also BIS_fnc_ctrlFitToTextHeight func but doesnt seems to change anything
As far as I remember some fonts are not really supposed. Not sure if that has been fixed at some point though.
Try with the default arma font and see if that works
https://i.gyazo.com/de15662deaed79d350a0e7ee3bc8d4af.png without fonts, aligns, and sizes mods same result
tried also using ctrlSetText without structured text and nothing same result
ok if i use a RscText it works fine https://i.gyazo.com/8e209e987928dc7f9faba32ae988218e.png
soo.. i guess structured text its not supported
even though the wiki says yes
seems to work alright with structured text on my end, though 

can u show me ur code?
https://sqfbin.com/mekazivunopazoqeyuli ctrlCreate example with minimal changes, basically
ye im using ctrlCreate also
idk im stupid?
does reproduce with your code. https://sqfbin.com/hapozuqerorafulepito doesn't error out, though
i suspect some shenanigans with default control width or something 
i mean, default width of 0.1
naturally the code text would take more lines with that 🙃
just for a sanity check
As in ControlsBackground? One of them did but I just removed those and it hasn't changed the draw order relative to the hint.
Just trying to understand this GUI stuff, now the wiki say I can use RscText for "backgrounds and text labels." and that ctrlSetText can be used for "...active texts as well as for images"
So how come if I do something like this ```hpp
class laptopBackground: RscText
{
idc = 1000;
x = 0.298907 * safezoneW + safezoneX;
y = 0.401 * safezoneH + safezoneY;
w = 0.402187 * safezoneW;
h = 0.363 * safezoneH;
text = "laptopPassword\laptop.paa";
};
So the wiki is wrong? Or am I not reading it right?
I initially wanted to use RscPicture, but in the GUI editor it seems to sit on top of everything which makes laying everything out painful
What wiki?
And what part you're referring?
I actually have nearly zero experience with GUI Editor, it is simply useless and painful so I'm just doing my GUI on my text editor
Under Handling Controls it say
RscText - Very simple control. Can be used for backgrounds and text labels.
It doesn't say it can show image
I assumed that's what backgrounds referred to. Especially when ctrlSetText says
This command can be used for static texts, buttons, edit lines and active texts as well as for images, where you can use it to set the image path.
ctrlSetText can set image too
I tried doing it that way and still no joy
You need to set the style first to ST_PICTURE
Or simply this
Or use RscPicture instead
Thank you, that works perfectly ❤️
Thank you both for you help and patience
Anyone happen to have a link to how to make custom controls in eden attribute window, for objects? :P
examples and such
@lone orbit
Does attributeSave return the value to give to the object's expression, or is it just for validation or?
oh, does attributeLoad run before or after onLoad
After
the value returned by attributeSave will be the attribute's value
oh huh- how do I do this then x3
I guess instead of onLoad I will have to call the 'onLoad' function from the attribute load? 🤷♂️
(_this controlsGroupCtrl 100) setVariable ['RCHT_LIGHT_COLOR',_value]; [(_this controlsGroupCtrl 100)] call ratchet_LightMod_fnc_onColorPrevLoad
(The function is also being used for initial set up of other things)
Not sure what you want to do really
Can onEditChanged or onChar br called for attribute controls?
Tryin to make a 3 value color preview and customizable color point light
If that makes sense
Sure
Use a sliders instead from 0 -255
ok, so its being called now! I did forget to do something, but now atleast I'm seeing my "every new scope, diag_log" xD
HAHA! Thank you! I still needa make it look nice and add the number boxes maybe, but- https://gyazo.com/7496d9380145c73c13b029447b83e58b
You can have slider + edit boxes quite easly. Check one of the vanilla controls
Q: about CT_CONTROLS_GROUP, class controls { ... };, does not permit defining grouped controls in base class? i.e. class controls : ControlsBase { ... };, apparently (?).
It does, the inheritance syntax is just unusual (see https://community.bistudio.com/wiki/Class_Inheritance#Inheritance_of_Child_Classes):
class Parent {
type = CT_CONTROLS_GROUP;
class Controls {
class MyControl1 { ... };
class MyControl2 { ... };
};
};
``````cpp
class Child: Parent {
class Controls: Controls {
class MyControl1: MyControl1 {}; //Inherited
class MyControl2: MyControl2 { ... }; //Inherited and modified
class MyNewControl { ... }; //Not inherited
};
};
I get the inheritance of the controls themselves, verifying that with some custom UUID, which I can verify...
hmm so the class needs to be Controls then, no room for ControlsBase or other custom naming. hence "unusual".
what I want to do is more like... (wait one)
class Parent {
type = CT_CONTROLS_GROUP;
class baseA {};
class baseB {};
class baseC {};
class baseD {};
class controls {
class A : baseA {};
class B : baseB {};
};
};
class Child : Parent {
class controls : controls {
class C : baseC {};
class D : baseD {};
};
};
but I am finding that allControls _ctrlGrp is showing me only the C and D instances. i.e. does not show the A or B instances, or was not rolled up in the defined inheritance.
which is sad because I have a use case where that would be fantastic, could potentially leverage commonalities in the extreme.
anyway, defining class controls {...} explicitly in Child not the end of the world, just a bit more repetition.
huh, or are you saying I would need to derive class childA : A {} and class childB : B {} for that to be inherited? i.e.
class Child : Parent {
class controls : controls {
class childA : A {};
class childB : B {};
class C : baseC {};
class D : baseD {};
};
};
still a bit verbose for my tastes, but that is more acceptable than repeating myself.
no as you described it here, actually does not work, claiming MyControl1 is undefined, for instance.
Q: hmm, is a _display displayCtrl _idc available prior to finding its onLoad EH having been raised? have a use case indicating that maybe not... can anyone confirm?
IIRC the onLoad handlers are fired sequentially as the controls are created.
So it's common to spawn rather than call them, so that the whole dialog is loaded.
ah okay I see...
suppose I knew that, but it makes sense
nice... did that, was not the worst response, not terribly cattywampus comparing contrasting _this call versus _this spawn...
Is there any better version of the GUI designer that actually has all of the control types?
I noticed the normal one doesn't have progress bars
Not really. Better do it in text file instead
Just pasted the Parent and Child classes from my original message into a description.ext, replaced ... with some arbitrary properties (e.g. s = "Hello World";) and it worked. Everything was showing just fine in the Config Viewer, including inherited and modified properties. No errors.
How did you test it?
I did test it, thank you, in the pattern described, and it was not inheriting whatsoever, complained of the base class being missing, IIRC. do not have the failure point in front of me, and since fixed it.
anyway, I have a path forward at any rate, which turns out, class controls {} children need to be IDC'ed anyway, if I read the messages correctly, so turns out I needed to specify them explicitly.
not the end of the world, and works out rather nicely, as a matter of fact. the tricky part is that the grouping needs to be a certain order, i.e. allControls indexes are well defined, so the declarations need to be consistent, or perhaps I could also look them up by UUID, so there's that, also.
cheers 🍻
I'm currently working on making a custom ui element to display some info, and was setting up the IGUI values to let players move it around.
I'm looking at another mod as a reference, since I couldn't find a config reference for CfgUIGrids.
Which brings to me my question, what does saveToProfile do in CfgUIGrids >> IGUI >> Variables >> MyVariable?
I tried google searching for the name and couldn't find anything explaining what it does. The reference I'm using has saveToProfile[]={0,1};, but I also found that the TFAR mod uses saveToProfile[]={0,1,2,3,4}; in one example
Is it like specifying what data to save to the user's profile? Like 0 and 1 are the element's position in the "Customize Layout" menu?
There's also a Presets class in IGUI, which I assume is like setting the default settings for variables?
Not sure if it helps. But this mod was recently released and is available on github
https://steamcommunity.com/sharedfiles/filedetails/?id=3010136676
It doesn't really explain what the properties do, it just has the same kind of values as the other mod I was looking at:
class spe_vehicle {
description = "Vehicle status displayed for Spearhead 1944 tanks.";
displayName = "Spearhead 1944 tank info";
preview = QPATHTOF(data\spe_vehicle_ca.paa);
saveToProfile[] = {0,1};
};
Perhaps @burnt token can help
Another thing, how can you reset the position of a display?
I dragged it around for testing purposes to make sure it actually was draggable and that it would persist when relaunching, but how can I put it back to my default values?
Remembered you can just set them to nil:
profileNamespace setVariable ['IGUI_VarName_X', nil];
profileNamespace setVariable ['IGUI_VarName_Y', nil];
I've been struggling to center this control inside of another element (acting as a background for the whole display). I had it centered the way I wanted it, but it had some odd spacing above and below the center bar; so I changed the sizing and position to update it but now it no longer fits correctly.
I'm using macros to reduce the "magic numbers" in the code.
controls[] =
{
"background",
"fuel"
};
// Window sizes, measured in % of screen size
#define WINDOW_WIDTH 0.025
#define WINDOW_HEIGHT 0.3
#define WINDOW_X 0.9
#define WINDOW_Y 0.5
// See https://community.bistudio.com/wiki/Arma:_GUI_Configuration#Controls
class background: RscPicture
{
text = "#(argb,8,8,3)color(0,0,0,0.7)"; // Procedural texture - https://community.bistudio.com/wiki/Procedural_Textures
// Control size
w = WINDOW_WIDTH;
h = WINDOW_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", WINDOW_X * safeZoneW]); // Right side of screen
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)]); // Centers the bar vertically
};
class fuel: RscPicture
{
text = "#(argb,8,8,3)color(1,1,1,0.7)"; // White bar
#define FUEL_WIDTH WINDOW_WIDTH * 0.5// 50% the width of the background
#define FUEL_HEIGHT WINDOW_HEIGHT * 0.95// 95% the height of the background
// Control size
w = FUEL_WIDTH;
h = FUEL_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", (WINDOW_X * safeZoneW) - (FUEL_WIDTH / 2)]) + (FUEL_WIDTH / 2); // Center fuel bar in background
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (FUEL_HEIGHT / 2)]) + ((FUEL_HEIGHT) / 9.5); // Vertically center
};
Here's also a full screenshot, in case that helps visualize it better
TL;DR, centered bar is 6 pixels off, but math seems to check out so not sure why
This is a screenshot of it perfectly centered at 80% the height, so I'm not sure why it's suddenly not at 95% with the offset also updated
class GUI
{
idd = -1;
// Window sizes, measured in % of screen size
#define WINDOW_WIDTH 0.025
#define WINDOW_HEIGHT 0.3
#define WINDOW_X 0.9
#define WINDOW_Y 0.5
controls[] = {
"background",
"fuel"
};
class Test: RscText
{
x = 0;
y = 0;
w = 1;
h = 1;
colorBackground[] = {1,0,0,0.2};
};
// See https://community.bistudio.com/wiki/Arma:_GUI_Configuration#Controls
class background: RscPicture
{
text = "#(argb,8,8,3)color(0,0,0,0.7)"; // Procedural texture - https://community.bistudio.com/wiki/Procedural_Textures
// Control size
w = WINDOW_WIDTH;
h = WINDOW_HEIGHT;
//
// // Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]); // Right side of screen
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)]); // Centers the bar vertically
};
class fuel: RscPicture
{
text = "#(argb,8,8,3)color(1,1,1,0.7)"; // White bar
#define FUEL_WIDTH WINDOW_WIDTH * 0.5// 50% the width of the background
#define FUEL_HEIGHT WINDOW_HEIGHT * 0.95// 95% the height of the background
// Control size
w = FUEL_WIDTH;
h = FUEL_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]) + 0.5 * FUEL_WIDTH;
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", safeZoneY + WINDOW_Y * safeZoneH]) - 0.5 * FUEL_HEIGHT;
};
};
Explanation:
- Your default values for the x coordinates were offscreen. You forgot to add the anchor (safeZoneX).
- I redid the calculations my way. I always trace the path that the controls would travel, so step by step to get to the final x coordinate (
safeZoneX + WINDOW_X * safeZoneW + 0.5 * FUEL_WIDTH):
safeZoneX // start at left edge of screen
safeZoneX + WINDOW_X * safeZoneW // Move to the same coordinate as the background
safeZoneX + WINDOW_X * safeZoneW + 0.5 * FUEL_WIDTH // leave some space to the left edge of the background
``` repeat for y coordinate. It is important to note that these calculations only work with the given definitions (`#define FUEL_WIDTH WINDOW_WIDTH * 0.5` and `#define WINDOW_Y 0.5`). Otherwise the calucations become a bit more complicated
aaand only having any calculations inside the default value of getVariable would break stuff as soon as custom anchor coordinates get saved
you want to get the same anchor value everywhere and apply different offsets for different controls. If you want the anchor to be center, offset would be -width/2 for x and -height/2 for y
but even more sane solution would be to create a control group and work in local/relative coordinates of that 
whoops, yeah should be fixed
also yes
X, Y, W, H
0, 1, 2, 3
W/H is relavant only if you allow resize.
Bear in mind vanilla supports only 22 CfgUIGrid elements. CBA expands it to 100.
Alright that's what I guessed it was, for the x and y at least
The calculations for the get var were just to basically get the same default values, all the other calculations to center the white bar were done outside of it
Nevermind, I assumed you meant from my example
That does sound a lot easier, how do you do that? I couldn't seem to find anything about it when doing some googling
still stands for your example. getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", WINDOW_X * safeZoneW] and getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", (WINDOW_X * safeZoneW) - (FUEL_WIDTH / 2)] are two different default values for the same variable name. If the variable gets set - you lose whatever difference was in them 
i'm misremembering things, control groups only affect positions, but not sizes 💀
The offset for the fuel is applied outside of the getvar
(profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW **]** ) + (FUEL_WIDTH / 2)
if defaults are different - it will either only work with no variable set or only with variable set 
well, last of your code listed here was this, and here defaults are different. Good to hear it's not a problem anymore
Might've just been a weird thing from when I copy/pasted and then removed some unneeded elements

with that fixed you need to make centers match. So
a) take top-left corner of "background" control (its x/y)
b) add half of its width/height - that would give you its center
c) subtract half of "foreground" control width/height to get its top-left corner for x/y
so x = (getVariable blahblahblah) + WINDOW_WIDTH / 2 - FUEL_WIDTH / 2; and so on 
Yeah, I already had it centered but the formula only worked because it was 1/2 the width
then are there any problems left?
Terra's values for centering it vertically did work, but like they said, only for 50% the height, so I'm still working on that
y = (getVariable blahblahblah) + WINDOW_HEIGHT / 2 - FUEL_HEIGHT / 2; 
Yeah I was just launching arma to try that, it's even more off than my previous offset of + ((FUEL_HEIGHT) / 9.5)
give full running config, please 
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (FUEL_HEIGHT / 2)]) + ((WINDOW_HEIGHT / 2) - (FUEL_HEIGHT / 2));
Copied the wrong formula
full config, please
// Window sizes, measured in % of screen size
#define WINDOW_WIDTH 0.025
#define WINDOW_HEIGHT 0.3
#define WINDOW_X 0.95
#define WINDOW_Y 0.5
class BNA_KC_Jet_Dialog
{
// See https://community.bistudio.com/wiki/Arma:_GUI_Configuration#HUDs
// Custom HUD element for jetpack fuel
idd = 8000; // Custom id, should be unique
// enableSimulation = 1; // ?
movingEnable = 1; // Allow the player to move the display in the "Customize Layout" menu
duration = 9.9999998e+010; // Make menu last "forever", will be closed if jetpack is removed
// 0.5 second fate in/out
fadeIn = 0.5;
fadeOut = 0.5;
// onLoad = "[_this] call BNAKC_fnc_jetpackDisplayOnLoad;"; // Code to run when loaded
onUnload = ""; // Same thing but when unloaded
// List of all the UI elements
controls[] =
{
"background",
"fuel"
};
// See https://community.bistudio.com/wiki/Arma:_GUI_Configuration#Controls
class background: RscPicture
{
idc = 9000; // Id for this control
moving = 1; // Control will be moved when the display is dragged
text = "#(argb,8,8,3)color(0,0,0,0.7)"; // Procedural texture - https://community.bistudio.com/wiki/Procedural_Textures
// Control size
w = WINDOW_WIDTH;
h = WINDOW_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]); // Near the right side of the screen
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)]); // Centers the bar vertically
};
class fuel: RscPicture
{
idc = 9001; // Id for this control
moving = 1; // Control will be moved when the display is dragged
text = "#(argb,8,8,3)color(1,1,1,0.7)";
#define FUEL_WIDTH WINDOW_WIDTH * 0.5// 50% width of background
#define FUEL_HEIGHT WINDOW_HEIGHT * 0.95// 95% height of background
// Control size
w = FUEL_WIDTH;
h = FUEL_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]) + ((WINDOW_WIDTH / 2) - (FUEL_WIDTH / 2));
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (FUEL_HEIGHT / 2)]) + ((WINDOW_HEIGHT / 2) - (FUEL_HEIGHT / 2));
};
};
getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)] vs getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (FUEL_HEIGHT / 2)] - different defaults 🍿
I guess I never fixed it for the y position
Yep, that's what was causing the 6 pixels offset
Thanks a ton 
Now to make it actually do something and not just look there and be pretty lol
Got it working
Just need to fix it showing up for every player when just one person activates it
It was because I copy/pasted a function call for CBA_fnc_globalEvent but forgot to change it to local
How can I hide a display without closing it?
I saw that someone was using <layer> cutRsc ["default", "PLAIN", 0.5]; to hide an element, but that still seems to "delete" it
Actually I think it might have just been because of how I was creating it Nope, I had the display saved to a mission namespace variable and thought that since I wasn't setting the variable to the new display, that's why it wasn't showing up.
Realized this is probably better for #arma3_scripting
What do the last two values in CfgUIGrids >> IGUI >> Presets >> Arma3 >> Variables >> variableName mean?
#define WINDOW_WIDTH 0.025
#define WINDOW_HEIGHT 0.3
...
class Variables
{
// Default values (roughly on the right side of the screen)
BNA_KC_Jet_Grid_jetpackFuel[]=
{
{
safeZoneX + WINDOW_X * safeZoneW, // Default X pos
(safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2), // Default Y pos
WINDOW_WIDTH, // Width
WINDOW_HEIGHT // Height
},
"(((safezoneW / safezoneH) min 1.2) / 40)", // ?
"((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)" // ?
};
};
I thought it might have been the sizes for the preview in the "Customize Layout" menu, but after swapping the values as a test, nothing changed
Asking since I'm trying to figure out why my texture (32px x 256px) is appearing distorted
distorted?
The height and width are swapped, second attachment is the image file
I tried deleting the values, just to see if anything changed but there wasn't anything that I noticed
this texture doesn't look distorted, though?
Yeah, it's just the preview that's distorted
i mean the stuff on the screen is preview
The image I highlighted here is the preview image I have set up
if you mean this - it kinda looks like you have extra class or something with similar popup hint 
Had to omit some code from the beginning of BNA_KC_Jet_Dialog to make it all fit
class RscTitles
{
class RscPicture;
class BNA_KC_Jet_Dialog
{
...
controls[] =
{
"background",
"fuel"
};
// See https://community.bistudio.com/wiki/Arma:_GUI_Configuration#Controls
class background: RscPicture
{
idc = 9000; // Id for this control
moving = 1; // Control will be moved when the display is dragged
text = "#(argb,8,8,3)color(0,0,0,0.7)"; // Procedural texture - https://community.bistudio.com/wiki/Procedural_Textures
// Control size
w = WINDOW_WIDTH;
h = WINDOW_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]); // Near the right side of the screen
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)]); // Centers the bar vertically
};
class fuel: RscPicture
{
idc = 9001; // Id for this control
moving = 1; // Control will be moved when the display is dragged
text = "#(argb,8,8,3)color(1,1,1,0.7)";
#define FUEL_WIDTH WINDOW_WIDTH * 0.5// 50% width of background
#define FUEL_HEIGHT WINDOW_HEIGHT * 0.95// 95% height of background
// Control size
w = FUEL_WIDTH;
h = FUEL_HEIGHT;
// Control position
x = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_X", safeZoneX + WINDOW_X * safeZoneW]) + ((WINDOW_WIDTH / 2) - (FUEL_WIDTH / 2));
y = (profileNamespace getVariable ["IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y", (safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2)]) + ((WINDOW_HEIGHT / 2) - (FUEL_HEIGHT / 2));
};
};
};
// UI Grids, used to let the player move the jetpack hud element
class CfgUIGrids
{
class IGUI
{
class Variables
{
class BNA_KC_Jet_Grid_jetpackFuel
{
// Variable for saving the position of the UI control
displayName = "Jetpack Fuel";
description = "Fuel display for jetpacks";
preview = "\BNA_KC_Gear\Jetpacks\Data\Textures\UI\BNA_KC_Jet_Dialog_Preview.paa";
saveToProfile[] = {0, 1};
/*
0: Save X coordinate
1: Save Y coordinate
2: Save width (if resizing is allowed)
3: Save height (if resizing is allowed)
*/
};
};
class Presets
{
class Arma3
{
class Variables
{
// Default values (roughly on the right side of the screen)
BNA_KC_Jet_Grid_jetpackFuel[]=
{
{
safeZoneX + WINDOW_X * safeZoneW, // Default X pos
(safeZoneY + (safeZoneH / 2)) - (WINDOW_HEIGHT / 2), // Default Y pos
WINDOW_WIDTH, // Width
WINDOW_HEIGHT // Height
},
"(((safezoneW / safezoneH) min 1.2) / 40)", // ???
"((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)" // ???
};
};
};
};
};
};
But that's the whole config for my display and the variable for the placement of it
still wut
there are two supposed "Jetpack Fuel" indicator previews on the screenshot. One looks alright. Other doesn't. If you only have one instance in the mod you're loading right now - where does the second come from? Maybe actually checking classes in-game with config viewer can show something 
There's only one preview, the actual display just doesn't dissapear when pressing escape (not 100% sure why, haven't looked into it yet)
If I drop it, so that the hud goes away, there's just the one
so now it's only the red one with seemingly correct x/y coords? Cute
It's just red because I highlighted it
It does use the correct coords, if I move the preview around and then re-open the display, it starts at the top left corner of the preview
Also I just moved the preview around so that it wasn't off-screen
and what are actual values of the variables in profileNamespace if you nil them and restart the game?
restarting the game after nil-ing should populate them with default values, though? At least it does for ["igui_grid_custominforight_w", "igui_grid_custominforight_h", "igui_grid_custominforight_x", "igui_grid_custominforight_y"] on my machine?
oh, those variables
yeah, that can of worms
IGUI_BNA_KC_Jet_Grid_jetpackFuel_X = 0.025
IGUI_BNA_KC_Jet_Grid_jetpackFuel_Y = 0.3
and _w/_h?
because game seems to save them even for the vars that only have {0,1} to save 
Seems odd that it would save it, I'll check it though, re-opening arma
like here's left custom info panel after manually increasing its _w variable:
even when it has saveToProfile[]={0,1}; canResize=0; and can't be resized back by hand 🙃
(although i needed to try it for width change to take effect)
I don't get any kind of output when trying to check "IGUI_BNA_KC_Jet_Grid_jetpackFuel_w / _h
Not even checking with isNil
can you please check on a separate/new profile then?
Still no output, but it does seem to have just been a weird issue on my profile, because it displays correctly on the new one
So I guess somehow I saved those variables to my profile while working on it?
should still be workable as all you really care for are the coordinates of top left corner 🙃
Yeah, I might try and go digging around to fix them manually for my profile
Not a huge deal though, although I did also realize that my math for the default X coordinate is off
i mean "5% left from the right screen border" sounds like a pretty workable default for a bar that should be "somewhere right-ish"
Yeah, but where it appears here in this screenshot is where it showed up, I didn't move it at all
turbowut
WINDOW_X is 0.95 and safeZoneX + WINDOW_X * safeZoneW is used for the x position in every case
well, the values worked alright to display the actual GUI
Yeah, should be like -safeZoneX right?
At least based off this reference I found on the forums
safezoneX = left side of the screen (and it should already be negative); safezoneX + safezoneW = right side of the screen.
like ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * (((safezoneW / safezoneH) min 1.2) / 40)) is one of the default values
last 🧠 move i can think of would be to manually replace all macro entries in the config with their proper values and get them in double quotes, as all vanilla definitions seem to do that (i.e. https://sqfbin.com/uyuxukocaweruqomucuq) 
Wouldn't they always just be replaced with the values, unless you were looking at the raw .cpp files?
yeah, that's probably a brainfart of mine
this comes a bit late but I would make my own check to see if the addon is properly loaded and if not then display message telling the user what to do
Wait, are you the gc8 who wrote this:
https://forums.bohemia.net/forums/topic/223419-jet-auto-landing-carriers/
Hi Today I discovered that the jets can auto land to aircraft carrier. This is super cool, though in some circumstances the landing fails to a crash. My question is how do you use the setAirportSide command? I placed the carrier in the editor and gave it name tc then I have this script line: tc s...
If yes, mind if I use your script in a mod I'm developing?
yes thats me. use away 🙂
Q: I have a scenario in which, some CT_LISTNBOX vertical scrollbar width are edging into the x coordinates of some neighboring controls.
I wonder, what is the 'default' width and height for scrollbars, and how best to accommodate this scenario so that I do not lose the left edges of neighboring controls.
thanks...
Isn't there a width defined in Class Scrollbar {};
well, there "is" but most of them appear to be 0. so hence what is the default A3 minimum width?
but moreover, how come the scrollbar geometry leaks over the w of the control? interferes with neighboring x dimensions.
or at the very least I need some comprehension defining what that leakage is in order to make appropriate adjustments on my part.
picture thousand words...
https://pasteboard.co/smoUCcCk584o.png
I ended up remediating a bit, incorporated some internal margins in my filtering groups (search by, sort by, direction). not ideal, but the cohesion is strong and far easier than wondering at scrollbars.
Not sure where my post that I made earlier went but:
How can I make my UI element get hidden when the user presses backspace in zeus, camera, etc. when all of the other elements are?
henlo my guys i am searching for an arrow without a tail (facing preferably right) image in the base game files would anybody happen to have the magical file path to this
surprised theres not a list of commonly used base game images tbh
Use 3den Enhanced Texture Finder or a similar mod to search for icons and images.
ah roger doger thanku
What is the syntax to pass a variable into a script-created GUI event handler such as:
_testVar = "Yadda yadda";
(_myCtrlVar displayCtrl 4321) ctrlSetText "Ok";
(_myCtrlVar displayCtrl 4321) ctrlRemoveAllEventHandlers "MouseButtonClick";
(_myCtrlVar displayCtrl 4321) ctrlAddEventHandler ["ButtonClick","[_testVar] call fnc_myFancyFunction;"];
In the target function I just get any. I'm assuming that it has to do with proper use of quotation and have tried various versions.
Set the variable in the control's or display's namespace instead
Ah, thanks.
for numbers and strings there is also the solution to use format:
_testVar = "Yadda yadda";
(_myCtrlVar displayCtrl 4321) ctrlSetText "Ok";
(_myCtrlVar displayCtrl 4321) ctrlRemoveAllEventHandlers "MouseButtonClick";
(_myCtrlVar displayCtrl 4321) ctrlAddEventHandler ["ButtonClick", format ["[%1] call fnc_myFancyFunction;", _testVar]];
``` but my personal opinion on that is somewhere between 🤨 and 🤮
Ok, cool. I'll stick with the namespace. It had slipped my mind.
When looking at various dialog structures, I see that sometimes background elements are in
class controlsBackground {};
``` and sometimes they're lumped into
```sqf
class controls {};
``` Is there a compelling reason to have them in `controlsBackground`? They seem to function the same either way.
Background controls are in the background, that's the difference.
If you have problems with static texts being drawn in front of controls the user interacs with, then move them to controlsBackground.
Ok, so it's more of a layer control issue.
Does anyone know where the RotorLib gauges are stored within the arma code?
I’ve been searching through PBOs and I’m so lost
I made some progress, but now I’m at another block.
{
idc=147;
x="29.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
y="2.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w="8 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h="1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
tooltip="$STR_A3_RSCDISPLAYGAMEOPTIONS_RTDTEXTSHOWGAUGES_TOOLTIP";
};```
I’m trying to find the code within GUI that toggles the “show gauges” option from grey to the normal menu color.
I specifically want to re-write the code so that the “show gauges” option is not affected by the code that greys out all of the advanced flight options.
Still never figured out how to hide this automatically whenever the other ui elements are hidden.
Is it something I need to implement myself? Like if (shouldHideGUI) then { hide element } or something similar?
I depends how you UI elements are added and how the original functions hides the controls
usually it's something like
allControls _display apply {_ctrl ctrlShow false;}
If you controls are part of the display that calls that function they will automatically get hidden.
What you could do is add another keyDown EH and when it's pressed, check if controls are visible and if not, hide yours als well
Hello! Does anyone happen to know what IDD the weapon cursor belongs to? I'm trying to write a function that will edit the control, but am having a difficult time locating it.
I don't think a cursor is a regular GUI element
What would be a "good" control to check if its visible?
Although thinking about it now, I guess I would have to check if a zeus control is hidden; and if a eden one is hidden; and if a "normal gameplay" one is hidden; and then hide mine if all three of those are
Or could I just check if the whole display is hidden?
The display won't be hidden. Its the control's.
I check a control that cannot be hidden except with backspace.
Anyone have any idea where I might find the watch UI in the Config Viewer?
is there any template for a simple mod?
I would for exapmle activate some pp effects to the night vision... And i just dont know how to make it to a mod file
I had a feeling this was the case, but I was hoping someone here would be able to prove me wrong. Thanks anyway!
Q: the docs suggest _name, however, is that rather a _path, for lbSetPictureRight, analog to its left hand side aligned counterpart?
https://community.bistudio.com/wiki/lbSetPicture
https://community.bistudio.com/wiki/lbSetPictureRight
never mind turns out is probably a non sequitur. am not hundred percent confident CT_LISTBOX has support for arrow left/right buttons the same way CT_LISTNBOX does. which is probably for the better.
You are right. It's path in both cases and the examples don't make that clearer. Will fix that when I am back home
Sanity check, we have no way to adjust Z position of a 2D control?
I mean kinda. If x is left,right and y is up and down. Then z would be forward and back. Basicly what pice of ui element would be in front of another ui element.
No, layering cannot be adjusted
The order of creation is what defines that I believe. Perhaps something like ctrlShow /ctrlSetFade 1 changes it?
Is there a way to get the names of all currently shown controls? (or well, the idcs)
allControls
I just mean all of the ones showing on the screen, not just a given display
I know I could just loop over allDisplays and then allControls _x, but doesn't that also give controls that are hidden?
https://community.bistudio.com/wiki/allDisplays
Check the notes there
Oh it quite literally gives the exact layers I was going to check for, "3DENDisplays_displays" and "CuratorDisplays_displays"
I'd need the camera one as well, but if I had to guess it'd just be under "GUI_displays"
Q: the URL escapes me, but I am pretty sure there is a BIS wiki page for keyboard definitions and such. and/or maybe it was a CBA thing that the definitions were made, I'm not positive that much. just looking for the definitions, better yet an actual .hpp I may consider utilizing. thanks...
ah, you can include the following, it is an embedded resource?
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
Q: about EH such as onKeyDown+onKeyUp, whether I process the key event, then the function should return what? true? false? thanks...
yes, it is part of the base game
true blocks the default event, false doesn't
blocks the default event, not sure what that means... signaling handled (versus not)?
got it. thanks...
also need a bit of guidance... I have some 4 or so different CT_EDIT controls, each of which can 'see' a DIK_NUMPADENTER key event. but I do not want for the key states to get out of sync necessarily, especially over the whole display...
actually, delay that... onSetFocus+onKillFocus should clear the EH slate for each of the controls. perhaps seems like the better thing to do, as opposed to, for instance, keeping a DISPLAY state.
Anyone able to point me in the direction of how to 'scroll down' the ST_Multi with a button press rather than a keyDown?
I have a UI where the text is multiline and it seems counter intuitive to have to click into the box and press the down arrow to read it all. I've got 2 buttons for up and down I'd like to use but not sure how to actually move the focus down
ctrlSetScrollValues
I'm not sure if other controls than those listed can have scrollbars. If that's an issue then you could just wrap them in a ControlsGroup.
I'm looking for a modder who's willing (commisioned) and able to make a small mod that overhauls the ace medical unconscious screen. I've tried doing it myself but no luck unfortunately. Not sure if this is the right place btw.
Just trying to find the right ppl.
Thank you. 😄
Anyone know how I can define my own grid using Pixel Grid System?
I want to create dialogs that can look and stay the same across all aspect ratios.
Having some troubles inputting the X and Y.
why not just click the -- Custom -- drop down list to get the X & Y?
I managed to solve my problem, it's alright.
onEditChanged is a welcome surprise in 2.14
Yep, very nice one
Always had to use onKeyUp but this has certainly helped out for updating edits
How do I edit RscEdit border color? Can't seem to figure it out looking at config.
I actually need to edit caret color, it seems to use border color.
Caret uses text foreground color
Same as the border
Thanks, must be the font then
Seeing this right now
How i can custom sroll action menu. I want to move position, can you tell me how. Sorry, I'm not good at English.
Options -> Gameplay -> Layout
I want like this
yeah you can do that
you can drag it from the left
How to export for sqf file?
I want to use for my altis life server
I want like same exile
@tranquil iron
@blazing yacht
What do I have to do to use it in the server?

How i can move a position of scroll menu in Altis life to be like exile , Sorry if reading this is confusing, I'm not good at English. @tranquil iron
does config hierarchy matter for gui elements? i.e if i have an arm and then icons on that arm that i show/hide by idc, can i have those icons nested within the arm's class for organisation's sake? no
How do I get the control of a dialog that has no IDC?
class BLUFOR_Picture : RscPicture
{
text = "a3\ui_f_orange\data\displays\rscdisplayorangechoice\faction_nato_ca.paa";
x = HORZ_CENTER - GRID_W( 15 / 2 );
y = VERT_CENTER - GRID_H( 15 / 2 );
w = GRID_W( 15 );
h = GRID_H( 15 );
onLoad = "(_this # 0) ctrlSetTooltipColorShade [0,0,0,1];";
tooltip = "Play as west faction";
};
https://community.bistudio.com/wiki/allControls iterate through them till you find it
How does Debug console do it? Can't seem to make border and caret to be full color.
Tried ctrlSetPixelPrecision but no luck
Pictured is colorText[] = {1,0,0,1}; yet border and caret are half transparent
Also tried shadow = 2;, no result
Is there some hardcoded magic going on for Debug console fields?
Noticed that one of my RscEdits also has full border and caret color and I have no idea how its done 
If you change the colour of that one to red, how does it look?
Noticed that border becomes thinner depending on Y position (have several RscEdit elements and they're inside controls group)
The upper and lower borders there are a different colour from the left border and the caret.
Yeah, top and bottom are full color on other elements or depending on scroll position
Tried adding some numbers to original problematic RscEdit's x and y and there seem to be no change
Bigger font too, still half-transparent
Tried x=0; y=0;, same picture
All possible combinations of colors, copied stuff line by line from my other control, still no idea what's going on
Are you running any FSAA or display scaling?
No FSAA
If you mean Windows UI scaling, then yes. Still, all these example are under same environment
Nah, that thing where you render at a different resolution to the display resolution. I think it's rarely used for Arma.
Its at 100%
I guess the UI might actually have subpixel blending and things aren't properly aligned here.
Not sure exactly how wide those hairlines are supposed to be.
but then the colour difference is still crazy :P
x = 0; y = 0; w = 1; h = 1;, still the same 
Did ctrlSetPosition with long and slow ctrlCommit, control moves yet looks the same
It is indeed seems to be an issue of lines being drawn sub-pixel, but I can't figure how why other controls are fine and this one isnt
No luck with ctrlSetScale and weird values
is there any way to change order of controls in the gui editor or do i be out of luck
Can't seem to display my rsctitle, anyone mind giving it a look?
Config: https://pastebin.com/jmGAehym
What I'm doing:
("KJW_Sticker" call BIS_fnc_rscLayer) cutRsc ["KJW_MedicalExpansion_Core_bagSticker", "PLAIN"];
private _display = uiNamespace getVariable ["KJW_Sticker", displayNull];
if (isNull _display) exitWith {systemChat "Doesn't exist."};
{
private _control = _display displayCtrl _x;
_control ctrlSetText "HELLO";
} forEach [2120,2121,2122,2123];```
Image to show it's the right classname:
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.
You should add variable for your display onLoad
onLoad = "uiNamespace setVariable ['KJW_Sticker', _this #0];";
ah, thx
still doesnt show but now complains of this which makes sense
oh probably because of duplicate classes
nope, still doesnt show after fixing that
RscPicture {
idc = 2123;
So its waiting .paa, not text for that
take 2123 away from array and test again
yeah i know that part
it just doesnt show at all even when i note out the settext stuff
is the attributes class required inside each gui element?
(and adding a duration with cutrsc doesnt work)
How so?
Did you change that and that works?
no its still not showing
http://killzonekid.com/arma-scripting-tutorials-gui-part-3/
If you take a look, it works.
even with a duration in the cutrsc line
importing into gui editor returns this error too
except all the elements are there
though are all the same huge size
nvm thats because i forgot to set the params properly in the thingy bob
still stuck on this, current config version:
https://pastebin.com/zHE29sBf
current code:
disableSerialization;
("KJW_MedicalExpansion_Core_bagSticker" call BIS_fnc_rscLayer) cutRsc ["KJW_MedicalExpansion_Core_bagSticker", "PLAIN", 1, true];
private _display = uiNamespace getVariable ["KJW_MedicalExpansion_Core_bagSticker", displayNull];
if (isNull _display) exitWith {systemChat "Doesn't exist."};
{
private _control = _display displayCtrl _x;
_control ctrlSetText "HELLO";
} forEach [2120, 2121, 2122];```
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.
holy fuck im such a goober i forgot to include the base game defines
however... rscpicture is hiding rsctext stuff, how 2 fix
I dont know if there are layers. But have you tried to draw a picture first then text ?
the order of the entries in the config determines the layer
also interactible elements will always be moved to the front when interacted with
is there any way to make rscpicture go behind rsctext in the gui editor or am i just going to have to lump it there
it is quite annoying because im just trial and erroring rn
(shifting the order in the list dont work)
got there in the end
Hi, I am trying to make a custom leaflet to show at players. Arma 3 leaflets are 722 x 1024,but thats not a size compatible with .paa files, or atleast not the gruppe adler converter.
Any ideas on how can I get around this?
I tried using the ArmA tools "imageToPAA" but its erroring.
Yes! That's what the official biki says.
that doesnt mean theyre in that format
CO10 Escape does this. I checked their leaflet file and it's 1024x1024 PAA with horizontal centering
By the way I figured it out, If I used TexView2 i can export it as .paa without issues.
you can make it 512x1024 or 1024x1024
dont do that
do this
If you do wrong size it'll be broken, most likely wrong color mess
I think the edges will be cut off, so you can hide some easter eggs there
I think it just only renders the middle pixels.
leaflets aren't transparent 😄
Yeah, I meant like in terms of width
Although in this example the borders are zero alpha I think.
this is the icon i use for my mod, note its 1024x1024 but is not 1024 vertically
mk that works
any progress?
Getting back to this issue, is it possible to make ctrlSetPixelPrecision affect border and caret drawing? Don't think it will break much and I'm pretty sure having constantly solid border and caret is a good thing in all cases. @tranquil iron
If this is feasible, I'll make a ticket
Are we able to color the perlin noise, or use colormap such as rainbow to the 2d perlin noise? I'm just wondering if we will be able to mimic the weather radar based on weather values we can get.
So that we can make weather radar image and use it as UI texture on screen
Since it is gui, pixel by pixel computation would also work, but I'm worried that the computation will take a lot of time even it is run occasionally.
It looks like the caret has pixel precision enabled by default
Or well, it should draw a 3pixel wide line. I could make it 4 pixel?
The border itself has pixelPrecision on by default, but the border could potentially be clipped because the clipping of outer bounds is not pixel precise
https://s.arma3.io/Arma3Retail_DX11_x64.exe This is with the clipping extendded to pixel precision. Maybe that helps you, can you try that?
Is it possible to format a rsctext? I'm looking to format it at least on opening with something displaying the number of magazines in a players inventory.
Use RscStructureText.
or is it about "can i do something like format ["Hello %1!", "World"]; with Structured Text"?
Hoping to get the title of a listbox display this stuff.
format["[%1 Wood, %2 Scrap, %3 Nails, %4 Concrete]",({_x == "NMIB_WoodPlanks_Itm"} count (items player)),({_x == "NMIB_ScrapMetal_Itm"} count (items player)),({_x == "NMIB_WoodNails_Itm"} count (items player)),({_x == "SLAY_concrete"} count (items player))]
But I don't know jack about UI, and my buddy who made the listbox for me several years ago is MIA to assist me.
A listbox has no title, it only has text per entry. And these are just stupid text which cannot be formatted.
Can you share a screenshot of the UI?
use imgur or so
Looks like a RscEdit control to me
Like the title part does?
class RscText_1000: RscText
{
idc = -1;
text = "Furnishing Menu"; //--- ToDo: Localize;
x = 0.314375 * safezoneW + safezoneX;
y = 0.302 * safezoneH + safezoneY;
w = 0.37125 * safezoneW;
h = 0.033 * safezoneH;
};
I got this in the .hpp, but again all this is above me skill set, a buddy assembled this for me a long while ago, I'm getting around to changing it to material cost instead of money so I'm dusting it off to modify it lol.
Ye, hoping to make it have the numeric amount of materials on the player to the right of the title
"Furnishing Menu - [15 Wood, 0 Scrap, 0 Nails, 0 Concrete]"
I see
you just need to change the text of the control when the display is loaded.
_ctrlTitle ctrlSetText format ["Furnishing Menu - [%1 Wood, %2 Scrap, %3 Nail, %4 Concrete]", _wood, _scrap, _nails, _concrete];
Do you know how to get the amount of the materials?
I'm using this, but I don't know if its the best possible method to do so.
({_x == "NMIB_WoodPlanks_Itm"} count (items player)),
({_x == "NMIB_ScrapMetal_Itm"} count (items player)),
({_x == "NMIB_WoodNails_Itm"} count (items player)),
({_x == "SLAY_concrete"} count (items player))
it returns right in the debug console
format["[%1 Wood, %2 Scrap, %3 Nails, %4 Concrete]",({_x == "NMIB_WoodPlanks_Itm"} count (items player)),({_x == "NMIB_ScrapMetal_Itm"} count (items player)),({_x == "NMIB_WoodNails_Itm"} count (items player)),({_x == "SLAY_concrete"} count (items player))]
prints: "[15 Wood, 0 Scrap, 0 Nails, 0 Concrete]"
Looks good.
_ctrlTitle ctrlSetText format["Furnishing Menu - [%1 Wood, %2 Scrap, %3 Nails, %4 Concrete]",({_x == "NMIB_WoodPlanks_Itm"} count (items player)),({_x == "NMIB_ScrapMetal_Itm"} count (items player)),({_x == "NMIB_WoodNails_Itm"} count (items player)),({_x == "SLAY_concrete"} count (items player))]
so now your title control just needs an idc
idc = -1;
Change -1 to a unique number.
does the display have an IDD?
Gonna go with 133702 since the UI has 1337
What else 🤣
findDisplay 1337 displayCtrl 133702 ctrlSetText format["Furnishing Menu - [%1 Wood, %2 Scrap, %3 Nails, %4 Concrete]",({_x == "NMIB_WoodPlanks_Itm"} count (items player)),({_x == "NMIB_ScrapMetal_Itm"} count (items player)),({_x == "NMIB_WoodNails_Itm"} count (items player)),({_x == "SLAY_concrete"} count (items player))];
Execute this in the script where you also fill the edit control.
Should work if I didn't do some typo.
Would you happen to know if its possible to split the lines of the listbox? Sorry to jump to the next thing lmao.
class RscListbox_1500: RscListbox
{
idc = 1;
x = 0.319531 * safezoneW + safezoneX;
y = 0.346 * safezoneH + safezoneY;
w = 0.360937 * safezoneW;
h = 0.374 * safezoneH;
onLBDblClick = "execVM 'scripts\Damian\buyObject.sqf';";
class ListScrollBar
{
color[] = {1,1,1,1};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
got this in the .hpp
Oh
So that's how it's done
You can't add a line break there if that's what you mean.
I'm hoping to maybe split them in half left to right so I can make the title of the actual object appear maybe aligned to the right and the recipe text to the left
idk if thats possible tho
right about where the --- is on the screenshot
I glanced the listnbox wiki page but I was looking at it like a unthawed caveman seeing a piece of technology for the first time
I tried to swap the above listbox to "listnbox" at the end of the class name but i didn't get off so lucky.
The entire code would need to get rewritten for it.
Oooff.. Yeah it likely won't happen then, I'm already messing with things above my skillset.
If my buddy didn't hook me up with this years ago i wouldn't even have this much
I'm surprised I managed to get the lines to appear differently in the list vs the actual craftable stuff, that was like a nasa probe landing successfully to me
Just try it and post here if you need help.
Thanks for the help m8 with the title stuff, I'll try the listnbox eventually, I tried swapping the current one over to it but yeah it gave me errors.
Hey @quiet arrow, regarding that menu you assisted me with last night.
Do you think its possible to change indiviual line colors on the interface?
I'm considering making ones that the player can't afford turn red and the ones they can as green.
Didn't notice any change at all compared to latest dev build.
Border is being drawn sub-pixel depending on scroll position in this game, it is reliably one pixel wide horizontally though
In my problematic control both border and caret are always drawn sub-pixel
This RscEdit is not scrollable though, but it will probably change to full pixel if scrolled
Can't see it being 3 pixel wide, feels like 1 pixel wide line that turns into opaque 2 pixel line depending on sub-pixel position
Zoomed attachment for border behaviour during scrolling
do I need to apply an idc# to the list to do that?
like you taught me last night
Shouldn't it already have one?
Hmm.. leme see
I don't think I can solve that.
This behaviour is expected and fine, I was just pointing that borders are still sub-pixel in that exe you linked, and that maybe ctrlSetPixelPrecision should be taken into account when drawing these
Or at least for caret, because its really hard to see in some font and size combinations
" should be taken into account when drawing these" it already is.
Or rather, its forced on and you can't turn it off
Why is it still subpixel then? 🤔
Unless forced on means no rounding
Anyone has ever tried using onMouseButtonClick for example on an CT_BUTTON control? I can't seem to make it work 🤔
onButtonClick works fine, but it doesn't give me the extra modifiers 🙃
remember its without the "on"
This is in config, so it should be there.
Works fine
hmm... might be because I'm using it as part of CT_LISTNBOX then 🤔
thx for testing it, ill try something else then.
so where are the modding tools for gui i cant find them in the pinned links perhaps i just didnt notice it?
Modding tool?
I bet everyone who does UI just writes in text editor
i think you mean this: https://community.bistudio.com/wiki/Arma_3:_User_Interface_Editor
I got this ui i made with dialogs, but what could cause such lag when closing and opening dialogs? https://streamable.com/kjil87
There is even times where it just freezes and doesnt do anything anymore
you can see when that first dialog opens after pressing the close button all the contents just load really slow
Some bad scripting
where can i find sqfbin again so i can post the code that behind that main first screen
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.
https://pastebin.com/1Y9gyTZ5 what in this code could be the lead up to such lag?
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.
this is the dialog class: https://pastebin.com/TXpgvkjV
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.
thats one other thing i was thinking abt
if (profileNamespace getVariable ["MRTM_smallAnnouncerText", false]) then {
((findDisplay 8000) displayCtrl 2806) cbSetChecked true;
} else {
((findDisplay 8000) displayCtrl 2806) cbSetChecked false;
};
Why so complicated?
That whole script can be reduced to half its size
? how come
use the profileNamespace variable on the right side of cbSetChecked
ah damn, thats indeeed a smart solution
if ((getMissionConfigValue ["MRTM_enableGroups", 1]) != 1) then {
ctrlEnable [1605, false];
};
Same here
onKeyUp = "[_this select 0, _this select 1, 'drones',true] call MRTM_fnc_onChar;";
This could also be an issue. Does this change the view distance?
yep the drone slider you see on that first gui is for that
Check with some diag_log that this is not executed multiple times when the UI is opened.
Also, instead of onChar you might wanna consider the new EditChanged Event Handler. Much better
hm seems i foudn the issue somewhere, the logging on whe the menu opens logged almost 18000 times in less ythen 3 seconds 
First I'd make sure to add the Event Handlers to the controls after the UI was set up.
Because adding text to edit boxes for example, triggers their EH.
Same for checkboxes, so you might already run into a loop there.
im just gonna add debugs so i know from where the call of the script is done
I'm returning to GUI design after a number of years and I'm getting resource openRscAssetIdentificationDialog not found
Description.ext
#include "\a3\ui_f\hpp\definecommoncolors.inc"
#include "\a3\ui_f\hpp\definecommongrids.inc"
#include "\a3\ui_f\hpp\defineresincl.inc"
#include "include\defines.hpp"
#include "include\RscAssetIdentificationDialog.hpp"```
RscAssetIdentificationDialog.hpp
class RscAssetIdentificationDialog
{
idd = 1337;
class controls
{
////////////////////////////////////////////////////////
// GUI EDITOR OUTPUT START (by J. Hachi, v1.063, #Zediwu)
////////////////////////////////////////////////////////
class baseFrame: RscFrame
{
idc = 1800;
x = 0 * GUI_GRID_W + GUI_GRID_X;
y = 0 * GUI_GRID_H + GUI_GRID_Y;
w = 40 * GUI_GRID_W;
h = 25 * GUI_GRID_H;
};
class vehicleTypePicture: RscPicture
{
idc = 1200;
text = "#(argb,8,8,3)color(1,1,1,1)";
x = 8 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 31.5 * GUI_GRID_W;
h = 21 * GUI_GRID_H;
};
class vehicleGroupComboBox: RscCombo
{
idc = 2100;
x = 0.5 * GUI_GRID_W + GUI_GRID_X;
y = 3.5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
};
class titleStructuredText: RscStructuredText
{
idc = 1100;
x = 0.5 * GUI_GRID_W + GUI_GRID_X;
y = 0.5 * GUI_GRID_H + GUI_GRID_Y;
w = 39 * GUI_GRID_W;
h = 2.5 * GUI_GRID_H;
};
class vehicleClassComboBox: RscCombo
{
idc = 2101;
x = 0.5 * GUI_GRID_W + GUI_GRID_X;
y = 5 * GUI_GRID_H + GUI_GRID_Y;
w = 7 * GUI_GRID_W;
h = 19.5 * GUI_GRID_H;
};
////////////////////////////////////////////////////////
// GUI EDITOR OUTPUT END
////////////////////////////////////////////////////////
};
};```
do I need to have
#include "include\RscAssetIdentificationDialog.hpp"``` inside a config class in the description.ext? RscTitles maybe?
#include does only “dumb” copy and paste - which means where you do #include is important
AKA, if you have #include in your included file, it may do a double-declaration which is illegal
And, how do you try to open that?
createDialog "RscAssetIdentificationDialog";
I originally had #include "include\defines.hpp" inside RscAssetIdentificationDialog.hpp but moved it out to resolve an undefined class error
Does your Config Viewer tells your mission's config?
If not, your config has an error so failed to compile/include into the mission
If yes, something else is broken... maybe
Just reopened it and it works
However its no longer at the center of the screen like it was showin in the GUI Editor
Okay, it sounds like you forgot to Ctrl+S
Description.ext only reloads whenever it saves/loads
and I am unsure how to load my code back into the gui editor to edit further
I thought it was saved already, I was expecting it to only load what was saved
you are using GUI_GRID which is anchored to the left bottom of the screen. you want to use GUI_GRID_CENTER instead: https://community.bistudio.com/wiki/Arma_3:_GUI_Coordinates#GUI_GRID
Thank you @quasi granite
How do I go about setting a scrollbar's width so that I can choose the number of times it can scroll across? I'm trying to emulate a set number of pages
oh you meant scrollbar 😄 nvm
with slider I think it would be easier to have those pages
Hello community, I hope this is the right channel. In our group, we are experiementing with integrating Jeroen's Limited Arsenal into Liberation RX mod. That is basically original version from the github of the arsenal crate used in Antistasi where you can transfer from / transfer into stuff. Now, see bellow screenshot, the arsenal has ui issue, but only when it is opened with "transfer to" command...all other uses of this arsenal addon do not have the issue. Basically, we are seeing these white icons and as you move mouse, each one is individually revealed and hidden again. I guess it may have to do with this code from githug being out of date with someARMA ui changes. Anyone has any suggestion or had seen smth similar around? The functionality is however NOT affected. Thanks!
Github source: https://github.com/Jeroen-Notenbomer/Limited-Arsenal
Can I add a PPEffect to a display itself? Say if I wanted to change the effects on the map display only.
PPEffect does not do anything with a GUI
😦
@finite stratus Yeah I remember fixing that bug at some point after an Arma update.
I would strongly recommend starting from the Antistasi version because it has dozens of bugfixes. Should only be a couple of globals to fill in.
Thanks man, appreciate!
anyone have a script already to display the class name && idd/idc of displays/ctrls as they are created? Want to grab some menu displays.
Just add mouseEnter EH to all controls of the display and print idc and classname.
Hello,
How do i use this to get correct position my gui.
its working correclty with 16:9 aspect ratio , but with all aspect rations.
(dont know yet what is screen resolutuin/ ascpect ration in picture because some of user just send bug report)
it should look like this.
How did you defined them?
class GVAR(back): RscPicture {
idc = 120;
style = 48;
type = CT_STATIC;
x = safeZoneX + safeZoneW - 2.8 * 3 / 4;
y = safeZoneY + safeZoneH - 1.6;
w = 60 * GUI_GRID_CENTER_W;
h = 30 * GUI_GRID_CENTER_H;
};
picture (notebook)
//arrow right
idc = 122;
style = 48;
text = QPATHTOF(images\brside\next.paa);
tooltip = "Next";
onButtonClick = QUOTE([1] call FUNC(browse));
color[] = {0.9,0.9,0.9,0.9};
colorActive[] = {0.2,0.2,0.2,0.2};
colorDisabled[] = {1,1,1,1};
x = GUI_GRID_CENTER_X + 37 * GUI_GRID_CENTER_W;
y = GUI_GRID_CENTER_Y + 24 * GUI_GRID_CENTER_H;
w = 4 * GUI_GRID_CENTER_W;
h = 1 * GUI_GRID_CENTER_H;
//tabs right side
class GVAR(home): RscActiveText {
idc = 201;
style = 48;
text = QPATHTOF(images\brside\h.paa);
tooltip = "Introduction";
onButtonClick = QUOTE(['home'] call FUNC(tabs));
color[] = {1,1,1,1};
colorActive[] = {0.2,0.2,0.2,0.2};
colorDisabled[] = {1,1,1,1};
x = GUI_GRID_CENTER_X + 41.3 * GUI_GRID_CENTER_W ;
y = GUI_GRID_CENTER_Y + -3.5 * GUI_GRID_CENTER_H;
w = 1.5 * GUI_GRID_CENTER_W;
h = 1.5 * GUI_GRID_CENTER_H;
};
---> // rest just changhin
x = GUI_GRID_CENTER_X + 41.35 * GUI_GRID_CENTER_W ;
y = GUI_GRID_CENTER_Y + 14.5 * GUI_GRID_CENTER_H;
What is back? Why it uses safeZones instead of macro?
Notebook is back, big picture. So i should change to macros.
I don't remember was there some reason, maybe not 
You should use RscPictureKeepAspect or resize the image via script to correct aspect ratio
Hmm 🤔 how would I do that?
These are parts that I don't understand how to setup correctly
Just inherit it instead of RscPicture
given that image is used as a background for other UI elements - i'd say it's better to inherit basic RscPicture and tie its size to grid as well 
Hmm, seems it works when i use marcos , need test with 2k/4k and others too. Dont have all options on current pc.
class GVAR(back): RscPicture {
idc = 120;
style = 48;
type = CT_STATIC;
x = GUI_GRID_CENTER_X + -9.5 * GUI_GRID_CENTER_W ;
y = GUI_GRID_CENTER_Y + -4.7 * GUI_GRID_CENTER_H;
//x = safeZoneX + safeZoneW - 2.8 * 3 / 4;
//y = safeZoneY + safeZoneH - 1.6;
w = 60 * GUI_GRID_CENTER_W;
h = 30 * GUI_GRID_CENTER_H;
};
You actually can have multiple resolution/ratio only in your computer - it's called “windowed”
aaa
Thanks
Yeh, old in left corner and new center.
Thank you guys.
But do i need for future add some functio/ or something else to get picture always been correct position with tabs
Ok, so this (https://community.bistudio.com/wiki/User_Interface_Event_Handlers#onButtonDown) says:
Fired on: The left mouse button is pressed over the button area or a key on the keyboard is pressed.
Actual effect seems to be that regardless of where the mouse cursor currently is, pressing space on the keyboard refires the onButtonDown event for the previous control you clicked on?
Is this really intentional?
I guess because it's still focused. Doesn't make sense though.imho
having some trouble coloring some HUD elements, probably a quick solution I'm missing as I'm very new to GUI. Trying to color this icon, however it doesn't seem like _TAG_Picture ctrlSetTextColor [57, 255, 255, 1]; does anything to the color
_TAG_Picture = findDisplay 46 ctrlCreate ["RscPictureKeepAspect", 04102002];
_TAG_Picture ctrlSetPosition [(0.83 * safezoneW + safezoneX) - _ImageSize, (safeZoneY + safeZoneH * 0.95) - _ImageSize, safeZoneW * _ImageSize, safeZoneH * _ImageSize];
_TAG_Picture ctrlSetTextColor [57, 255, 255, 1];
_TAG_Picture ctrlSetAngle [0, 0.5, 0.5, false];
_TAG_Picture ctrlCommit 0;
Color components are 0-1
If you want it in 0-255 range in your code, do 57/255, 255/255, 255/255
oh I see
I knew it had to be something simple I was missing; I will try this
that worked! thank you
Hello, I'm trying to make a dialog that shows player profiles and I'd like it to include their character mugshots in a RscPicture. Can anyone help me with this?
I tried loading the images from CfgFaces /Man_A3, but that just shows textures.
@teal wraith I don't believe there is are mugshot images that exist for every face option. You could create them yourself, or create a live camera looking at the players face
Yeah, there are no mugshots in the game, you'll need to make it yourself.
ui2texture is powerful enough to do it, but it requires fairly advanced scripting
- Position player(s) you want to mugshot before a scripted camera
- Have a display with RscTexture that shows render2texture view of the camera
- ui2texture draw this display into a texture to use later elsewhere
Not sure about having proper mugshots of players with their custom faces and such, don't think you can replicate their head exactly with createSimpleObject, maybe you'll need to photo a real player unit
You probably can do some hacky stuff like local attachTo to pull them out of the game world for a mugshot
Since all this stuff is local client side each client will have to do it, so local attachTo hack might be problematic for local units
There is also a problem of resource streaming so you don't take mugshot too early and it doesn't turn out without a texture or in lower LOD\MIP
Welcome to Arma modding, enjoy the pain
publicTexture "#(rgb,1024,1024,1)ui('SomeProceduralTexture','asddsa','ca')" scripting command to broadcast a texture when?
inb4 there is much easier solution and I'm just overthinking it
Or you just prepare a mugshot for each CfgFaces that you'll need beforehand and store it in your mission
Spawn a clone up in the sky and show them via PIP
Can a close have custom profile face though? 🤔
You can setFace the custom face model but idk how to find the texture and it you can set it.
It's an edge case tho.
setObjectTextureGlobal
Yeah, but it will require each client to do their own ui2texture
I meant to broadcast whatever is stored by that texture path locally to other clients
So say client can render some texture and then send it to others exactly as they have it
The texture only lives on the GPU
If you want to implement streaming texture from GPU back down to CPU/RAM, encoding that and sending it over network and then doing the reverse, then have fun.
But I won't be doing that
Omg is that what might cause ui2texture to render the target black?
I have had nightmarish issues regarding using ui2texture on massive scales while working on this mod https://steamcommunity.com/sharedfiles/filedetails/?id=3009840540
What is what?
Pretty sure you can't find it
If the textures for ui2texture are stored on the gpu, are they just temporarily stored? Is there a limit or other restrictions on how many can be stored? My issue was over time and with a large number of ui2texture executions, that those displays eventually end up showing as black
They can be thrown out of GPU if it needs more free memory.
But if the texture is on-screen it should just re-render again. (Though that is hard to test, that might not work right)
I think thats exactly whats happening...
They would never turn black on screen, just offscreen. No matter how many safety nets or recalls to try and switch it back worked either, it would remain black
Also, idk if its related, but I found if you use ui2texture on something thats outside of the screen bounds or behind terrain, then it would be black too. Presumably because the object isnt being rendered I guess
It is only initialized on first render
