-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update version to 0.7.0 Signed-off-by: John Burns <[email protected]>
- Loading branch information
1 parent
8a6567e
commit 7fe0366
Showing
25 changed files
with
1,063 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/kotlin/com/github/wakingrufus/eloleague/swiss/GamePicker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.github.wakingrufus.eloleague.swiss | ||
|
||
import com.github.wakingrufus.eloleague.game.GameItem | ||
import javafx.beans.property.SimpleObjectProperty | ||
import javafx.collections.ObservableList | ||
import mu.KLogging | ||
import tornadofx.* | ||
|
||
class GamePicker : Fragment() { | ||
companion object : KLogging() | ||
|
||
val games: List<GameItem> by param() | ||
val selectedGame = SimpleObjectProperty<GameItem>() | ||
|
||
override val root = vbox { | ||
combobox(values = games, property = selectedGame) { | ||
cellFormat { | ||
text = StringBuilder() | ||
.apply { | ||
append(it.team1Players.joinToString(" & ") { it.name }).append(" ") | ||
}.apply { | ||
append(it.team1Score).append(" vs ") | ||
}.apply { | ||
append(it.team2Players.joinToString(" & ") { it.name }).append(" ") | ||
}.apply { | ||
append(it.team2Score).append(" ") | ||
}.toString() | ||
} | ||
} | ||
buttonbar { | ||
button("Ok") { | ||
enableWhen(selectedGame.isNotNull) | ||
action { | ||
close() | ||
} | ||
} | ||
button("Cancel") { | ||
action { | ||
selectedGame.value = null | ||
close() | ||
} | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/kotlin/com/github/wakingrufus/eloleague/swiss/StandingsView.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.github.wakingrufus.eloleague.swiss | ||
|
||
import javafx.beans.property.ReadOnlyDoubleWrapper | ||
import javafx.beans.property.ReadOnlyListWrapper | ||
import mu.KLogging | ||
import tornadofx.* | ||
|
||
class StandingsView : Fragment() { | ||
companion object : KLogging() | ||
|
||
val standings: List<SwissStanding> by param() | ||
|
||
override val root = borderpane { | ||
|
||
center { | ||
id = "standings-wrapper" | ||
|
||
tableview(ReadOnlyListWrapper(standings.observable())) { | ||
column<SwissStanding, String>("Name", { it.value.team.nameProperty }) | ||
column("Points", SwissStanding::matchPoints) | ||
column("Opponent Match win %", SwissStanding::opponentMatchWinPct) | ||
column<SwissStanding, Number>("Game win %") { | ||
ReadOnlyDoubleWrapper(gameWinPct(it.value)) | ||
} | ||
column("Opponent Game win %", SwissStanding::opponentGameWinPct) | ||
columnResizePolicy = SmartResize.POLICY | ||
} | ||
|
||
} | ||
|
||
} | ||
} |
Oops, something went wrong.