Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Beadando_3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grodvalt Enikő Ágnes
Beadando_3
Commits
9443e89d
Commit
9443e89d
authored
2 months ago
by
Grodvalt Enikő Ágnes
Browse files
Options
Downloads
Patches
Plain Diff
athelyez fuggveny, jatekmester class (rossz)
parent
32e7b796
Branches
master
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
app.cpp
+2
-14
2 additions, 14 deletions
app.cpp
main.cpp
+8
-2
8 additions, 2 deletions
main.cpp
pont.cpp
+5
-0
5 additions, 0 deletions
pont.cpp
pont.hpp
+1
-0
1 addition, 0 deletions
pont.hpp
widgets.cpp
+1
-0
1 addition, 0 deletions
widgets.cpp
with
17 additions
and
16 deletions
app.cpp
+
2
−
14
View file @
9443e89d
...
...
@@ -54,20 +54,8 @@ void App::event_loop() {
}
else
if
(
ev
.
type
==
ev_key
)
{
if
(
ev
.
keycode
==
key_enter
)
action
(
"enter"
);
if
(
ev
.
keycode
==
key_pgdn
)
action
(
"checkbox_-10"
);
else
if
(
ev
.
keycode
==
key_pgup
)
action
(
"checkbox_10"
);
else
if
(
ev
.
keycode
==
key_up
)
action
(
"checkbox_1"
);
else
if
(
ev
.
keycode
==
key_down
)
action
(
"checkbox_-1"
);
/*if(ev.keycode == key_enter)
action("enter");*/
}
if
(
focus
!=-
1
)
{
widgets
[
focus
]
->
handle
(
ev
);
...
...
This diff is collapsed.
Click to expand it.
main.cpp
+
8
−
2
View file @
9443e89d
...
...
@@ -3,12 +3,12 @@
#include
"app.hpp"
#include
"pont.hpp"
#include
"korong.hpp"
//#include "jatekmester.hpp"
#include
<vector>
#include
<string>
#include
<fstream>
#include
<iostream>
#include
<cmath>
using
namespace
std
;
using
namespace
genv
;
...
...
@@ -49,15 +49,21 @@ public:
jatekos
.
push_back
(
new
Korong
(
this
,
xj
,
y
,
25
,
1
));
ellenfel
.
push_back
(
new
Korong
(
this
,
xe
,
y
,
25
,
0
));
}
//gameManager = new JatekMester(pontok, jatekos, ellenfel);
}
void
action
(
string
id
)
{}
{
}
protected
:
vector
<
vector
<
Pont
*>>
pontok
;
vector
<
Korong
*>
jatekos
;
vector
<
Korong
*>
ellenfel
;
//JatekMester* gameManager;
};
int
main
()
...
...
This diff is collapsed.
Click to expand it.
pont.cpp
+
5
−
0
View file @
9443e89d
...
...
@@ -44,3 +44,8 @@ void Pont::handle(event ev)
}
}
}
vector
<
int
>
Pont
::
koordinata
()
const
{
return
{
_x
,
_y
};
}
This diff is collapsed.
Click to expand it.
pont.hpp
+
1
−
0
View file @
9443e89d
...
...
@@ -15,6 +15,7 @@ public:
virtual
void
draw
()
override
;
virtual
void
handle
(
genv
::
event
ev
)
override
;
virtual
bool
is_selected
(
int
mouse_x
,
int
mouse_y
)
override
;
std
::
vector
<
int
>
koordinata
()
const
;
};
#endif // PONT_HPP
This diff is collapsed.
Click to expand it.
widgets.cpp
+
1
−
0
View file @
9443e89d
#include
"widgets.hpp"
#include
"graphics.hpp"
#include
"app.hpp"
using
namespace
genv
;
Widget
::
Widget
(
App
*
parent
,
int
x
,
int
y
,
int
sx
,
int
sy
)
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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