Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sinister Zeta 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
Sinister Zeta
Sinister Zeta Project
Commits
82cb48eb
Commit
82cb48eb
authored
4 years ago
by
Jason Dittmer (jcd763)
Browse files
Options
Downloads
Patches
Plain Diff
Started keyValueMap, changed UI functions to use map values instead of strings.
parent
207d7d90
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!45
Prototype to Master for Milestone 5
,
!40
Feature rebind keys
,
!38
Add UI to feature branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ui/KeybindView.java
+18
-4
18 additions, 4 deletions
src/ui/KeybindView.java
src/ui/mainScreen.java
+1
-0
1 addition, 0 deletions
src/ui/mainScreen.java
with
19 additions
and
4 deletions
src/ui/KeybindView.java
+
18
−
4
View file @
82cb48eb
...
...
@@ -17,6 +17,9 @@ public class KeybindView extends Pane {
TextField
keyAction
=
new
TextField
();
//Options for selecting keys
OptionsList
lists
=
new
OptionsList
();
//Mapping of key selections and key code integers
keyValueMap
keyValueMap
=
new
keyValueMap
();
public
KeybindView
()
{
this
.
setStyle
(
"-fx-background-color: #99aab5;"
);
keyToBind
.
setLayoutX
(
60
);
...
...
@@ -49,12 +52,23 @@ public class KeybindView extends Pane {
}
public
String
getKeyToBind
()
{
return
keyToBind
.
getText
();
/**
* Returns an Integer value for the Windows key code for the string representation of a key.
* Corresponds to the key which is being bound
* @return an Integer value for the Windows key code for the string representation of a key
*/
public
Integer
getKeyToBind
()
{
return
keyValueMap
.
getKeyCode
(
keyToBind
.
getText
());
}
/**
* Returns an Integer value for the Windows key code for the string representation of a key.
* Corresponds to the resulting action when the bound key is pressed
* @return an Integer value for the Windows key code for the string representation of a key
*/
public
Integer
getKeyAction
()
{
public
String
getKeyAction
()
{
return
keyAction
.
getText
();
return
keyValueMap
.
getKeyCode
(
keyAction
.
getText
());
}
}
This diff is collapsed.
Click to expand it.
src/ui/mainScreen.java
+
1
−
0
View file @
82cb48eb
...
...
@@ -14,6 +14,7 @@ public class mainScreen extends Pane {
Stage
primaryStage
=
new
Stage
();
Scene
mainScreenScene
=
new
Scene
(
this
,
800
,
800
);
public
mainScreen
()
{
this
.
setStyle
(
"-fx-background-color: #99aab5;"
);
primaryStage
.
setTitle
(
""
);
...
...
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