@@ -42,23 +42,6 @@ namespace GUI {
4242 };
4343
4444
45- // Class of slider bar with point on it to control need parameter
46- class Slider : public TextureTemplate {
47- private:
48- SDL_Texture *textureButton; // Texture of line (upper part of slider)
49- SDL_FRect buttonRect; // Place for rendering upper part
50- const unsigned maxValue; // Maximal value of state
51-
52- public:
53- // Create slide with need line and button images
54- Slider (const Window& window, float X, float Y, float width, unsigned startValue,
55- Textures lineImage = Textures::SliderLine, Textures buttonImage = Textures::SliderButton, unsigned max = 255 );
56- unsigned setValue (float mouseX); // Setting new state from mouse position
57- unsigned scroll (float wheelY); // Checking mouse wheel action
58- void blit () const override ; // Drawing slider with need button position
59- };
60-
61-
6245 // Class of rounded backplate for better understability
6346 class RoundedBackplate : public TextureTemplate {
6447 public:
@@ -83,6 +66,23 @@ namespace GUI {
8366
8467 // Textures
8568 #if (USE_SDL_IMAGE) && (PRELOAD_TEXTURES)
69+ // Class of slider bar with point on it to control need parameter
70+ class Slider : public TextureTemplate {
71+ private:
72+ SDL_Texture *textureButton; // Texture of line (upper part of slider)
73+ SDL_FRect buttonRect; // Place for rendering upper part
74+ const unsigned maxValue; // Maximal value of state
75+
76+ public:
77+ // Create slide with need line and button images
78+ Slider (const Window& window, float X, float Y, float width, unsigned startValue,
79+ Textures lineImage = Textures::SliderLine, Textures buttonImage = Textures::SliderButton, unsigned max = 255 );
80+ unsigned setValue (float mouseX); // Setting new state from mouse position
81+ unsigned scroll (float wheelY); // Checking mouse wheel action
82+ void blit () const override ; // Drawing slider with need button position
83+ };
84+
85+
8686 // Class of buttons with image on it
8787 class ImageButton : public TextureTemplate {
8888 public:
0 commit comments