gc8 970 Posted April 29, 2019 Hi Does anyone know if it's possible to add your GUI controls to arma so that you can use the layout editor in the options to change your control position? I think some mod did this but I can't remember which one thx! Share this post Link to post Share on other sites
Mr H. 400 Posted April 29, 2019 Ace 3 does it for their stamina bar, if that helps. Share this post Link to post Share on other sites
gc8 970 Posted April 29, 2019 57 minutes ago, Mr H. said: Ace 3 does it for their stamina bar, if that helps. Thanks, at least I now know it's possible. But Ace3 is probably a big mod , hard to find anything from there... Share this post Link to post Share on other sites
Mr H. 400 Posted April 30, 2019 Have a look here: https://ace3mod.com/wiki/framework/ui-framework.html and https://github.com/acemod/ACE3/tree/master/addons/ui Share this post Link to post Share on other sites
gc8 970 Posted April 30, 2019 3 hours ago, Mr H. said: Have a look here: Thanks I went through the scripts there but didn't find anything Share this post Link to post Share on other sites
Larrow 2795 Posted April 30, 2019 On 4/29/2019 at 5:15 PM, gc8 said: if it's possible to add your GUI controls to arma so that you can use the layout editor in the options to change your control position? What exactly do you mean by this? Add your own control type to the gui editors right click ( insert element ) list. You just want to import your own gui so you can reposition controls. 1. Most probably do-able, but you will need to overwrite \a3\functions_f\gui\editor\gui_init.sqf where the list of supported control types is kept. 2. You can import any ui you have created into the editor by Ctrl+i then enter the path to your ui e.g missionConfigfile >> "MyDisplay". BI's own displays can also be imported configfile >> "RscDisplayInventory" will display the inventory ui in the editor. EDIT: I see what you mean now was confused by your wording. You mean add UI elements so that they are editable via Options > Game > Layout. Share this post Link to post Share on other sites
Mr H. 400 Posted April 30, 2019 I think he means HUD elements like the stamina bar for exemple. In the game options you can choose the position of these element's on the screen and the game saves the position. (Or else I completely misunderstood and my comments above are absolutely irrelevant ) 😉 Share this post Link to post Share on other sites
Larrow 2795 Posted April 30, 2019 1 hour ago, Mr H. said: Or else I completely misunderstood and my comments above are absolutely irrelevant No I think its me 😃 @gc8 Look at RscDisplayOptionsLayout along with its script \a3\ui_f\scripts\gui\rscdisplayoptionslayout.sqf and CfgUIGrids. Should give you a starting point to track down how to add a control. \a3\functions_f\gui\fn_guigridtoprofile.sqf will show how the config entry under CfgUIGrids > ... > Variables > ... > saveToProfile decides what information to save( e.g x,y,w,h ) along with the profileNamespace variable name that is used. Share this post Link to post Share on other sites
gc8 970 Posted May 1, 2019 @Larrow thanks! I took a look on those scripts but it seems CfgUIGrids holds all the controls editable in the layout editor which would mean it's not possible to add new controls via mission script but addon is required. Hope I'm wrong though. Share this post Link to post Share on other sites
Larrow 2795 Posted May 1, 2019 2 hours ago, gc8 said: would mean it's not possible to add new controls via mission script but addon is required. Hope I'm wrong though. Correct, you would need some form of mod to provide access to the config entries. 1 Share this post Link to post Share on other sites
gc8 970 Posted April 17, 2020 On 5/1/2019 at 2:43 PM, Larrow said: Correct, you would need some form of mod to provide access to the config entries. Returning back to this as I now have mod to put this stuff into. What I don't understand is how can you add more entries to CfgUIGrids? Does arma allow you to add sub classes to already existing class? I don't even know where CfgUIGrids is defined. If anyone got example or something it would be great thx! Share this post Link to post Share on other sites
gc8 970 Posted April 17, 2020 Ok figured how to add new classes to CfgUIGrids. But the problem I now have is I can't figure how to put the preset in the config because arma config viewer is giving syntax error on the variables. I mean this: grid_weapon[] = {["((safezoneX + safezoneW) - (10 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * ( ((safezoneW / safezoneH) min 1.2) / 40))","(safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))","(10 * ( ((safezoneW / safezoneH) min 1.2) / 40))","(4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"],"( ((safezoneW / safezoneH) min 1.2) / 40)","( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; The [ & ] inside give me parse error when I copy & paste that to my config.cpp I don't know is the problem in config export or what but I can't figure proper syntax for those grid_ entries Edit: Ok nevermind it was array inside array in config. didn't know that was possible in config! Share this post Link to post Share on other sites
gc8 970 Posted April 30, 2020 Does anyone know what are the two last lines in grid position for the layout? I mean the ones in bold: grid_weapon[] = { ["((safezoneX + safezoneW) - (10 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 4.3 * ( ((safezoneW / safezoneH) min 1.2) / 40))", "(safezoneY + 0.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))", "(10 * ( ((safezoneW / safezoneH) min 1.2) / 40))", "(4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"], "( ((safezoneW / safezoneH) min 1.2) / 40)", "( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)" }; They have something to do with width & height but I don't know exactly what. Maybe max or min sizes... Share this post Link to post Share on other sites
gc8 970 Posted May 1, 2020 (edited) Think I found it, this page suggests it's grid(W/H): https://community.bistudio.com/wiki/BIS_fnc_GUIgrid although I think the return value in that wiki page is wrong, it's just [x,y,w,h] Edited May 1, 2020 by gc8 wrong return 1 Share this post Link to post Share on other sites
Larrow 2795 Posted May 2, 2020 See my explanation hidden in the last spoiler of this post. Basically its creating what BI deem a safe area of your screen, based of your resolution height, into grids. 40 grids wide by 25 grids height. 1 1 Share this post Link to post Share on other sites