/indra/newview/llhudview.cpp

https://bitbucket.org/lindenlab/viewer-beta/ · C++ · 76 lines · 35 code · 12 blank · 29 comment · 1 complexity · 83d243ebf85031e16db461251dc35709 MD5 · raw file

  1. /**
  2. * @file llhudview.cpp
  3. * @brief 2D HUD overlay
  4. *
  5. * $LicenseInfo:firstyear=2003&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #include "llviewerprecompiledheaders.h"
  27. #include "llhudview.h"
  28. // library includes
  29. #include "v4color.h"
  30. #include "llcoord.h"
  31. // viewer includes
  32. #include "llcallingcard.h"
  33. #include "llviewercontrol.h"
  34. #include "llfloaterworldmap.h"
  35. #include "llworldmapview.h"
  36. #include "lltracker.h"
  37. #include "llviewercamera.h"
  38. #include "llui.h"
  39. #include "lluictrlfactory.h"
  40. LLHUDView *gHUDView = NULL;
  41. const S32 HUD_ARROW_SIZE = 32;
  42. LLHUDView::LLHUDView(const LLRect& r)
  43. {
  44. buildFromFile( "panel_hud.xml");
  45. setShape(r, true);
  46. }
  47. LLHUDView::~LLHUDView()
  48. {
  49. }
  50. // virtual
  51. void LLHUDView::draw()
  52. {
  53. LLTracker::drawHUDArrow();
  54. LLView::draw();
  55. }
  56. /*virtual*/
  57. BOOL LLHUDView::handleMouseDown(S32 x, S32 y, MASK mask)
  58. {
  59. if (LLTracker::handleMouseDown(x, y))
  60. {
  61. return TRUE;
  62. }
  63. return LLView::handleMouseDown(x, y, mask);
  64. }