diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-21 13:29:01 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-21 13:29:01 +0200 |
commit | 3ac1120fd40b84507c51f867559bd05adff4eecf (patch) | |
tree | 32a3d7e037dd0fa07f764e563cfaa304470ad7f1 /include/Tabs.hpp | |
parent | 0f151afa58c1f725a652eaa4444ce3e2b2509770 (diff) |
Use shader for rounded rectangle, improve circle shader
Diffstat (limited to 'include/Tabs.hpp')
-rw-r--r-- | include/Tabs.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/Tabs.hpp b/include/Tabs.hpp index d5aa5b6..d899a61 100644 --- a/include/Tabs.hpp +++ b/include/Tabs.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../external/RoundedRectangleShape.hpp" +#include "RoundedRectangle.hpp" #include <SFML/Graphics/RectangleShape.hpp> #include <SFML/Graphics/Text.hpp> #include <vector> @@ -9,12 +9,13 @@ namespace sf { class Event; class RenderWindow; + class Shader; } namespace QuickMedia { class Tabs { public: - Tabs(sf::Color shade_color = sf::Color(33, 37, 44)); + Tabs(sf::Shader *rounded_rectangle_shader, sf::Color shade_color = sf::Color(33, 37, 44)); static float get_height(); static float get_shade_height(); @@ -34,7 +35,7 @@ namespace QuickMedia { float tab_index_to_x_offset(int index); private: std::vector<sf::Text> tab_texts; - sf::RoundedRectangleShape background; + RoundedRectangle background; sf::RectangleShape shade; int selected_tab = 0; float scroll = 0.0f; |