-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
251 lines (243 loc) · 8.18 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# Load libraries
library("shiny")
library("shinythemes")
# Load data frame
df <- read.csv("data/lgnd_info.csv", stringsAsFactors = FALSE)
# First page
first_page <- tabPanel(
"Spawn time calculator",
sidebarLayout(
sidebarPanel(
width = 4,
h2(span("Time until next legend spawn"), style = "color: grey"),
div(style = "display: inline-block;vertical-align:top; width: 100px;",
numericInput(
inputId = "min",
label = h4("Minute:"),
value = 0
)),
div(style = "display: inline-block;vertical-align:top; width: 5px;"),
div(style = "display: inline-block;vertical-align:top; width: 100px;",
numericInput(
inputId = "sec",
label = h4("Second:"),
value = 0
)),
h2(span("Current Minecraft time"), style = "color: grey"),
div(style = "display: inline-block;vertical-align:top; width: 100px;",
numericInput(
inputId = "mc_hr",
label = h4("Hour(0-23):"),
value = 0
)),
div(style = "display: inline-block;vertical-align:top; width: 5px;"),
div(style = "display: inline-block;vertical-align:top; width: 100px;",
numericInput(
inputId = "mc_min",
label = h4("Minute:"),
value = 0
)
)),
mainPanel(
width = 7,
tabsetPanel(type = "tabs",
tabPanel("Next Spawn Info",
width = 7,
span(h2("The next spawn time is:"),
style = "color: grey"),
h2(span(textOutput("result"),
style = "color: #C8C8C8")),
p(""),
span(h2("Possible legendary spawn:"),
style = "color:grey"),
p(""),
tableOutput("table3"),
p(""),
span(p("Disclaimer: The calculated spawn time should
only be used as a reference, calculations might not
be accurate due to time conversions from IRL to
Minecraft"), style = "color:grey"),
p("")
),
tabPanel("How to use",
tags$img(
src = "1.png",
width = "100%"
),
tags$img(
src = "2.png",
width = "100%"
)
)
)
)
)
)
# Second page
second_page <- tabPanel(
"Conditions",
sidebarLayout(
sidebarPanel(
width = 4,
selectInput("time", "Select a spawn time",
choices = c("No time selected", unique(df$Time)),
selected = "No time selected"),
selectInput("biome", "Select a spawn biome",
choices = ""
)
),
mainPanel(
width = 7,
tableOutput("table1")
)
)
)
# Third page
third_page <- tabPanel(
"Name",
sidebarLayout(
sidebarPanel(
width = 4,
selectInput("name", "Select a Pokemon name",
choices = c("No name selected", unique(df$Pokemon)),
selected = "No name selected"),
p(""),
tags$img(
src = "sunglass.jpg",
width = "100%"
)
),
mainPanel(
width = 7,
tableOutput("table2")
)
)
)
# Combine 2nd and 3rd page together
combined_page <- tabPanel(
"Search legend spawns",
tabsetPanel(second_page, third_page)
)
# How to
about <- tabPanel(
"About",
sidebarLayout(
sidebarPanel(
width = 3,
h3("Mod needed"),
span(p("You only need one of them"), style = "color:grey"),
p(""),
strong("Journey Map"),
p(""),
actionButton(inputId = "ab2",
label = "Download",
class = "btn-primary",
onclick = "window.open('https://bit.ly/384GMSx', '_blank')"),
p(""),
span(strong("OR"), style = "color: grey"),
p(""),
strong("Time HUD"),
p(""),
actionButton(inputId = "ab2",
label = "Download",
class = "btn-primary",
onclick = "window.open('https://bit.ly/3i625aO', '_blank')"),
),
mainPanel(
width = 7,
h2("How to set up the mods"),
tabsetPanel(type = "tabs",
tabPanel("Journey Map",
h3("To set up your Journey Map mod:"),
p("Make sure you have",
strong("Game Time Real"), "as one of the options
for your map, and use that time to calculate next
legend spawn."),
p(""),
tags$img(
src = "jmap.png",
width = "100%"
),
p(""),
tags$img(
src = "jmap1.png",
width = "100%"
),
p(""),
tags$img(
src = "jmap2.png",
width = "100%"),
p("")
),
tabPanel("Time HUD",
h3("To set up your Time HUD mod:"),
p("Make sure your Time HUD format is on",
strong("24 hour interval"), "if it isn't go to mod
config in settings to change it."),
p(""),
tags$img(
src = "timehud.png",
width = "100%"
),
p(""),
tags$img(
src = "timehud2.png",
width = "100%"
),
p(""),
tags$img(
src = "timehud3.png",
width = "100%"
),
p(""),
tags$img(
src = "timehud4.png",
width = "100%"
),
p(""),
tags$img(
src = "timehud5.png",
width = "100%"),
p("")
),
tabPanel("More informations",
h3("Time conversion table:"),
tableOutput("table4"),
h3("Some useful links:"),
p("You can get more informations about legend spawns
from the",
tags$a(href = "https://pixelmonmod.com/wiki/",
"Pixelmon Wiki"), "website."),
tags$a(href = "https://bit.ly/38fA8J6",
"Legendary Pokemon"),
p(""),
tags$a(href = "https://bit.ly/2BtKQ2J",
"Pixelmon spawn times")
)
),
p(""),
h3("This website is made by"),
p(strong("Discord"), ":", "Hackel#1337"),
p(""),
span(h6("Legendary table updated on 07/01/2020"), style = "color:grey")
)
)
)
# Define ui
ui <- tagList(
navbarPage(
windowTitle = "Pixelmon Tools",
theme = shinytheme("slate"),
div(tags$img(src = "icon.png",
style =
"margin-top: -9px; padding-right:0px;padding-bottom:20px",
height = 60)),
first_page,
combined_page,
about
),
titlePanel(
title = tags$head(tags$link(rel = "icon",
href = "icon.ico"))
)
)