Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Netrunner
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
Olivia Foshaug Ingvaldsen
Netrunner
Commits
fef78ec8
Commit
fef78ec8
authored
2 years ago
by
Olivia Foshaug Ingvaldsen
Browse files
Options
Downloads
Patches
Plain Diff
Change exit button
parent
ffd5eaed
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#218882
failed
2 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/tdt4240/netrunner/view/GameScreen.kt
+9
-2
9 additions, 2 deletions
core/src/tdt4240/netrunner/view/GameScreen.kt
core/src/tdt4240/netrunner/view/util/TextureRepository.kt
+1
-0
1 addition, 0 deletions
core/src/tdt4240/netrunner/view/util/TextureRepository.kt
with
10 additions
and
2 deletions
core/src/tdt4240/netrunner/view/GameScreen.kt
+
9
−
2
View file @
fef78ec8
...
...
@@ -5,6 +5,7 @@ import com.badlogic.gdx.ScreenAdapter
import
com.badlogic.gdx.graphics.Color
import
com.badlogic.gdx.graphics.GL20
import
com.badlogic.gdx.graphics.OrthographicCamera
import
com.badlogic.gdx.graphics.Texture
import
com.badlogic.gdx.scenes.scene2d.InputEvent
import
com.badlogic.gdx.scenes.scene2d.Stage
import
com.badlogic.gdx.scenes.scene2d.ui.ImageButton
...
...
@@ -38,7 +39,11 @@ class GameScreen(private val game: Netrunner, private val controller: GameContro
buttonStyle
.
font
=
game
.
skin
.
getFont
(
"default-font"
)
buttonStyle
.
downFontColor
=
Color
.
RED
val
exitButton
=
TextButton
(
"Exit"
,
buttonStyle
)
//bruk evt. game.skin
val
exitButton
=
ImageButton
(
TextureRegionDrawable
(
TextureRepository
.
exitButton
))
//bruk evt. game.skin
exitButton
.
apply
{
width
=
70f
height
=
70f
}
//if we want an exact position
//exitButton.setPosition(1000f, 10f)
// stage.addActor(exitButton)
...
...
@@ -69,7 +74,9 @@ class GameScreen(private val game: Netrunner, private val controller: GameContro
val
table
=
Table
()
table
.
setFillParent
(
true
)
table
.
row
()
table
.
add
(
exitButton
).
pad
(
50f
).
expand
().
top
().
right
()
table
.
add
(
exitButton
).
pad
(
30f
).
expand
().
top
().
right
()
.
width
(
exitButton
.
width
)
.
height
(
exitButton
.
height
)
table
.
row
()
stage
.
addActor
(
table
)
...
...
This diff is collapsed.
Click to expand it.
core/src/tdt4240/netrunner/view/util/TextureRepository.kt
+
1
−
0
View file @
fef78ec8
...
...
@@ -26,6 +26,7 @@ object TextureRepository {
val
upButton
=
Texture
(
Gdx
.
files
.
internal
(
"ui_up.png"
))
val
downButton
=
Texture
(
Gdx
.
files
.
internal
(
"ui_down.png"
))
val
exitButton
=
Texture
(
Gdx
.
files
.
internal
(
"ui_exit.png"
))
init
{
for
(
color
in
PlayerColor
.
values
())
{
...
...
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