-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp_Window.h
41 lines (30 loc) · 895 Bytes
/
App_Window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Created by Kelly Lwin on 4/24/2023.
//
#ifndef SFML_TEMPLATE_APP_WINDOW_H
#define SFML_TEMPLATE_APP_WINDOW_H
#include <iostream>
#include <SFML/Graphics.hpp>
#include "Icon.h"
#include "Font.h"
class App_Window: public sf::Drawable {
private:
sf::Texture background;
sf::Sprite appBackground;
sf::Text appName;
sf::Font font;
void setupCloseButton();
void setupBackground();
void updatePositions();
public:
sf::RectangleShape closeButton;
App_Window();
App_Window(std::string appNameStr);
void setAppName(const std::string& name);
sf::Vector2f getPosition() const;
void setPosition(const sf::Vector2f& pos);
void setScale(const sf::Vector2f& scale);
protected:
void draw(sf::RenderTarget &target, sf::RenderStates states) const override;
};
#endif //SFML_TEMPLATE_APP_WINDOW_H