Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Сулимов Игорь Андреевич
Pac-Man
Commits
6a02e5a6
Commit
6a02e5a6
authored
1 week ago
by
Сулимов Игорь Андреевич
Browse files
Options
Download
Patches
Plain Diff
Menu and button
parent
10b061ad
main
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
include/Application.h
+1
-1
include/Application.h
include/Drawable/Button.h
+1
-1
include/Drawable/Button.h
include/Drawable/Menu.h
+1
-1
include/Drawable/Menu.h
include/IWindowKeeper.h
+1
-1
include/IWindowKeeper.h
include/States/SelectState.h
+5
-1
include/States/SelectState.h
with
9 additions
and
5 deletions
+9
-5
include/Application.h
+
1
−
1
View file @
6a02e5a6
...
...
@@ -10,6 +10,6 @@ private:
std
::
unique_ptr
<
IState
>
m_ptr_state_next
;
std
::
unique_ptr
<
IState
>
m_ptr_state_current
;
public:
Application
();
///@todo
Application
()
{}
;
///@todo
int
run
();
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
include/Drawable/Button.h
+
1
−
1
View file @
6a02e5a6
...
...
@@ -11,7 +11,7 @@ public:
bool
is_selected
();
///@todo
void
is_position_in
(
sf
::
Vector2f
pos
);
///@todo
void
push
()
const
;
void
draw_into
(
sf
::
RenderWindow
&
window
)
const
override
;
///@todo
void
draw_into
(
sf
::
RenderWindow
&
window
)
const
override
{}
;
///@todo
private
:
sf
::
Text
m_text
;
bool
m_is_selected
=
false
;
...
...
This diff is collapsed.
Click to expand it.
include/Drawable/Menu.h
+
1
−
1
View file @
6a02e5a6
...
...
@@ -8,7 +8,7 @@ public:
void
draw_into
(
sf
::
RenderWindow
&
window
)
const
override
;
void
process_mouse
(
sf
::
Vector2f
pos
,
bool
is_pressed
);
///@todo
public:
Menu
(
IStateManager
&
state_manager
)
;
///@todo
Menu
(
IStateManager
&
state_manager
)
{}
///@todo
private
:
std
::
array
<
Button
,
4
>
m_buttons
;
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
include/IWindowKeeper.h
+
1
−
1
View file @
6a02e5a6
...
...
@@ -8,7 +8,7 @@ protected:
virtual
void
update
()
=
0
;
///@todo
virtual
void
render
()
=
0
;
///@todo
public:
IWindowKeeper
(
const
sf
::
VideoMode
&
video_mode
,
const
std
::
string
&
window_title
)
;
///@todo
IWindowKeeper
(
const
sf
::
VideoMode
&
video_mode
,
const
std
::
string
&
window_title
)
{}
///@todo
protected
:
sf
::
RenderWindow
m_window
;
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
include/States/SelectState.h
+
5
−
1
View file @
6a02e5a6
...
...
@@ -5,7 +5,11 @@
class
SelectState
:
public
IState
,
public
IWindowKeeper
{
public:
bool
do_step
()
override
;
///@todo
bool
do_step
()
override
{
return
false
;}
///@todo
void
event_handling
()
override
{};
///@todo
void
update
()
override
{};
///@todo
void
render
()
override
{};
///@todo
public
:
SelectState
(
IStateManager
&
state_manager
,
const
sf
::
VideoMode
&
video_mode
,
const
std
::
string
&
window_title
);
private
:
Menu
m_menu
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets