Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NetWorld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LAIRD Timothy
NetWorld
Commits
d4d8145e
Commit
d4d8145e
authored
Apr 30, 2021
by
ewen.madec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
animation option menu
parent
c913cde8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
main-viewer.c
src/main-viewer.c
+1
-0
options-menu.c
src/options-menu.c
+2
-0
options-menu.h
src/options-menu.h
+1
-0
No files found.
src/main-viewer.c
View file @
d4d8145e
...
@@ -130,6 +130,7 @@ int main(int nbArg, char ** arg)
...
@@ -130,6 +130,7 @@ int main(int nbArg, char ** arg)
//Check key inputs for active input fields (only accepts numerical characters)
//Check key inputs for active input fields (only accepts numerical characters)
for
(
int
index
=
0
;
index
<
optionsMenu
->
inputCount
;
index
++
){
for
(
int
index
=
0
;
index
<
optionsMenu
->
inputCount
;
index
++
){
if
(
optionsMenu
->
inputs
[
index
]
->
inputActive
){
if
(
optionsMenu
->
inputs
[
index
]
->
inputActive
){
DrawRectangleLinesEx
((
Rectangle
){
optionsMenu
->
inputBox
[
index
].
x
-
3
,
optionsMenu
->
inputBox
[
index
].
y
-
3
,
optionsMenu
->
inputBox
[
index
].
width
+
5
,
optionsMenu
->
inputBox
[
index
].
height
+
5
},
5
,
BLACK
);
if
((
key
>=
48
)
&&
(
key
<=
57
)
&&
(
optionsMenu
->
inputCount
<
3
)){
if
((
key
>=
48
)
&&
(
key
<=
57
)
&&
(
optionsMenu
->
inputCount
<
3
)){
Int_Input_add_char
(
optionsMenu
->
inputs
[
index
],
&
key
);
Int_Input_add_char
(
optionsMenu
->
inputs
[
index
],
&
key
);
}
}
...
...
src/options-menu.c
View file @
d4d8145e
...
@@ -17,6 +17,8 @@ Options_Menu * Options_Menu_init(int * playerCount, int * nodeCount, const int s
...
@@ -17,6 +17,8 @@ Options_Menu * Options_Menu_init(int * playerCount, int * nodeCount, const int s
self
->
inputs
=
malloc
(
sizeof
(
Int_Input
)
*
self
->
inputCount
);
self
->
inputs
=
malloc
(
sizeof
(
Int_Input
)
*
self
->
inputCount
);
self
->
inputs
[
0
]
=
playerCountInput
;
self
->
inputs
[
0
]
=
playerCountInput
;
self
->
inputs
[
1
]
=
nodeCountInput
;
self
->
inputs
[
1
]
=
nodeCountInput
;
self
->
inputBox
[
0
]
=
playerCountInputBox
;
self
->
inputBox
[
1
]
=
nodeCountInputBox
;
//Save and exit btn
//Save and exit btn
Rectangle
saveBtn
=
{
0
,
(
screenHeight
*
95
)
/
100
,
(
screenWidth
*
20
)
/
100
,
(
screenHeight
*
10
)
/
100
};
Rectangle
saveBtn
=
{
0
,
(
screenHeight
*
95
)
/
100
,
(
screenWidth
*
20
)
/
100
,
(
screenHeight
*
10
)
/
100
};
...
...
src/options-menu.h
View file @
d4d8145e
...
@@ -12,6 +12,7 @@ struct Str_Options_Menu{
...
@@ -12,6 +12,7 @@ struct Str_Options_Menu{
//Return btn
//Return btn
Rectangle
saveReturnBtn
;
Rectangle
saveReturnBtn
;
Rectangle
smallerSaveReturnBtn
;
Rectangle
smallerSaveReturnBtn
;
Rectangle
inputBox
[
2
];
};
};
typedef
struct
Str_Options_Menu
Options_Menu
;
typedef
struct
Str_Options_Menu
Options_Menu
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment