Jump to content

pierremgi

Member
  • Content Count

    7478
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

4906 Excellent

About pierremgi

  • Rank
    Major

Profile Information

  • Location
    Tahiti

Recent Profile Visitors

25838 profile views

Single Status Update

See all updates by pierremgi

  1. Pierre I am kind of stuck trying to bind a key like maybe  shift+m  to my map I am trying to build.
    Reference code on page below. Do you have any suggestions or know of any code samples?

     

    I have been looking around for examples but have not found any. Kind of lost.

     

    1. Show previous comments  16 more
    2. Antman2o1o

      Antman2o1o

      Well that stopped that error but did not close the map?

    3. Antman2o1o

      Antman2o1o

      [] spawn {
         waituntil {!isNull (findDisplay 46)};
         (findDisplay 46) displayAddEventHandler ["keyDown", "_this call your_keyFnc"];
         };

      your_keyFnc = compileFinal "
       _ctrl = _this #0;
       _dikCode = _this #1;
       _shift = _this #2;
       _ctrlKey = _this #3;
       _alt = _this #4;
       private _input = false;

       if (_shift && !_alt && !_ctrlKey) then {
         if (_dikCode == 50) then {
           call {
               if (isNil 'passed') exitWith {
                  passed = TRUE;
                 ( [ 'myMiniMap' ] call BIS_fnc_rscLayer ) cutRsc [ 'myMap', 'PLAIN', 1, false ];
               };
               passed = nil;

               '' cutRsc [ 'myMap', 'PLAIN', 1, False ];
           };
         _input = true
         };
       };
       _input
      ";

    4. pierremgi

      pierremgi

      Read cutRsc. I don't remember how to cut it. And work around '' cutRsc [ 'myMap', 'PLAIN', 1, False ] I have no time for that.

    5. Show next comments  3 more
×