X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Finfoblock.hpp;h=21e2ae4c537f3234ecd1839c02da247606fd3ac8;hb=08ccb17345a52f5ffd8a5dd6ecf675cad55f16a7;hp=7f9b051bf72a95675664ad30437cf99aa9aeb33d;hpb=a113d3bd1feddd510e3b2852b0d42522735eee40;p=supertux.git diff --git a/src/object/infoblock.hpp b/src/object/infoblock.hpp index 7f9b051bf..21e2ae4c5 100644 --- a/src/object/infoblock.hpp +++ b/src/object/infoblock.hpp @@ -22,18 +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