author | Tero Marttila <terom@fixme.fi> |
Thu, 22 Jan 2009 00:28:26 +0200 | |
branch | new_graphics |
changeset 416 | 38cba347a3a9 |
parent 414 | cede5463b845 |
permissions | -rw-r--r-- |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
1 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
2 |
#include "GameView.hh" |
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
3 |
#include "Graphics.hh" |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
4 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
5 |
#include <cassert> |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
6 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
7 |
namespace graphics |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
8 |
{ |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
9 |
|
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
10 |
GameView::GameView (GameState &state, LocalPlayer *player) : |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
11 |
View(PixelArea(0, 0, graphics->display.get_width(), graphics->display.get_height())), |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
12 |
state(state), player(NULL), info_view(NULL), message_view(getMessageViewArea()), |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
13 |
flags(0) |
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
14 |
{ |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
15 |
// have player? |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
16 |
if (player) |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
17 |
setPlayer(player); |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
18 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
19 |
// insert message |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
20 |
message_view.add_message(CL_Color::white, "Hello World!"); |
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
21 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
22 |
// enable GUI input |
416
38cba347a3a9
clean up InputHandler/GameView to use signals for input
Tero Marttila <terom@fixme.fi>
parents:
414
diff
changeset
|
23 |
slots.connect(graphics->input.gui.sig_input(), this, &GameView::handleInput); |
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
24 |
graphics->input.gui.enable(); |
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
25 |
} |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
26 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
27 |
void GameView::setPlayer (LocalPlayer *player) { |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
28 |
assert(!this->player && player); |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
29 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
30 |
// remember it |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
31 |
this->player = player; |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
32 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
33 |
// build the info_view as well |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
34 |
info_view = new PlayerInfoView(getInfoViewArea(), player); |
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
35 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
36 |
// enable player input |
416
38cba347a3a9
clean up InputHandler/GameView to use signals for input
Tero Marttila <terom@fixme.fi>
parents:
414
diff
changeset
|
37 |
slots.connect(graphics->input.player.sig_input(), player, &LocalPlayer::handleInput); |
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
38 |
graphics->input.player.enable(); |
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
39 |
} |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
40 |
|
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
41 |
void GameView::handleInput (GuiInput flags, TimeMS dt) { |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
42 |
// ignore timing info |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
43 |
(void) dt; |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
44 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
45 |
// update our flags |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
46 |
this->flags = flags; |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
47 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
48 |
// quit? |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
49 |
if (flags & GUI_INPUT_QUIT) { |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
50 |
graphics->engine.stop(); |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
51 |
return; |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
52 |
} |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
53 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
54 |
// dump player debug info on stderr |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
55 |
if ((flags & GUI_INPUT_DEBUG_PLAYER) && player) { |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
56 |
player->printDebugInfo(); |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
57 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
58 |
message_view.add_message(CL_Color::green, "..."); |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
59 |
} |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
60 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
61 |
// toggle fullscreen? |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
62 |
if (flags & GUI_INPUT_TOGGLE_FULLSCREEN) |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
63 |
graphics->display.toggleFullscreen(); |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
64 |
} |
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
65 |
|
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
66 |
|
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
67 |
/* |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
68 |
* Helper function for Camera |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
69 |
*/ |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
70 |
static PixelDimension value_between (PixelDimension low, PixelDimension value, PixelDimension high) { |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
71 |
if (high < low) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
72 |
return (high + low) / 2; |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
73 |
|
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
74 |
else if (value < low) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
75 |
return low; |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
76 |
|
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
77 |
else if (value > high) |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
78 |
return high; |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
79 |
|
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
80 |
else |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
81 |
return value; |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
82 |
} |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
83 |
|
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
84 |
void GameView::draw (Display &display) { |
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
85 |
CL_GraphicContext *gc = display.get_gc(); |
414
cede5463b845
port Input to new Graphics, still a bit hacky, but everything seems to work now
Tero Marttila <terom@fixme.fi>
parents:
412
diff
changeset
|
86 |
|
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
87 |
// calculate camera |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
88 |
PixelCoordinate camera(0, 0); |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
89 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
90 |
// ...to track our local player |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
91 |
if (player != NULL) { |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
92 |
// display resolution |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
93 |
PixelCoordinate resolution = display.getResolution(); |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
94 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
95 |
// try and center the screen on the player |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
96 |
PixelCoordinate target = player->getCoordinate() - PixelCoordinate(resolution.x / 2, (resolution.y - 100) / 2); |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
97 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
98 |
// ...but keep the world in view |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
99 |
PixelCoordinate max = state.terrain.getDimensions() - resolution + PixelCoordinate(0, 100); |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
100 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
101 |
// ...by limiting the value to 0...max |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
102 |
camera = PixelCoordinate( |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
103 |
value_between(0, target.x, max.x), |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
104 |
value_between(0, target.y, max.y) |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
105 |
); |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
106 |
} |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
107 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
108 |
// Black background |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
109 |
gc->clear(CL_Color::black); |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
110 |
|
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
111 |
// Draw the game |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
112 |
state.draw(display, camera, flags & GUI_INPUT_DISPLAY_WEAPON); |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
113 |
|
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
114 |
// draw info view? |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
115 |
if (info_view) |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
116 |
info_view->draw(display); |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
117 |
|
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
118 |
// draw messages |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
119 |
message_view.draw(display); |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
120 |
} |
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
121 |
|
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
122 |
void GameView::resize (const PixelArea &new_area) { |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
123 |
View::resize(new_area); |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
124 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
125 |
// resize subcomponents |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
126 |
if (info_view) |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
127 |
info_view->resize(getInfoViewArea()); |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
128 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
129 |
message_view.resize(getMessageViewArea()); |
410
41fd46cffc52
start working out the Graphics/* code, this is a long way from compiling, let alone working
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
130 |
|
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
131 |
// log message |
412
721c60072091
new graphics code compiles... no, it doesn't work yet
Tero Marttila <terom@fixme.fi>
parents:
411
diff
changeset
|
132 |
message_view.add_message(CL_Color::yellow, CL_String::format("[ Resized window to %1 x %2 ]", (int) getWidth(), (int) getHeight())); |
411
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
133 |
} |
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
134 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
135 |
|
106aaf6eadfe
there's a grain of truth in the new graphics code now...
Tero Marttila <terom@fixme.fi>
parents:
410
diff
changeset
|
136 |
} |