Senshi 10 Posted April 14, 2016 I have had this issues multiple times now: I want to implement GUI stuff in a mission, which requires me to define all the necessary resources for it. My question is: Where can I find the original definitions used by ArmA 3 itself? I was expecting to find them in ui_f\a3\ui_f\config.cpp, however, e.g. the RscListNBox entry looks like this: class RscListNBox { style = 16; shadow = 0; font = "RobotoCondensed"; sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; color[] = {0.95,0.95,0.95,1}; colorText[] = {1,1,1,1.0}; colorDisabled[] = {1,1,1,0.25}; colorScrollbar[] = {0.95,0.95,0.95,1}; colorSelect[] = {0,0,0,1}; colorSelect2[] = {0,0,0,1}; colorSelectBackground[] = {0.95,0.95,0.95,1}; colorSelectBackground2[] = {1,1,1,0.5}; colorPicture[] = {1,1,1,1}; colorPictureSelected[] = {1,1,1,1}; colorPictureDisabled[] = {1,1,1,1}; period = 1.2; x = 0; y = 0; w = 0.3; h = 0.3; class ListScrollBar: ScrollBar{}; class ScrollBar: ScrollBar{}; };When I copypaste this to use for a control in my mission, I get the error message: "No entry FILEPATH/ListN.rowHeight".When I add this attribute, everything works fine. Why is this attribute not set in the config.cpp of the ui.pbo? ArmA3 will need that attribute set as well for all its purposes, right? I'm guessing there must be another location where this is defined? EDIT: And where do the templates from this page come from? Share this post Link to post Share on other sites
soolie 189 Posted April 14, 2016 I'm unsure about where they are in game. It seems everyone just uses their own version of common.hpp, and keep adding to it as they use UI controls that they don't have. I made a quick tutorial here https://forums.bistudio.com/topic/189494-gui-tutorial-and-simple-vehicle-selector-release/ Spoiler in the first post contains my version of common.hpp Share this post Link to post Share on other sites
hoverguy 177 Posted April 14, 2016 Templates are in config.cpp, use your text editor and find _CT_SLIDER, _CT_BUTTON, _CT_EDIT, _CT_LISTBOX etc... And if you need macros definition go to ui_f\hpp and open these files: defineCommon.inc defineCommonGrids.inc defineResincl.inc (control types & styles) rscCommon.inc Share this post Link to post Share on other sites
Senshi 10 Posted April 14, 2016 @soolie: Yeah, that was my impression as well, but it never felt right to have to drag along some "homegrown" version of the common.hpp . I stumbled multiple times already because the various "templates" floating around in the net and the wiki have been deprecated by an Arma update. @hoverguy: Thank you! I didn't know I had to look for "_CT_LISTNBOX" to get the actual template for "RscListNBox". It is somewhat confusing because the "RscListNBox" is also defined in the config.cpp . Can you enlighten me how RscListNBox is related to _CT_LISTNBOX? In my mission, I simply define the RscListNBox, and all is well. I am guessing it's linked by the style = 102 (or style=CT_LISTNBOX, with it defined as 102) of Rsclistnbox and idc=102 (or type=102?) of _CT_LISTNBOX? And is there a way to figure out - without trial & error - which attributes are mandatory (such as "rowHeight")? Share this post Link to post Share on other sites