Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bead3_papbe5
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Papp Benjámin
bead3_papbe5
Commits
8f2c211c
Commit
8f2c211c
authored
1 year ago
by
Papp Benjámin
Browse files
Options
Downloads
Patches
Plain Diff
egér javítás
parent
86f09ccc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
mester.cpp
+6
-2
6 additions, 2 deletions
mester.cpp
palyamezo.cpp
+11
-2
11 additions, 2 deletions
palyamezo.cpp
palyamezo.h
+3
-0
3 additions, 0 deletions
palyamezo.h
widget.cpp
+3
-5
3 additions, 5 deletions
widget.cpp
widget.h
+2
-1
2 additions, 1 deletion
widget.h
with
25 additions
and
10 deletions
mester.cpp
+
6
−
2
View file @
8f2c211c
...
...
@@ -8,10 +8,14 @@ using namespace genv;
Mester
::
Mester
(
Palya
*
_p
)
:
p
(
_p
)
{}
void
Mester
::
iranyitas
(
Palyamezo
*
f
,
event
ev
)
{
if
(
f
->
hozzaer
(
ev
)
&&
!
f
->
filled
)
if
(
f
->
hozzaer
(
ev
)
&&
!
f
->
filled
&&
!
f
->
chosen
){
f
->
chosen_draw
();
if
(
!
f
->
hozzaer
(
ev
)
&&
!
f
->
filled
)
f
->
set_chosen
();
}
if
(
!
f
->
hozzaer
(
ev
)
&&
!
f
->
filled
&&
f
->
chosen
){
f
->
draw
();
f
->
reset_chosen
();
}
if
(
f
->
select
(
ev
)
&&
!
f
->
filled
)
lepes
=
true
;
}
...
...
This diff is collapsed.
Click to expand it.
palyamezo.cpp
+
11
−
2
View file @
8f2c211c
...
...
@@ -12,10 +12,19 @@ void Palyamezo::draw(){
gout
<<
move_to
(
x
+
1
,
y
+
1
)
<<
color
(
t
,
t
,
t
)
<<
box
(
w
-
2
,
h
-
2
);
}
void
Palyamezo
::
chosen_draw
()
{
void
Palyamezo
::
chosen_draw
(){
int
t
=
175
;
gout
<<
move_to
(
x
+
1
,
y
+
1
)
<<
color
(
t
,
t
,
t
)
<<
box
(
w
-
2
,
h
-
2
);
}
void
Palyamezo
::
set_chosen
(){
if
(
!
chosen
)
chosen
=
true
;
}
void
Palyamezo
::
reset_chosen
(){
if
(
chosen
)
chosen
=
false
;
}
Palyamezo
::~
Palyamezo
()
{}
This diff is collapsed.
Click to expand it.
palyamezo.h
+
3
−
0
View file @
8f2c211c
...
...
@@ -12,6 +12,9 @@ public:
void
draw
()
override
;
void
chosen_draw
();
bool
filled
=
false
;
bool
chosen
=
false
;
void
set_chosen
();
void
reset_chosen
();
};
#endif // PALYAMEZO_H
This diff is collapsed.
Click to expand it.
widget.cpp
+
3
−
5
View file @
8f2c211c
...
...
@@ -2,18 +2,16 @@
using
namespace
genv
;
Widget
::
Widget
(
Palya
*
_p
,
int
_x
,
int
_y
,
int
_w
,
int
_h
)
:
p
(
_p
),
x
(
_x
),
y
(
_y
),
w
(
_w
),
h
(
_h
){}
Widget
::
Widget
(
Palya
*
_p
,
int
_x
,
int
_y
,
int
_w
,
int
_h
)
:
p
(
_p
),
x
(
_x
),
y
(
_y
),
w
(
_w
),
h
(
_h
)
{}
bool
Widget
::
hozzaer
(
event
ev
)
{
bool
Widget
::
hozzaer
(
event
ev
){
if
(
ev
.
pos_x
>
x
&&
ev
.
pos_x
<
x
+
w
&&
ev
.
pos_y
<
y
+
h
&&
ev
.
pos_y
>
y
)
return
true
;
else
return
false
;
}
bool
Widget
::
select
(
event
ev
)
{
bool
Widget
::
select
(
event
ev
){
if
(
hozzaer
(
ev
)
&&
ev
.
button
==
btn_left
)
return
true
;
if
(
!
hozzaer
(
ev
)
&&
ev
.
button
==
btn_left
)
...
...
This diff is collapsed.
Click to expand it.
widget.h
+
2
−
1
View file @
8f2c211c
...
...
@@ -4,7 +4,8 @@
class
Palya
;
class
Widget
{
class
Widget
{
protected:
int
x
,
y
,
w
,
h
;
Palya
*
p
;
...
...
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