PageRenderTime 135ms CodeModel.GetById 51ms app.highlight 4ms RepoModel.GetById 78ms app.codeStats 0ms

/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
27#include "llviewerprecompiledheaders.h"
28
29#include "llhudview.h"
30
31// library includes
32#include "v4color.h"
33#include "llcoord.h"
34
35// viewer includes
36#include "llcallingcard.h"
37#include "llviewercontrol.h"
38#include "llfloaterworldmap.h"
39#include "llworldmapview.h"
40#include "lltracker.h"
41#include "llviewercamera.h"
42#include "llui.h"
43#include "lluictrlfactory.h"
44
45LLHUDView *gHUDView = NULL;
46
47const S32 HUD_ARROW_SIZE = 32;
48
49
50
51LLHUDView::LLHUDView(const LLRect& r)
52{
53	buildFromFile( "panel_hud.xml");
54	setShape(r, true);
55}
56
57LLHUDView::~LLHUDView()
58{
59}
60
61// virtual
62void LLHUDView::draw()
63{
64	LLTracker::drawHUDArrow();
65	LLView::draw();
66}
67
68/*virtual*/
69BOOL LLHUDView::handleMouseDown(S32 x, S32 y, MASK mask)
70{
71	if (LLTracker::handleMouseDown(x, y))
72	{
73		return TRUE;
74	}
75	return LLView::handleMouseDown(x, y, mask);
76}