Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mathieu Féry
mobile21
Commits
09ba9189
Commit
09ba9189
authored
Dec 12, 2020
by
Mathilde BALLOUHEY
Browse files
Ajout HP et langages
parent
129765a7
Pipeline
#23373
failed with stages
in 2 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/fr/iutnantes/miar/dndgenerator/DisplayResultActivity.java
View file @
09ba9189
...
...
@@ -30,7 +30,7 @@ public class DisplayResultActivity extends AppCompatActivity {
lbl_displayResult_personality
,
lbl_displayResult_skills
,
lbl_displayResult_spells
,
lbl_displayResult_saves
,
lbl_displayResult_str
,
lbl_displayResult_dex
,
lbl_displayResult_int
,
lbl_displayResult_con
,
lbl_displayResult_wis
,
lbl_displayResult_cha
,
lbl_displayResult_equipements
;
lbl_displayResult_cha
,
lbl_displayResult_equipements
,
lbl_displayResult_hp
,
lbl_displayResult_languages
;
private
ImageView
img_displayResult_gif
;
private
FloatingActionButton
btn_displayResult_favourite
;
...
...
@@ -55,6 +55,8 @@ public class DisplayResultActivity extends AppCompatActivity {
lbl_displayResult_equipements
=
findViewById
(
R
.
id
.
lbl_displayResult_equipements
);
img_displayResult_gif
=
findViewById
(
R
.
id
.
img_displayResult_gif
);
btn_displayResult_favourite
=
findViewById
(
R
.
id
.
btn_displayResult_favourite
);
lbl_displayResult_hp
=
findViewById
(
R
.
id
.
lbl_displayResult_hp
);
lbl_displayResult_languages
=
findViewById
(
R
.
id
.
lbl_displayResult_languages
);
Intent
v_getIntent
=
getIntent
();
...
...
@@ -82,6 +84,25 @@ public class DisplayResultActivity extends AppCompatActivity {
v_equipement
=
"There is no such a thing as equipments in this sheet."
;
}
String
v_languages
;
if
(!
m_sheet
.
languages
.
isEmpty
())
{
v_languages
=
m_sheet
.
languages
.
get
(
0
);
for
(
int
v_compt
=
1
;
v_compt
<
m_sheet
.
languages
.
size
();
v_compt
++)
{
v_languages
+=
String
.
format
(
"\n%s"
,
m_sheet
.
languages
.
get
(
v_compt
));
}
}
else
{
v_languages
=
"The language.s known is.are not referenced in this sheet."
;
}
String
v_hp
;
if
(
m_sheet
.
hp
!=
null
)
{
v_hp
=
String
.
format
(
"HP : %d"
,
m_sheet
.
hp
);
}
else
{
v_hp
=
"No HP"
;
}
lbl_displayResult_class
.
setText
(
m_sheet
.
caracterClass
.
toString
());
lbl_displayResult_description
.
setText
(
m_sheet
.
appearance
);
lbl_displayResult_system
.
setText
(
m_sheet
.
system
.
longName
);
...
...
@@ -96,6 +117,8 @@ public class DisplayResultActivity extends AppCompatActivity {
lbl_displayResult_cha
.
setText
(
m_sheet
.
attr
.
get
(
"cha"
).
toString
());
lbl_displayResult_saves
.
setText
(
m_sheet
.
saves
.
toString
());
lbl_displayResult_equipements
.
setText
(
v_equipement
);
lbl_displayResult_hp
.
setText
(
v_hp
);
lbl_displayResult_languages
.
setText
(
v_languages
);
setFavouriteBtn
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment