Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Vegastrike 0.5.1 rc1
Todo List
Modules
Namespaces
Classes
Files
File List
src
aldrv
audio
cmd
common
gfx
nav
radar
ani_texture.cpp
ani_texture.h
animation.cpp
animation.h
aux_logo.cpp
aux_logo.h
aux_palette.cpp
aux_palette.h
aux_texture.cpp
aux_texture.h
background.cpp
background.h
background_server.cpp
bmp_to_png.cpp
camera.cpp
camera.h
car_assist.h
cockpit.cpp
cockpit.h
cockpit_generic.cpp
cockpit_generic.h
cockpit_xml.cpp
coord_select.cpp
coord_select.h
decalqueue.h
env_map_gent.cpp
env_map_gent.h
gauge.cpp
gauge.h
halo.cpp
halo.h
halo_system.cpp
halo_system.h
hud.cpp
hud.h
jpeg_memory.cpp
jpeg_memory.h
lerp.cpp
lerp.h
loc_select.cpp
loc_select.h
masks.cpp
masks.h
matrix.cpp
matrix.h
mesh.cpp
mesh.h
mesh_bin.cpp
mesh_bin_server.cpp
mesh_bxm.cpp
mesh_bxm.h
mesh_fx.cpp
mesh_gfx.cpp
mesh_io.h
mesh_poly.cpp
mesh_server.cpp
mesh_xml.cpp
mesh_xml.h
nonlinear_transform.h
particle.cpp
particle.h
pipelined_texture.cpp
pipelined_texture.h
point_to_cam.h
quadsquare.cpp
quadsquare.h
quadsquare_cull.cpp
quadsquare_render.cpp
quadsquare_update.cpp
quadtree.cpp
quadtree.h
quadtree_xml.cpp
quaternion.cpp
quaternion.h
raw_to_png.cpp
ring.cpp
ring.h
screenshot.cpp
screenshot.h
sphere.cpp
sphere.h
sphere_generic.cpp
sphere_server.cpp
sprite.cpp
sprite.h
star.cpp
star.h
stream_texture.cpp
stream_texture.h
technique.cpp
technique.h
tex_transform.cpp
vdu.cpp
vdu.h
vec.cpp
vec.h
vertex.h
vid_file.cpp
vid_file.h
vsbox.cpp
vsbox.h
vsbox_server.cpp
vsimage.cpp
vsimage.h
warptrail.cpp
warptrail.h
xvector.h
gldrv
gui
networking
python
accountserver.cpp
audiolib.h
cg_global.cpp
cg_global.h
command.cpp
command.h
config_xml.cpp
config_xml.h
configxml.cpp
configxml.h
cs_boostpython.h
cs_boostpythonclass.h
cs_boostpythonobj.h
cs_python.h
debug_vs.cpp
debug_vs.h
easydom.cpp
easydom.h
endianness.cpp
endianness.h
faction_generic.cpp
faction_generic.h
faction_util.cpp
faction_util_generic.cpp
faction_util_server.cpp
fastmath.cpp
ffmpeg_init.cpp
ffmpeg_init.h
file_main.h
force_feedback.cpp
force_feedback.h
force_feedback_server.cpp
functors.h
galaxy.cpp
galaxy_gen.cpp
galaxy_gen.h
galaxy_xml.cpp
galaxy_xml.h
gamemenu.cpp
gamemenu.h
gfxlib.h
gfxlib_struct.cpp
gfxlib_struct.h
gfxlib_struct_server.cpp
gnuhash.h
hashtable.cpp
hashtable.h
in.h
in_handler.h
in_joystick.cpp
in_joystick.h
in_kb.cpp
in_kb.h
in_kb_data.h
in_main.cpp
in_main.h
in_mouse.cpp
in_mouse.h
in_sdl.cpp
junk.c
libaudioserver.cpp
libserver.cpp
lin_time.cpp
lin_time.h
linecollide.h
load_mission.cpp
load_mission.h
macosx_math.cpp
macosx_math.h
macquartz.cpp
main.cpp
main_loop.cpp
main_loop.h
mmorpgclient.cpp
mmorpgclient.h
options.cpp
options.h
physics.cpp
physics.h
pk3.cpp
pk3.h
posh.cpp
posh.h
precompiled.h
profile.h
rendertext.cpp
rendertext.h
replaceall.py
resizable.h
save_util.h
savegame.cpp
savegame.h
SharedPool.cpp
SharedPool.h
ship_commands.cpp
ship_commands.h
Singleton.h
star_system.cpp
star_system.h
star_system_generic.cpp
star_system_generic.h
star_system_jump.cpp
star_system_xml.cpp
stardate.cpp
stardate.h
universe.cpp
universe.h
universe_generic.cpp
universe_generic.h
universe_util.cpp
universe_util.h
universe_util_generic.cpp
universe_util_server.cpp
vegaserver.cpp
vegastrike.h
vs_globals.cpp
vs_globals.h
vs_math.h
vs_random.h
vsfilesystem.cpp
vsfilesystem.h
VSFileXMLSerializer.cpp
VSFileXMLSerializer.h
xml_serializer.cpp
xml_serializer.h
xml_support.cpp
xml_support.h
XMLDocument.cpp
XMLDocument.h
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
hud.h
Go to the documentation of this file.
1
/*
2
* Vega Strike
3
* Copyright (C) 2001-2002 Daniel Horn & Alan Shieh
4
*
5
* http://vegastrike.sourceforge.net/
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
*/
21
22
#ifndef __HUD_H
23
#define __HUD_H
24
25
#include <string>
26
#include "
vec.h
"
27
#include "
gfxlib_struct.h
"
28
class
Texture
;
29
30
class
TextPlane
31
{
32
std::string myText;
33
34
//Texture *myFont;
35
Vector
myFontMetrics;
//i = width, j = height
36
Vector
myDims;
37
int
numlet;
38
/*
39
* struct GlyphPosition {
40
* float left, right, top, bottom;
41
* } myGlyphPos[256];
42
*/
43
public
:
44
GFXColor
col
,
bgcol
;
45
TextPlane
(
const
struct
GFXColor
&
col
=
GFXColor
( 1, 1, 1, 1 ),
const
struct
GFXColor
&
bgcol
=
GFXColor
( 0, 0, 0, 0 ) );
46
~TextPlane
();
47
void
SetPos
(
float
x
,
float
y
)
48
{
49
myFontMetrics.k =
y
;
50
myDims.k =
x
;
51
}
52
void
SetCharSize
(
float
x
,
float
y
)
53
{
54
myFontMetrics.i =
x
;
55
myFontMetrics.j =
y
;
56
}
57
void
GetCharSize
(
float
&
x
,
float
&
y
)
58
{
59
x = myFontMetrics.i;
60
y = myFontMetrics.j;
61
}
62
void
GetPos
(
float
&
y
,
float
&
x
)
63
{
64
y = myFontMetrics.k;
65
x = myDims.k;
66
}
67
void
SetSize
(
float
x
,
float
y
)
68
{
69
myDims.i =
x
;
70
myDims.j =
y
;
71
}
72
void
GetSize
(
float
&
x
,
float
&
y
)
73
{
74
x = myDims.i;
75
y = myDims.j;
76
}
77
int
Draw
(
int
offset = 0 );
//returns number of lines
78
int
Draw
(
const
std::string &text,
79
int
offset = 0,
80
bool
start_one_line_lower =
false
,
81
bool
force_highquality =
false
,
82
bool
automatte =
false
);
83
void
SetText
(
const
std::string &newText )
84
{
85
myText = newText;
86
}
87
std::string
GetText
()
const
88
{
89
return
myText;
90
}
91
};
92
93
#endif
94
src
gfx
hud.h
Generated on Fri May 29 2015 23:07:24 for Vegastrike 0.5.1 rc1 by
1.8.4