Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Chess
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
Bolla Péter
Chess
Commits
113f678a
Commit
113f678a
authored
2 months ago
by
Bolla Péter
Browse files
Options
Downloads
Patches
Plain Diff
Update button.hpp
parent
e23fa524
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
button.hpp
+9
-5
9 additions, 5 deletions
button.hpp
with
9 additions
and
5 deletions
button.hpp
+
9
−
5
View file @
113f678a
...
@@ -7,23 +7,27 @@
...
@@ -7,23 +7,27 @@
class
Button
:
public
Widget
class
Button
:
public
Widget
{
{
protected:
protected:
bool
pressed
;
bool
pressed
;
//Only occupied can be pressed
bool
active
;
//The squares pressed can move to
std
::
string
_label
;
std
::
string
_label
;
std
::
function
<
void
()
>
_f
;
std
::
function
<
void
()
>
_f
;
Square
_s
;
int
_ind
;
Chess
*
_cb
;
public:
public:
Button
(
App
*
,
int
,
int
,
int
,
int
,
std
::
function
<
void
()
>
,
Square
);
Button
(
App
*
,
int
,
int
,
int
,
int
,
std
::
function
<
void
()
>
,
Chess
*
,
int
);
Button
();
Button
();
virtual
void
Draw
()
const
override
;
virtual
void
Draw
()
const
override
;
virtual
void
Handle
(
genv
::
event
ev
)
override
;
virtual
void
Handle
(
genv
::
event
ev
,
Operation
)
override
;
virtual
std
::
string
GetValue
()
const
override
;
virtual
bool
Pressed
();
virtual
bool
Pressed
();
virtual
bool
Active
();
void
action
();
void
action
();
private:
private:
void
Press
();
void
Press
();
void
Release
();
void
Release
();
void
Activate
();
void
Deactivate
();
};
};
#endif // BUTTON_HPP
#endif // BUTTON_HPP
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