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
c6727ad8
Commit
c6727ad8
authored
4 years ago
by
NikolaBabic
Browse files
Options
Downloads
Patches
Plain Diff
Added demo thread
parent
27cb8e4f
No related branches found
Branches containing commit
No related tags found
2 merge requests
!45
Prototype to Master for Milestone 5
,
!44
Demo
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Main.java
+3
-0
3 additions, 0 deletions
src/Main.java
src/model/Demo.java
+22
-0
22 additions, 0 deletions
src/model/Demo.java
src/ui/MainScreen.java
+2
-1
2 additions, 1 deletion
src/ui/MainScreen.java
with
27 additions
and
1 deletion
src/Main.java
+
3
−
0
View file @
c6727ad8
import
javafx.application.Application
;
import
javafx.stage.Stage
;
import
model.Demo
;
import
model.OSInterface
;
import
ui.MainScreen
;
...
...
@@ -16,7 +17,9 @@ public class Main extends Application {
public
static
void
main
(
String
[]
args
)
{
Thread
thread
=
new
Thread
(
OSInterface
.
getInstance
());
Thread
demoThread
=
new
Thread
(
new
Demo
());
thread
.
start
();
demoThread
.
start
();
launch
(
args
);
...
...
This diff is collapsed.
Click to expand it.
src/model/Demo.java
0 → 100644
+
22
−
0
View file @
c6727ad8
package
model
;
public
class
Demo
implements
Runnable
{
int
id
=
0
;
boolean
stop
=
false
;
public
Demo
()
{
}
public
void
run
()
{
while
(!
stop
)
{
if
(
OSInterface
.
getInstance
().
wasPressed
(
id
))
{
}
}
}
public
void
stop
()
{
stop
=
true
;
}
}
This diff is collapsed.
Click to expand it.
src/ui/MainScreen.java
+
2
−
1
View file @
c6727ad8
...
...
@@ -6,6 +6,7 @@ import javafx.scene.control.ComboBox;
import
javafx.scene.layout.Pane
;
import
javafx.stage.Stage
;
import
model.Hotkey
;
import
model.Modifier
;
import
model.OSInterface
;
/**
...
...
@@ -144,7 +145,7 @@ public class MainScreen extends Pane {
save
.
setStyle
(
"-fx-background-color: #2c2f33; -fx-text-fill: white; -fx-font-size: 16; -fx-vertical-align: middle; "
+
"-fx-pref-width: 100px; -fx-pref-height: 50px; -fx-text-align: center;"
);
save
.
setOnAction
(
e
->
{
Hotkey
newHotkey
=
new
Hotkey
(
KBV
.
getKeyToBind
(),
id
,
KBV
.
getKeyAction
());
Hotkey
newHotkey
=
new
Hotkey
(
KBV
.
getKeyToBind
(),
id
,
Modifier
.
NONE
.
val
());
id
++;
boolean
register
=
OSInterface
.
getInstance
().
registerHotkey
(
newHotkey
);
primaryStage
.
setScene
(
mainScreenScene
);
...
...
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