Open source remastering of the Freespace 2 engine
HudGaugeMessages Class Reference

#include <hudmessage.h>

Inheritance diagram for HudGaugeMessages:

Public Member Functions

 HudGaugeMessages ()
void initLineHeight (int h)
void initMaxLines (int lines)
void initMaxWidth (int width)
void initScrollTime (int ms)
void initStepSize (int h)
void initTotalLife (int ms)
void initHiddenByCommsMenu (bool hide)
void clearMessages ()
void processMessageBuffer ()
void addPending (const char *text, int source, int x=0)
void scrollMessages ()
void preprocess ()
void render (float frametime)
void initialize ()
void pageIn ()
- Public Member Functions inherited from HudGauge
 HudGauge ()
 HudGauge (int _gauge_object, int _gauge_config, bool _slew, bool _message, int _disabled_views, int r, int g, int b)
 HudGauge (int _gauge_config, bool _slew, int r, int g, int b, char *_custom_name, char *_custom_text, char *frame_fname, int txtoffset_x, int txtoffset_y)
virtual ~HudGauge ()
void initPosition (int x, int y)
void initBaseResolution (int w, int h)
void initSlew (bool slew)
void initFont (int input_font_num)
void initCockpitTarget (const char *display_name, int _target_x, int _target_y, int _target_w, int _target_h, int _canvas_w, int _canvas_h)
void initRenderStatus (bool render)
int getConfigType ()
int getObjectType ()
void getPosition (int *x, int *y)
bool isOffbyDefault ()
bool isActive ()
void updateColor (int r, int g, int b, int a=255)
void lockConfigColor (bool lock)
void sexpLockConfigColor (bool lock)
void updateActive (bool show)
void updatePopUp (bool pop_up_flag)
void updateSexpOverride (bool sexp)
void startFlashSexp ()
int maybeFlashSexp ()
bool flashExpiredSexp ()
void resetTimers ()
const char * getCustomGaugeName ()
void updateCustomGaugeCoords (int _x, int _y)
void updateCustomGaugeFrame (int frame_offset)
void updateCustomGaugeText (const char *txt)
void updateCustomGaugeText (const SCP_string &txt)
const char * getCustomGaugeText ()
void startPopUp (int time=4000)
int popUpActive ()
virtual bool canRender ()
virtual void onFrame (float frametime)
bool setupRenderCanvas (int render_target=-1)
void setCockpitTarget (const cockpit_display *display)
void resetCockpitTarget ()
void setFont ()
void setGaugeColor (int bright_index=-4)
void renderBitmap (int x, int y)
void renderBitmap (int frame, int x, int y)
void renderBitmapColor (int frame, int x, int y)
void renderBitmapUv (int frame, int x, int y, int w, int h, float u0, float v0, float u1, float v1)
void renderBitmapEx (int frame, int x, int y, int w, int h, int sx, int sy)
void renderString (int x, int y, const char *str)
void renderString (int x, int y, int gauge_id, const char *str)
void renderStringAlignCenter (int x, int y, int area_width, const char *s)
void renderPrintf (int x, int y, const char *format,...)
void renderPrintf (int x, int y, int gauge_id, const char *format,...)
void renderLine (int x1, int y1, int x2, int y2)
void renderGradientLine (int x1, int y1, int x2, int y2)
void renderRect (int x, int y, int w, int h)
void renderCircle (int x, int y, int diameter)
void unsize (int *x, int *y)
void unsize (float *x, float *y)
void resize (int *x, int *y)
void resize (float *x, float *y)
void setClip (int x, int y, int w, int h)
void resetClip ()

Protected Attributes

int Max_lines
int Max_width
int Scroll_time
int Step_size
int Total_life
int Line_h
bool Hidden_by_comms_menu
int Window_width
int Window_height
SCP_vector< Hud_display_infoactive_messages
SCP_queue< HUD_message_datapending_messages
bool Scroll_needed
bool Scroll_in_progress
int Scroll_time_id
- Protected Attributes inherited from HudGauge
int position [2]
int base_w
int base_h
color gauge_color
int gauge_config
int gauge_object
int font_num
bool lock_color
bool sexp_lock_color
bool reticle_follow
bool active
bool off_by_default
bool sexp_override
bool pop_up
int popup_timer
bool message_gauge
int disabled_views
int flash_duration
int flash_next
bool flash_status
bool custom_gauge
hud_frames custom_frame
int custom_frame_offset
int textoffset_x
int textoffset_y
char custom_name [NAME_LENGTH]
SCP_string custom_text
SCP_string default_text
char texture_target_fname [MAX_FILENAME_LEN]
int texture_target
int canvas_w
int canvas_h
int target_w
int target_h
int target_x
int target_y
int display_offset_x
int display_offset_y

