This repository was archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.kv
More file actions
361 lines (315 loc) · 12.3 KB
/
layout.kv
File metadata and controls
361 lines (315 loc) · 12.3 KB
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
#:kivy 2.1.0
#:import hex kivy.utils.get_color_from_hex
#:import url webbrowser.open
#:import recape recape_api
#:import installer installer
<PopupBox>:
pop_up_text: _pop_up_text
dismiss_button: _dismiss_button
size_hint: .8, .8
auto_dismiss: False
title: "Something's Up"
GridLayout:
cols: 1
AutoLabel:
id: _pop_up_text
text: 'There should be a message here. Well, crap.'
Spacer:
AutoButton:
id: _dismiss_button
text: 'Okay'
visible: True
disabled: not self.visible
on_release: app.pop_up.dismiss()
<HomeLink@Button>:
size_hint: [None, None]
size: [150, 50]
<AccountField@TextInput>:
size_hint: [1, None]
size: [0, 30]
<AccountButton@AutoButton>:
size_hint: [1, None]
size: [0, 50]
<AccountLoginType@GridLayout>:
cols: 1
padding: [20, 20, 20, 20]
size_hint_y: None
height: self.minimum_height
<InfoLabel@AutoLabel>:
font_size: 20
<TextInput>:
cursor_color: hex("#000000")
<AutoLabel@Label>:
size_hint_x:40
text_size: self.width, None
size_hint_y: None
height: self.texture_size[1] + 10
<AutoCheckBox@CheckBox>:
size_hint_x:10
text_size: self.width, None
size_hint_y: None
<AutoButton@Button>:
size_hint_x:40
size_hint_y: None
height: self.texture_size[1] + 10
<AutoImage@Image>:
size_hint_x:40
size_hint_y:40
height: self.texture_size[1] + 10
<Spacer@Label>:
<Cape@GridLayout>:
cols: 1
text: "?"
source: "assets/background.png"
type: "none"
#width: 100
#size_hint: (None, 0.4)
size_hint: (None, None)
size: (200, 250)
canvas:
Color:
rgba: hex("#222222")
RoundedRectangle:
pos: self.pos
size: self.size
radius: [(10,10), (10,10), (10,10), (10,10)]
AutoImage:
source: self.parent.source
AutoLabel:
text: self.parent.text
halign: "justify"
font_size: 20
size_hint: (1, None)
AutoButton:
text: "Set"
on_release: app.run_with_popup(recape.API.set_cape, "Changing your cape...", [self.parent.text, self.parent.type if self.parent.type != "cape" else self.parent.source], True)
<Model@GridLayout>:
name: "model"
cols: 1
text: "?"
activated: False
size_hint: (None, None)
size: (200, 175)
canvas:
Color:
rgba: hex("#222222")
RoundedRectangle:
pos: self.pos
size: self.size
radius: [(10,10), (10,10), (10,10), (10,10)]
Label:
text: self.parent.text[0]
font_size: 120
halign: "justify"
size_hint: (1, None)
AutoLabel:
text: self.parent.text
halign: "justify"
font_size: 20
size_hint: (1, None)
AutoCheckBox:
name: "model_checkbox"
text: self.parent.text
size: 30, 30
active: self.parent.activated
<LoadDialog>:
filters: []
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
FileChooserListView:
id: filechooser
filters: self.parent.parent.filters
BoxLayout:
size_hint_y: None
height: 30
Button:
text: "Cancel"
on_release: root.cancel()
Button:
text: "Load"
on_release: root.load(filechooser.path, filechooser.selection)
TabbedPanel:
do_default_tab: False
background_color: [0, 0, 0, 0]
canvas.before:
Color:
rgba: hex("#1A1C1E")
Rectangle:
pos: self.pos
size: self.size
TabbedPanelItem:
text: "Welcome"
AnchorLayout:
anchor_x: "left"
anchor_y: "center"
Image:
source: "assets/background.png"
allow_strech: True
BoxLayout:
size_hint: [1, None]
orientation: "vertical"
HomeLink:
text: "Join the Discord"
on_release: url("https://discord.com/invite/HNUhexqusj")
HomeLink:
text: "Join the Subreddit"
on_release: url("https://www.reddit.com/r/ReCape/")
HomeLink:
text: "View the Source"
on_release: url("https://github.com/ReCape")
TabbedPanelItem:
id: log_in_tab
text: "Log In"
ScrollView:
do_scroll_x: False
do_scroll_y: True
GridLayout:
padding: [20, 20, 20, 20]
cols: 1
rows: 4
size_hint_y: None
height: self.minimum_height
InfoLabel:
text: "You're not logged in yet! You can login with Microsoft by providing your Microsoft email and password. Otherwise, you can connect to our Minecraft server and receive a code to verify your account ownership."
AccountField:
id: mc_username
multiline: False
hint_text: "Your Minecraft In Game Username"
AccountLoginType:
InfoLabel:
text: "Use the Microsoft account details that are associated with the Minecraft Java Edition account you want to use ReCape with."
AccountField:
id: ms_email
multiline: False
hint_text: "Your Microsoft Account Email Address"
AccountField:
id: ms_password
multiline: False
password: True
hint_text: "Your Microsoft Account Password"
AccountButton:
text: "Login with Microsoft"
on_release: app.run_with_popup(recape.API.attempt_login_ms, "Authenticating with Microsoft...", [root.ids.mc_username.text, root.ids.ms_email.text, root.ids.ms_password.text], True)
AccountLoginType:
InfoLabel:
text: "Or, connect to recape-server.boyne.dev in Minecraft Java Edition using the account you want to use with ReCape and type the code you receive here."
AccountField:
id: rc_code
multiline: False
hint_text: "Your Special Code"
AccountButton:
text: "Login with Code"
on_release: app.run_with_popup(recape.API.attempt_login_code, "Authenticating with server code...", [root.ids.mc_username.text, root.ids.rc_code.text], True)
TabbedPanelItem:
text: "Install"
ScrollView:
do_scroll_x: False
do_scroll_y: True
GridLayout:
padding: [20, 20, 20, 20]
cols: 1
InfoLabel:
text: "To install ReCape, we edit a file on your computer known as the hosts file. This file lets us redirect OptiFine's servers to ours, so we can provide custom capes and 3D models."
Spacer:
AutoButton:
text: "Install"
on_release: app.run_with_popup(installer.install, "Installing...", [], True)
AutoButton:
text: "Uninstall"
on_release: app.run_with_popup(installer.uninstall, "Uninstalling...", [], True)
TabbedPanelItem:
id: cape_tab
text: "Cape"
BoxLayout:
orientation: "vertical"
ScrollView:
size_hint: (1, 1)
do_scroll_x: False
do_scroll_y: True
StackLayout:
id: capes
size_hint_y: None
height: self.minimum_height
padding: [10, 10, 10, 10]
spacing: [10, 10]
TabbedPanelItem:
id: model_tab
text: "Models"
BoxLayout:
orientation: "vertical"
ScrollView:
size_hint: (1, 1)
do_scroll_x: False
do_scroll_y: True
StackLayout:
id: models
size_hint_y: None
height: self.minimum_height
padding: [10, 10, 10, 10]
spacing: [10, 10]
TabbedPanelItem:
text: "Help"
ScrollView:
do_scroll_x: False
do_scroll_y: True
size_hint_y: 1
GridLayout:
padding: [20, 20, 20, 20]
cols: 1
size_hint_y: None
height: self.minimum_height
InfoLabel:
text: "Help"
AutoLabel:
text: "What is this?"
font_size: 20
AutoLabel:
text: "ReCape is a service that allows you to obtain free capes and custom 3D models on any Minecraft client that includes OptiFine."
AutoLabel:
text: "What do you mean by 3D models?"
font_size: 20
AutoLabel:
text: "They're custom objects that you can attach to any part of your player's body. They can be like a hat, an armband, an ankle monitor, or anything else you can think of that can be attached to you."
AutoLabel:
text: "What do you mean by cape?"
font_size: 20
AutoLabel:
text: "A cape is like a banner that hangs off of your shoulders. They can have custom textures, which is what ReCape allows you to modify. As a side effect, you can modify Elytra textures as well!"
AutoLabel:
text: "How does this work?"
font_size: 20
AutoLabel:
text: "There's a file on nearly all computers known as a hosts file. This file contains a list of IP addresses and URLs that map to each other. In layman's terms, it lets you change a website's URL to another website's URL. We utilize this by changing OptiFine's servers (s.optifine.net) to redirect to our server's IP address (where it is on the internet). Then, we host your custom capes so that when OptiFine fetches your cape, it will instead get the cape you uploaded. OptiFine also supports hosting 3D models, so we do that too."
AutoLabel:
text: "Why do you need Administrator access in order to install?"
font_size: 20
AutoLabel:
text: "The aforementioned hosts file is protected because malicious programs would be able to cut off your access to the internet using it. ReCape needs to edit this file in order to redirect OptiFine's servers, and it needs administrator access to do so."
AutoLabel:
text: "Can everybody see my custom capes and models?"
font_size: 20
AutoLabel:
text: "Due to how ReCape works, other players can only see you cape if they both have ReCape installed themselves and are using OptiFine or anb OptiFine-integrated client."
AutoLabel:
text: "How much does this cost?"
font_size: 20
AutoLabel:
text: "ReCape is completely free, and it will stay that way forever. If you appreciate the ReCape project, you will be able to donate as soon as we get that set up."
TabbedPanelItem:
text: "About"
ScrollView:
do_scroll_x: False
do_scroll_y: True
GridLayout:
padding: [20, 20, 20, 20]
cols: 1
InfoLabel:
text: "ReCape Desktop Client v1.1 by DedFishy"
AutoLabel:
text: "It's gonna be alright\nIt's gonna be just fine\nIf anybody wondering how I know\nIt's written in the sky."
Spacer:
AutoButton:
text: "Delete credentials (logs you out)"
on_release: app.run_with_popup(recape.API.delete_credentials, "Deleting your login credentials (if they exist)...", [], True)