Jump to content

Subluminik

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Posts posted by Subluminik


  1. Ahah thank you GEORGE FLOROS GR and PierreMGI that perfecly what i was looking for !

     

    here is how i've apllied it to my example :

    1549144800-error.png

     

    Quote

    //i want custom grp id in teamswitchmenu
     
    _customgrpid = "customized grpid";
     
    player setGroupId [_customgrpid];    //ok
     
    //George Floros GR solution
    _Symbol = "b_inf";   
     
    clearGroupIcons (group player);   
    setGroupIconsVisible [ true, true ];
    group player addGroupIcon [_Symbol, [0,0.5]];   
    _Display_Text = format["%1 [%2]", _customgrpid, getText(configFile>>"CfgVehicles">>typeOf vehicle player>>"DisplayName")];
    group player setGroupiconParams [ side player call BIS_fnc_sideColor,_Display_Text,1,true ];
     
     
    //Pierre MGI solution
     
    fnc_teamSwitch = {
      disableSerialization;
      _ctrlDispl = _this;
      private _idc = ctrlIDC (_ctrlDispl select 0);
      private _selectedIndex = _ctrlDispl param [1];
      _displ = findDisplay 632;
      _ctrl101 = _displ displayCtrl 101;
      _cnt = (lbsize 101) -1;
      for "_i" from 0 to _cnt do {
        _selectedUnit = switchableUnits param [_i,objNull];
        _unit = vehicle _selectedUnit;
        if (group _unit == group player) then {
          lbSetColor [_idc, _i,side player call BIS_fnc_sideColor];
        };
      };
    };
     
    0 = [] spawn {
      while {true} do {
        waituntil {!isnull findDisplay 632};
      (findDisplay 632 displayCtrl 101) ctrlAddEventHandler ["LBSelChanged", "_this call fnc_teamSwitch"];
        waitUntil {sleep 0.2; isNull findDisplay 632};
      };
    };

     

    • Like 1
    • Thanks 1

  2. Hi all,

    i have a question about coloured groupid's, i want to have color for the group id  in the teamswitch.
    could someone help me on that ?


    here is what i'm trying to do

    Spoiler

    //here is my text
    _text = "here is my text";
     
    //
    //here is my coloured hint
    _coloredtext = parseText format ["<t color='#1c7426'>%1</t>", _text];
     
    _coloredhint = hint _coloredtext;
     
    //
    //now i want my grpid in green in teamswitchmenu
    //doing it the same way (but wrong)
     
    _normalgrpid = "here is my normal grpid";
     
    player setGroupId [_normalgrpid];    //ok

     

    _newgrpid = "here is my colored new grpid";
     
    _colorednewgrpid = parseText format ["<t color='#1c7426'>%1</t>", _newgrpid];
     
    player setGroupId [_colorednewgrpid];    // error
     
    //_coloredhint is green and working
    //_normalgrpid is working
    //_colorednewgroupid give error type text, expected //string

     

     

    screenshot of the thing

    image 

     

    thank you for your help

     

     

    • Like 1
×