Advertisement
Egor_Vakar

Button.hpp (coursework)

Dec 26th, 2022
1,354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <iostream>
  4. #include <SFML/Graphics.hpp>
  5.  
  6. #include "Core.hpp"
  7.  
  8. class Button{
  9.  
  10. public:
  11.     sf::Texture btnTex;
  12.     sf::Sprite btnSpr;
  13.     sf::RenderWindow app;
  14.  
  15.     sf::Vector2f location;
  16.     sf::Vector2f btnSize;
  17.  
  18.     bool isLocked = false;
  19.     bool enable = true;
  20.     float currentTimeLocked = 0;
  21.     float timeLocked = 1;
  22.  
  23.     float delay = 0;
  24.  
  25.     TableHandle* event;
  26.     enum TableHandle::Actions action;
  27.  
  28. public:
  29.     Button(TableHandle* );
  30.     ~Button();
  31.     void EventHandle(sf::RenderWindow& app, float&);
  32.     void Draw(sf::RenderWindow& app);
  33.     void setEvent(enum TableHandle::Actions);
  34.     void setImage(sf::Texture&);
  35.     void setLocation(sf::Vector2f);
  36.     void setTimeLocked(float );
  37.     void setEnable(bool);
  38.  
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement