ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/dclient/src/frontend/client/renderer.cpp
Revision: 1.2
Committed: Mon Oct 18 15:34:24 2010 UTC (16 years ago) by sf-pippijn
Branch: MAIN
Changes since 1.1: +4 -4 lines
Log Message:
first attempt to support maximising windows

File Contents

# User Rev Content
1 sf-pippijn 1.1 #include "deliantra/data/map.h"
2     #include "deliantra/data/statistics.h"
3    
4     #include "dclient/renderer.h"
5     #include "dclient/widgets.h"
6     #include "dclient/widgets/map.h"
7     #include "dclient/widgets/stats.h"
8    
9     #include <ndk++/application.hh>
10    
11     renderer::renderer (widgets &ui)
12     : ui (ui)
13     {
14     }
15    
16     renderer::~renderer ()
17     {
18     }
19    
20     void
21     renderer::drawinfo (std::string const &info)
22     {
23 sf-pippijn 1.2 ui.info->add_text (info + "\n");
24     ui.info->visualize ();
25 sf-pippijn 1.1 }
26    
27     void
28     renderer::map (data::map const &map)
29     {
30     ui.map->update (map);
31     ui.map->visualize ();
32     ui.stats->visualize ();
33    
34     ndk::app ().update ();
35     }
36    
37     void
38     renderer::msg (int n, std::string const &channel, std::string const &msg)
39     {
40 sf-pippijn 1.2 ui.info->add_text (channel + ": " + msg + "\n");
41     ui.info->visualize ();
42 sf-pippijn 1.1 }
43    
44     void
45     renderer::stats (data::statistics const &stats)
46     {
47     ui.stats->update (stats);
48     ui.stats->visualize ();
49     }