anaximandross 34 Posted February 7, 2019 I created a simple dialog using a listbox, two buttons, and a frame in the GUI Editor, and when I exported that, it gave me this: Spoiler //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Harbor, v1.063, #Kuqyvu) //////////////////////////////////////////////////////// class Har_List: RscListbox { idc = 1500; text = "Option 1"; //--- ToDo: Localize; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 31.5 * GUI_GRID_W; h = 11.5 * GUI_GRID_H; colorText[] = {1,1,1,1}; tooltip = "Yes"; //--- ToDo: Localize; }; class Har_Ok: RscButton { idc = 1600; text = "Ok"; //--- ToDo: Localize; x = 10 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 26 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Frame: RscFrame { idc = 1800; x = 1.5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 37 * GUI_GRID_W; h = 16 * GUI_GRID_H; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// But I have absolutely no idea where I go from here. I'm looking to create a list of weapons that the user can select from, which will then call a script to "build" the weapon, and add it to a crate. I've read through KK's tutorials but they didn't seem applicable to this, and I don't understand what any of the documentation for ListBox means. Can anyone help me out? Share this post Link to post Share on other sites
gc8 981 Posted February 7, 2019 Save your work in the editor by pressing ctrl + S . This will give you string that you need to copy again when you want to continue work on your dialog in the dialog editor. So paste that string somewhere And to make your dialog ready for in game you need to put the controls you just posted inside a class. Like this: class MyDialog // Change! { idd = 102103; // Change to your random IDD ! movingEnable = false; class controlsBackground { class RscPicture_1200: IGUIBack { idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 15 * UI_GRID_W + UI_GRID_X; y = 5.5 * UI_GRID_H + UI_GRID_Y; w = 33 * UI_GRID_W; h = 25 * UI_GRID_H; }; }; class objects { // define controls here }; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Harbor, v1.063, #Kuqyvu) //////////////////////////////////////////////////////// class Har_List: RscListbox { idc = 1500; text = "Option 1"; //--- ToDo: Localize; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 31.5 * GUI_GRID_W; h = 11.5 * GUI_GRID_H; colorText[] = {1,1,1,1}; tooltip = "Yes"; //--- ToDo: Localize; }; class Har_Ok: RscButton { idc = 1600; text = "Ok"; //--- ToDo: Localize; x = 10 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 26 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Frame: RscFrame { idc = 1800; x = 1.5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 37 * GUI_GRID_W; h = 16 * GUI_GRID_H; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; 1 Share this post Link to post Share on other sites
Mr H. 402 Posted February 7, 2019 that's just the 1st step, then you need to export parent classes (ctrl + P) in the GUI editor. Place them in a file called defines.hpp (or any other name it's not important) and the file in the same folder as the file that contains your dialogs. Best practice is to have 3 files: 1) description.ext (mandatory) 2) the file containing your dialogs (see post above) let's call it mydialog.hpp 3) the file that contains your parent classes (defines.hpp) Now for this example description.ext is (always) at the root of your mission but the two other files are in a subfolder called "dialogs". step 1 your description.ext must contains the following lines: #include "dialogs\mydialog.hpp" //make sure that the path and file names are exact or else arma will crash step 2 your mydialog.hpp must contain the following: #include "defines.hpp" //has to be in the same directory or else arma will crash class MyDialog // Change! { idd = 102103; // Change to your random IDD ! movingEnable = false; class controlsBackground { class RscPicture_1200: IGUIBack { idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 15 * UI_GRID_W + UI_GRID_X; y = 5.5 * UI_GRID_H + UI_GRID_Y; w = 33 * UI_GRID_W; h = 25 * UI_GRID_H; }; }; class objects { // define controls here }; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Harbor, v1.063, #Kuqyvu) //////////////////////////////////////////////////////// class Har_List: RscListbox { idc = 1500; text = "Option 1"; //--- ToDo: Localize; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 31.5 * GUI_GRID_W; h = 11.5 * GUI_GRID_H; colorText[] = {1,1,1,1}; tooltip = "Yes"; //--- ToDo: Localize; }; class Har_Ok: RscButton { idc = 1600; text = "Ok"; //--- ToDo: Localize; x = 10 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 26 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Frame: RscFrame { idc = 1800; x = 1.5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 37 * GUI_GRID_W; h = 16 * GUI_GRID_H; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; Step 3 SAVE your mission in the editor every time you change any of the above files or else they will not be taken into account by the game. Step 4 in the debug console write : createDialog "MyDialog" // whatever name you have put under class MyDialog You should now see your dialog Step 5 .... you have to code everything else, it would be way to long to do it in detail but here are the ui related commands for your information:https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control and I strongly recommand you read this before going any further:https://community.bistudio.com/wiki/Dialog_Control as a last piece of advice: it is better to use safezone than to use GUI_GRID for position and size of your controls (they will look the same on any computer, regardless of the user's resolution) 3 Share this post Link to post Share on other sites
gc8 981 Posted February 7, 2019 57 minutes ago, Mr H. said: Step 3 SAVE your mission in the editor every time you change any of the above files or else they will not be taken into account by the game. Actually this is not needed in arma 3. There are two ways the description.ext is reloaded. One when you load your mission in the editor (Eden). Two when you start your mission. Note: Restarting mission does not reload description.ext you must go to the (Eden) editor and start the mission from there and it will be reloaded Share this post Link to post Share on other sites
pierremgi 4906 Posted February 7, 2019 5 hours ago, gc8 said: Actually this is not needed in arma 3. There are two ways the description.ext is reloaded. One when you load your mission in the editor (Eden). Two when you start your mission. Note: Restarting mission does not reload description.ext you must go to the (Eden) editor and start the mission from there and it will be reloaded Verify also your 3den settings preference misc "recompile functions". Share this post Link to post Share on other sites
anaximandross 34 Posted February 7, 2019 Wow! This is an incredibly in depth process. It's very overwhelming to look at from the front end. I imagine its pretty tedious all the way through. Thanks for all the help everyone Share this post Link to post Share on other sites
Mr H. 402 Posted February 7, 2019 As with everything Arma related it is tedious at first but after a while you'll find it easier and easier. Share this post Link to post Share on other sites
anaximandross 34 Posted February 7, 2019 Yea that's a good point. If you had told me two weeks ago I would have done all the scripting I have in that time, I would have laughed. Unfortunately at this point I'm just not sure I WANT to take on the dialogs lol. I'd rather find a team😆 Share this post Link to post Share on other sites
Larrow 2822 Posted February 8, 2019 21 hours ago, gc8 said: Save your work in the editor by pressing ctrl + S . This will give you string that you need to copy again when you want to continue work on your dialog in the dialog editor. There is really no need to save the "GUI Editor" string. Once you have your basic ui defined in the description.ext you can load your created dialog straight from its description.ext definition (you can also do this for any of the BI ui's) Open gui editor Press CTRL + I Enter dialogs config path (below as per @Mr H.'s example) missionConfigFile >> "MyDialog" Same for a BI dialog, for example the inventory configfile >> "RscDisplayInventory" 3 Share this post Link to post Share on other sites
gc8 981 Posted February 8, 2019 Did not know that, thanks Larrow! Share this post Link to post Share on other sites