diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-27 16:29:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-10-27 16:29:43 +0200 |
commit | 0293ec09e3485beb37490eb8a78297befbf9e1a2 (patch) | |
tree | 282e11ff6368cc3a82b9bc341aa86c8855e99ee7 /include | |
parent | 09d059f8e2056ea05aaa6e71b56817f28d0a230a (diff) |
Login background, need to move it behind login somehow
Diffstat (limited to 'include')
-rw-r--r-- | include/Window.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/Window.hpp b/include/Window.hpp index 29ec285..236affa 100644 --- a/include/Window.hpp +++ b/include/Window.hpp @@ -6,6 +6,8 @@ #include <gtkmm/stack.h> #include <odhtdb/Database.hpp> #include <mutex> +#include <random> +#include <vector> namespace dchat { @@ -15,10 +17,30 @@ namespace dchat Window(); virtual ~Window(); private: + bool drawBackground(const Cairo::RefPtr<Cairo::Context> &cairo); + private: std::unique_ptr<odhtdb::Database> database; std::mutex databaseCallbackMutex; Gtk::Stack stack; LoginWindow loginWindow; ChatWindow chatWindow; + + struct Node + { + double radius; + double originalPosX; + double originalPosY; + + double currentPosX; + double currentPosY; + + double targetPosX; + double targetPosY; + }; + + std::mt19937 backgroundRng; + std::vector<Node> backgroundNodes; + int prevTimeMillis; + sigc::connection drawBackgroundConnection; }; }
\ No newline at end of file |