Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GAME INSA PROJECT
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
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
3EII INFO LKCH
GAME INSA PROJECT
Commits
8761c2d9
Commit
8761c2d9
authored
3 years ago
by
llebasca
Browse files
Options
Downloads
Patches
Plain Diff
button & window correction
parent
311b224f
No related branches found
No related tags found
4 merge requests
!9
Modele
,
!8
Modele
,
!7
Modele
,
!6
Modele
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GAME/include/button.h
+0
-1
0 additions, 1 deletion
GAME/include/button.h
GAME/include/window.h
+11
-7
11 additions, 7 deletions
GAME/include/window.h
GAME/src/button.c
+2
-11
2 additions, 11 deletions
GAME/src/button.c
with
13 additions
and
19 deletions
GAME/include/button.h
+
0
−
1
View file @
8761c2d9
...
...
@@ -33,6 +33,5 @@ typedef struct {
void
init_button
(
Button
*
button
,
int
x
,
int
y
,
int
length
,
int
width
,
char
*
path
);
int
click
(
int
x
,
int
y
,
Button
*
button
);
void
unclick
(
Button
*
button
);
#endif
/*INSAGAME_BUTTON_H*/
This diff is collapsed.
Click to expand it.
GAME/include/window.h
+
11
−
7
View file @
8761c2d9
...
...
@@ -24,10 +24,14 @@
typedef
enum
{
LOADING_PAGE
,
/*!< 0 */
INTRO_PAGE
,
/*!< 1 */
LEVEL_PRESENTATION
,
/*!< 2 */
LEVEL
,
/*!< 3 */
WIN_PAGE
,
/*!< 4 */
FAIL_PAGE
/*!< 5 */
LEVEL_PRESENTATION_1
,
/*!< 2 */
LEVEL_PRESENTATION_2
,
/*!< 3 */
LEVEL_PRESENTATION_3
,
/*!< 4 */
LEVEL_PRESENTATION_4
,
/*!< 5 */
LEVEL_PRESENTATION_5
,
/*!< 6 */
LEVEL
,
/*!< 7 */
WIN_PAGE
,
/*!< 8 */
FAIL_PAGE
/*!< 9 */
}
Window_number
;
...
...
@@ -37,9 +41,9 @@ typedef enum {
*/
typedef
struct
{
int
level
;
/**< */
int
time
;
/**< */
Window_number
nb_window
;
/**< */
int
level
;
/**<
Level integer
*/
int
time
;
/**<
Level's time
*/
Window_number
nb_window
;
/**<
Window's number
*/
}
Window
;
...
...
This diff is collapsed.
Click to expand it.
GAME/src/button.c
+
2
−
11
View file @
8761c2d9
...
...
@@ -54,17 +54,8 @@ int click(int x, int y, Button * button) {
if
(
button
->
x_button
<
x
&&
x
<
(
button
->
x_button
+
button
->
long_button
)
&&
button
->
y_button
<
y
&&
y
<
(
button
->
y_button
+
button
->
larg_button
))
{
button
->
state
=
1
;
}
else
{
button
->
state
=
0
;
}
return
button
->
state
;
}
/*!
* \fn void unclick(Button * button)
* \brief Sets the button's state on OFF.
*
* \param [in] button a pointer on a button
*/
void
unclick
(
Button
*
button
){
button
->
state
=
0
;
}
\ No newline at end of file
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