File: messagebox.h

package info (click to toggle)
simutrans 100.0%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,776 kB
  • ctags: 9,485
  • sloc: cpp: 72,459; ansic: 5,646; makefile: 450
file content (51 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef gui_messagebox_h
#define gui_messagebox_h

#include "gui_frame.h"
#include "components/gui_world_view_t.h"
#include "components/gui_image.h"
#include "components/gui_textarea.h"
#include "../simskin.h"
#include "../besch/skin_besch.h"
#include "../simcolor.h"

/**
 * Eine Klasse fr Nachrichtenfenster.
 * @author Hj. Malthaner
 */
class news_window : public gui_frame_t
{
	public:
		virtual PLAYER_COLOR_VAL get_titelcolor() const { return color; }

	protected:
		news_window(const char* text, PLAYER_COLOR_VAL color);

	private:
		gui_textarea_t meldung;
		PLAYER_COLOR_VAL color;
};


/* Shows a news window with an image */
class news_img : public news_window
{
	public:
		news_img(const char* text, image_id bild = skinverwaltung_t::meldungsymbol->gib_bild_nr(0), PLAYER_COLOR_VAL color = WIN_TITEL);

	private:
		gui_image_t bild;
};


/* Shows a news window with a view on some location */
class news_loc : public news_window
{
	public:
		news_loc(karte_t* welt, const char* text, koord k, PLAYER_COLOR_VAL color = WIN_TITEL);

	private:
		world_view_t view;
};

#endif