Detailed Description

Definition at line 80 of file hudmessage.h.

Constructor & Destructor Documentation

HudGaugeMessages::HudGaugeMessages ( )

Definition at line 248 of file hudmessage.cpp.

Member Function Documentation

void HudGaugeMessages::addPending ( const char *  text,
int  source,
int  x = 0 

Definition at line 345 of file hudmessage.cpp.

void HudGaugeMessages::clearMessages ( )

Definition at line 429 of file hudmessage.cpp.

void HudGaugeMessages::initHiddenByCommsMenu ( bool  hide)

Definition at line 283 of file hudmessage.cpp.

void HudGaugeMessages::initialize ( )

Reimplemented from HudGauge.

Definition at line 288 of file hudmessage.cpp.

void HudGaugeMessages::initLineHeight ( int  h)

Definition at line 278 of file hudmessage.cpp.

void HudGaugeMessages::initMaxLines ( int  lines)

Definition at line 253 of file hudmessage.cpp.

void HudGaugeMessages::initMaxWidth ( int  width)

Definition at line 258 of file hudmessage.cpp.

void HudGaugeMessages::initScrollTime ( int  ms)

Definition at line 263 of file hudmessage.cpp.

void HudGaugeMessages::initStepSize ( int  h)

Definition at line 268 of file hudmessage.cpp.

void HudGaugeMessages::initTotalLife ( int  ms)

Definition at line 273 of file hudmessage.cpp.

void HudGaugeMessages::pageIn ( )

Reimplemented from HudGauge.

Definition at line 303 of file hudmessage.cpp.

void HudGaugeMessages::preprocess ( )

Reimplemented from HudGauge.

Definition at line 434 of file hudmessage.cpp.

void HudGaugeMessages::processMessageBuffer ( )

Definition at line 307 of file hudmessage.cpp.

void HudGaugeMessages::render ( float  frametime)

HudGaugeMessages::render() will display the active HUD messages on the HUD. It will scroll the messages up when a new message arrives.

Reimplemented from HudGauge.

Definition at line 445 of file hudmessage.cpp.

void HudGaugeMessages::scrollMessages ( )

Definition at line 358 of file hudmessage.cpp.

Member Data Documentation

SCP_vector<Hud_display_info> HudGaugeMessages::active_messages

Definition at line 95 of file hudmessage.h.

bool HudGaugeMessages::Hidden_by_comms_menu

Definition at line 90 of file hudmessage.h.

int HudGaugeMessages::Line_h

Definition at line 89 of file hudmessage.h.

int HudGaugeMessages::Max_lines

Definition at line 84 of file hudmessage.h.

int HudGaugeMessages::Max_width

Definition at line 85 of file hudmessage.h.

SCP_queue<HUD_message_data> HudGaugeMessages::pending_messages

Definition at line 96 of file hudmessage.h.

bool HudGaugeMessages::Scroll_in_progress

Definition at line 99 of file hudmessage.h.

bool HudGaugeMessages::Scroll_needed

Definition at line 98 of file hudmessage.h.

int HudGaugeMessages::Scroll_time

Definition at line 86 of file hudmessage.h.

int HudGaugeMessages::Scroll_time_id

Definition at line 100 of file hudmessage.h.

int HudGaugeMessages::Step_size

Definition at line 87 of file hudmessage.h.

int HudGaugeMessages::Total_life

Definition at line 88 of file hudmessage.h.

int HudGaugeMessages::Window_height

Definition at line 93 of file hudmessage.h.

int HudGaugeMessages::Window_width

Definition at line 92 of file hudmessage.h.

The documentation for this class was generated from the following files: