X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Finfoblock.hpp;h=21e2ae4c537f3234ecd1839c02da247606fd3ac8;hb=08ccb17345a52f5ffd8a5dd6ecf675cad55f16a7;hp=4aa6d4e416aaf7736da40fd5f29ffd28d33284c2;hpb=07ddaed2a657e4d2a3d038fed223fc5827159caf;p=supertux.git diff --git a/src/object/infoblock.hpp b/src/object/infoblock.hpp index 4aa6d4e41..21e2ae4c5 100644 --- a/src/object/infoblock.hpp +++ b/src/object/infoblock.hpp @@ -22,19 +22,31 @@ #include "block.hpp" //#include "object/ambient_sound.hpp" +#include "textscroller.hpp" class InfoBlock : public Block { public: InfoBlock(const lisp::Lisp& lisp); virtual ~InfoBlock(); - + void update(float elapsed_time); + void draw(DrawingContext& context); + + void show_message(); + void hide_message(); + protected: virtual void hit(Player& player); std::string message; //AmbientSound* ringing; //bool stopped; + float shown_pct; /**< Value in the range of 0..1, depending on how much of the infobox is currently shown */ + float dest_pct; /**< With each call to update(), shown_pct will slowly transition to this value */ + + Player* get_nearest_player(); + + std::vector lines; /**< lines of text (or images) to display */ + float lines_height; }; #endif -