justenzy 10 Posted July 26, 2013 I have tried for days, nothing! I have tried so many different ways and this is my final resort. I try to copy others and sometimes they work and sometimes its missing a definition. Can somebody explain the proper way of defining classes. THANKYOU Share this post Link to post Share on other sites
Ed! 13 Posted July 26, 2013 Have you any experience with programming (like c++)? The classes for building dialogs are very similar. Share this post Link to post Share on other sites
lappihuan 178 Posted July 26, 2013 How about using the GUI Editor? ;) Share this post Link to post Share on other sites
justenzy 10 Posted July 26, 2013 I am using the GUI editor, but how do i define classes? And no i dont have C++ experience. Share this post Link to post Share on other sites
kylania 568 Posted July 26, 2013 Searching finds a thread with a lot of useful links about the GUI Editor. Share this post Link to post Share on other sites
lappihuan 178 Posted July 26, 2013 you need to copy&paste them out of the GUI editor into your dialoges.hpp/defines.hpp. But for basics, here is a simple yes/no dialog Tutorial. Share this post Link to post Share on other sites
justenzy 10 Posted July 26, 2013 Did that but get an error along the lines off "No entry (folder) "dialogname.idd"". Really appreciate it Share this post Link to post Share on other sites
mikie boy 18 Posted July 26, 2013 easiest way to do it is have one file with those classes that define the available frames, background, pictureframes, button types etc.... e.g class CrtlwinListBox:CrtlwinLB_C { type=5; colorScrollbar[] = {0.2, 0.2, 0.2, 1}; colorDisabled[] = {1, 1, 1, 0.25}; colorSelect[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0.3,0.3,0.3,0.3}; colorSelect2[] = {0, 0, 0, 1}; colorSelectBackground[] = {0.95, 0.95, 0.95, 1}; colorSelectBackground2[] = {1, 1, 1, 0.5}; maxHistoryDelay = 1.0; soundSelect[] = {"",0.1,1}; period = 1; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; shadow = 0; class ScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; 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"; shadow = 0; }; }; or class CrtlwinButton { type=CT_BUTTON; idc=-1; style=ST_CENTER; colorText[]={0, 0, 0, 1}; font="PuristaMedium"; sizeEx=0.031; // soundEnter[] = {"\A3\ui_f\data\sound\onover", 0.09, 1}; soundPush[] = {"\A3\ui_f\data\sound\new1", 0.0, 0}; soundClick[] = {"\A3\ui_f\data\sound\onclick", 0.07, 1}; soundEscape[] = {"\A3\ui_f\data\sound\onescape", 0.09, 1}; default=false; text="\A3\ui_f\data\gui\cfg\ButtonImages\start_ca.paa"; action=""; colorActive[]={0, 0, 0, 0}; colorDisabled[]={0, 0, 0, 0.1}; colorBackground[]={0,0,0,0.3}; colorBackgroundActive[]={0,0,0,0.4}; colorBackgroundDisabled[]={0,0,0,0.3}; colorFocused[]={0.84,1,0.55,1}; colorShadow[]={1, 1, 1, 0.1}; colorBorder[]={0, 0, 0, 0.1}; offsetX=0; offsetY=0; offsetPressedX=0; offsetPressedY=0; borderSize=0; soundEnter[]={"", 0.15, 1}; }; then you have another files that has the actual settings and diameters of the gui e.g class AiMenu { name=AiMenu; idd=166; movingEnable=1; controlsBackground[]={AIBGMenu}; objects[]={}; controls[]={ btnMedic, listTeamDialog}; //CrtlwinBackground //AiBackground class AIBGMenu: CrtlwinBackground { idc = -1; //--- ToDo: Localize; x = 0.293738 * safezoneW + safezoneX; y = 0.225101 * safezoneH + safezoneY; w = 0.650019 * safezoneW; h = 0.549797 * safezoneH; }; //CrtlwinButton //AiButton class btnMedic: CrtlwinButton { idc = -1; text = "Medic"; //--- ToDo: Localize; action="[] spawn Medic"; x = 0.304051 * safezoneW + safezoneX; y = 0.247093 * safezoneH + safezoneY; w = 0.0721917 * safezoneW; h = 0.0439838 * safezoneH; }; class listTeamDialog: CrtlwinListBox { idc = 1500; text = "Group Soldiers"; //--- ToDo: Localize; x = 0.417495 * safezoneW + safezoneX; y = 0.269085 * safezoneH + safezoneY; w = 0.195323 * safezoneW; h = 0.285895 * safezoneH; }; }; Share this post Link to post Share on other sites
kylania 568 Posted July 26, 2013 But for basics, here is a simple yes/no dialog Tutorial. Tutorials rock, but I'd love a dialog tutorial that looks like BIS made it, not like an early pre-alpha for Windows 3.0 :) Share this post Link to post Share on other sites
Ed! 13 Posted July 26, 2013 Tutorials rock, but I'd love a dialog tutorial that looks like BIS made it, not like an early pre-alpha for Windows 3.0 :) Background color colorBackground[] = {0.40234375, 0.54296875, 0.60546875, 1}; with white text. That's the beta theme :P Share this post Link to post Share on other sites