Guest User

Untitled

a guest
Apr 27th, 2021
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. -- ===========================================================================
  2. DefaultMessageHandler[KeyEvents.KeyUp] =
  3. function( pInputStruct:table )
  4.  
  5. local uiKey = pInputStruct:GetKey();
  6.  
  7. if( uiKey == Keys.VK_ESCAPE ) then
  8. if( Controls.TopOptionsMenu:IsHidden() ) then
  9. OpenInGameOptionsMenu();
  10. return true;
  11. end
  12. return false; -- Already open, let it handle it.
  13.  
  14. elseif( uiKey == Keys.B and pInputStruct:IsShiftDown() and pInputStruct:IsAltDown() and (not UI.IsFinalRelease()) ) then
  15. -- DEBUG: Force unhiding
  16. local msg:string = "***PLAYER Force Bulk unhiding SHIFT+ALT+B ***";
  17. UI.DataError(msg);
  18. m_bulkHideTracker = 1;
  19. BulkHide(false, msg);
  20.  
  21. elseif( uiKey == Keys.J and pInputStruct:IsShiftDown() and pInputStruct:IsAltDown() and (not UI.IsFinalRelease()) ) then
  22. if m_bulkHideTracker < 1 then
  23. BulkHide(true, "Forced" );
  24. else
  25. BulkHide(false, "Forced" );
  26. end
  27. ------------- Toggle banners and icons ----------------------
  28.  
  29. elseif ( uiKey == Keys.U ) then
  30. Controls.UnitFlagManager:SetHide( not Controls.UnitFlagManager:IsHidden() );
  31. UI.PlaySound("Play_UI_Click");
  32. return true;
  33.  
  34. elseif ( uiKey == Keys.L ) then
  35. Controls.CityBannerManager:SetHide( not Controls.CityBannerManager:IsHidden() );
  36. UI.PlaySound("Play_UI_Click");
  37. return true;
  38.  
  39. end
  40. return false;
  41. end
Advertisement
Add Comment
Please, Sign In to add comment