Skip to content

Commit

Permalink
Add text indicating the round in score_check
Browse files Browse the repository at this point in the history
  • Loading branch information
MokeEire committed Aug 17, 2020
1 parent 379c408 commit 9fb879a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,8 @@ observeEvent(input$resume_no, {

showModal(
score_check(team = "A",
players = eligible_shooters))
players = eligible_shooters,
round = round_num()))
})

# Team A presses score button
Expand Down Expand Up @@ -1500,7 +1501,8 @@ observeEvent(input$resume_no, {
showModal(
score_check(
team = "B",
players = eligible_shooters))
players = eligible_shooters,
round = round_num()))

})

Expand Down
4 changes: 2 additions & 2 deletions ui_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# UI functions ------------------------------------------------------------

# Score pop-up dialog box
score_check <- function(team, players) {
score_check <- function(team, players, round) {
# Identify which team scored
team_scored = paste("ok", team, sep = "_")
team_colour = if_else(team_scored == "ok_A", "#e26a6a", "#2574a9")
Expand All @@ -13,7 +13,7 @@ score_check <- function(team, players) {
# Ask how many points were scored and by whom
modalDialog(align = "center", easyClose = T, size = "l",
# Header
h2(str_c("Team ", str_to_upper(team), " Scored"), style = paste("color:", team_colour)),
h2(HTML(str_c("Round <span style='font-weight:700'>", round, "</span>", ": ", "<span style='color:", team_colour, "'>", "Team ", str_to_upper(team), " Scored</span>"))),

fluidRow(
column(8,
Expand Down

0 comments on commit 9fb879a

Please sign in to comment.