Advertisement
Guest User

Untitled

a guest
Feb 14th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.55 KB | None | 0 0
  1. class CfgPatches
  2. {
  3.     class testDisplay
  4.     {
  5.         author="Testicles";
  6.         name="Component Test";
  7.         requiredAddons[]=
  8.         {
  9.             "A3_Data_F",
  10.             "A3_Functions_F",
  11.             "A3_UiFonts_F"
  12.         };
  13.         requiredVersion=0.1;
  14.         units[]={};
  15.         weapons[]={};
  16.     };
  17. };
  18.  
  19. /*
  20.  
  21.     [vehicle player, [-1]] enableInfoPanelComponent ["left", "TestDisplay", false];
  22.     ^ Returns true, but nothing happens.
  23.    
  24. */
  25.  
  26. class Components;
  27. class DefaultVehicleSystemsDisplayManagerLeft;
  28. class DefaultVehicleSystemsDisplayManagerRight;
  29.    
  30. /*
  31.     Testvehicle, duh.
  32. */
  33. class CfgVehicles
  34. {
  35.     class B_Quadbike_01_F;
  36.     class testDisplay_B_Quadbike_01_F : B_Quadbike_01_F
  37.     {
  38.         author = "Testicles";
  39.         displayName = "Test Display Vehicle";
  40.         class Components: Components
  41.         {
  42.             class VehicleSystemsDisplayManagerComponentLeft: DefaultVehicleSystemsDisplayManagerLeft
  43.             {
  44.                 class Components : Components
  45.                 {
  46.                     class TestDisplay
  47.                     {
  48.                         componentType = "CustomDisplayComponent";
  49.                         resource = "testDisplay_RscTestComponent";
  50.                     };
  51.                 };
  52.             };
  53.             class VehicleSystemsDisplayManagerComponentRight: DefaultVehicleSystemsDisplayManagerRight
  54.             {
  55.                 class Components : Components
  56.                 {
  57.                     class TestDisplay
  58.                     {
  59.                         componentType = "CustomDisplayComponent";
  60.                         resource = "testDisplay_RscTestComponent";
  61.                     };
  62.                 };
  63.             };
  64.         };
  65.     };
  66. };
  67.  
  68. /*
  69.     Resource for component
  70. */
  71. class RscPicture;
  72. class RscIGUIText;
  73. class RscIGUIValue;
  74. class testDisplay_RscTestComponent
  75. {
  76.     idd=1166;
  77.     //scriptName="RscMiniMap";
  78.     //scriptPath="IGUI";
  79.     onLoad=" ['onLoad',_this,'RscCustomInfoMiniMap','IGUI'] call    (uinamespace getvariable 'BIS_fnc_initDisplay') ";
  80.     onUnload=" ['onUnload',_this,'RscCustomInfoMiniMap','IGUI'] call    (uinamespace getvariable 'BIS_fnc_initDisplay')";
  81.     class controlsBackground
  82.     {
  83.         class Background: RscPicture
  84.         {
  85.             IDC=15110;
  86.             text="A3\Ui_f\data\IGUI\RscCustomInfo\background_ca.paa";
  87.             x=0;
  88.             y="1 *          (           (           ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
  89.             w = 0.12375 * safezoneW;
  90.             h = 0.22 * safezoneH;
  91.             colorText[]=
  92.             {
  93.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])",
  94.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])",
  95.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",
  96.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])"
  97.             };
  98.         };
  99.     };
  100.     class controls
  101.     {
  102.         class Title: RscIGUIText
  103.         {
  104.             colorBackground[]=
  105.             {
  106.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])",
  107.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])",
  108.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])",
  109.                 "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])"
  110.             };
  111.             colorText[]=
  112.             {
  113.                 "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])",
  114.                 "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])",
  115.                 "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])",
  116.                 "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"
  117.             };
  118.             idc=15112;
  119.             text="Most Test";
  120.             x="0 *          (           ((safezoneW / safezoneH) min 1.2) / 40)";
  121.             y="0 *          (           (           ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
  122.             w = 0.12375 * safezoneW;
  123.             h = 0.022 * safezoneH;
  124.             sizeEx="0.8 *           (           (           ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
  125.             onLoad="(_this select 0) ctrlsettext toupper ctrltext (_this select 0)";
  126.         };
  127.         class Range: RscIGUIValue
  128.         {
  129.             IDC=104;
  130.             text="Wow";
  131.             style=1;
  132.             x="0.5 *        (profilenamespace getvariable [""IGUI_GRID_CUSTOMINFORIGHT_W"",     (10 *           (           ((safezoneW / safezoneH) min 1.2) / 40))])";
  133.             y=0;
  134.             w = 0.061875 * safezoneW;
  135.             h = 0.022 * safezoneH;
  136.         };
  137.     };
  138. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement