NasNas
An intuitive and beginner friendly 2D game framework for C++
include
NasNas
ui
GuiRoot.hpp
1
// Created by Modar Nasser on 02/11/2021.
2
3
#pragma once
4
5
#include <SFML/System/Vector2.hpp>
6
7
#include <NasNas/core/AppAccess.hpp>
8
#include <NasNas/ui/Container.hpp>
9
10
namespace
ns
{
11
class
Camera;
12
}
13
14
namespace
ns::ui
{
15
16
class
GuiRoot
:
public
Container
,
public
AppAccess
<> {
17
public
:
18
GuiRoot
();
19
void
setCamera(
Camera
& cam);
20
auto
getMousePosition()
const
-> sf::Vector2f;
21
auto
getTouchPosition(
unsigned
finger)
const
-> sf::Vector2f;
22
23
void
setMaxFingersCount(
int
finger_count);
24
auto
getMaxFingersCount()
const
-> int;
25
26
private
:
27
using
Container::setSize;
28
Camera
* m_cam =
nullptr
;
29
int
m_max_finger_count = 1;
30
};
31
32
}
ns::AppAccess
Definition:
AppAccess.hpp:24
ns::ui
Definition:
Button.hpp:12
ns::Camera
Definition:
Camera.hpp:22
ns::ui::Container
Definition:
Container.hpp:20
ns::ui::GuiRoot
Definition:
GuiRoot.hpp:16
ns
Generated by
1.8.13