Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RLG Maker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Romain DELEAU
RLG Maker
Commits
cdc41d87
Commit
cdc41d87
authored
1 year ago
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Traces on occurences
parent
b223b132
verification
Unity
traces
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
5 deletions
+32
-5
app.component.html
src/app/app.component.html
+1
-1
role-occurence.component.html
...sider-pieces/role-occurence/role-occurence.component.html
+3
-3
role-occurence.component.scss
...sider-pieces/role-occurence/role-occurence.component.scss
+13
-0
role-occurence.component.ts
...p/sider-pieces/role-occurence/role-occurence.component.ts
+15
-1
No files found.
src/app/app.component.html
View file @
cdc41d87
...
...
@@ -119,7 +119,7 @@
<div
class=
"container-sider"
>
<div
class=
"container-sider-title"
>
{{getSiderTitle()}}
</div>
<div
class=
"container-sider-elements"
>
<app-role-occurence
class=
"container-sider-elements-element"
[
role
]="
pieceDetailsService
.
pieceAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsRole()"
></app-role-occurence>
<app-role-occurence
class=
"container-sider-elements-element"
[
role
]="
pieceDetailsService
.
pieceAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsRole()"
[
scenario
]="
scenario
"
></app-role-occurence>
<app-supplementary-task
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
[
role
]="
pieceDetailsService
.
parentAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
></app-supplementary-task>
<app-repeat
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
></app-repeat>
<app-interupt
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
></app-interupt>
...
...
This diff is collapsed.
Click to expand it.
src/app/sider-pieces/role-occurence/role-occurence.component.html
View file @
cdc41d87
...
...
@@ -5,11 +5,11 @@ matTooltipPosition="before" [matTooltipDisabled]="!tooltipService.activatedToolt
<div
class=
"piece-title"
>
Occurrence du rôle
</div>
<div
class=
"piece-form-occurrence"
*
ngFor=
"let occurence of role.occurences, let i = index"
>
<div
class=
"piece-form-occurrence-text"
>
<input
type=
"
text"
[(
ngModel
)]="
occurence
.
iteration
"
/>
<input
type=
"
number"
[(
ngModel
)]="
occurence
.
iteration
"
(
change
)="
editTrace
($
event
,'
Occurrence_
['+
i
+']
_nbRole
')
"
/>
<label>
entre
</label>
<input
type=
"
text"
[(
ngModel
)]="
occurence
.
min
"
/>
<input
type=
"
number"
[(
ngModel
)]="
occurence
.
min
"
(
change
)="
editTrace
($
event
,'
Occurrence_
['+
i
+']
_playersMin
')
"
/>
<label>
et
</label>
<input
type=
"
text"
[(
ngModel
)]="
occurence
.
max
"
/>
<input
type=
"
number"
[(
ngModel
)]="
occurence
.
max
"
(
change
)="
editTrace
($
event
,'
Occurrence_
['+
i
+']
_playersMax
')
"
/>
<label>
joueurs
</label>
</div>
<button
mat-button
(
click
)="
removeOccurrence
(
i
)"
><mat-icon
fontIcon=
"remove"
></mat-icon></button>
...
...
This diff is collapsed.
Click to expand it.
src/app/sider-pieces/role-occurence/role-occurence.component.scss
View file @
cdc41d87
...
...
@@ -27,6 +27,19 @@
margin-right
:
5px
;
}
input
[
type
=
number
]
::-webkit-inner-spin-button
,
input
[
type
=
number
]
::-webkit-outer-spin-button
{
-webkit-appearance
:
none
;
appearance
:
none
;
margin
:
0
;
}
@-moz-document
url-prefix
()
{
input
[
type
=
number
]
{
-moz-appearance
:
textfield
;
}
}
button
{
background-color
:
white
;
border-radius
:
10px
;
...
...
This diff is collapsed.
Click to expand it.
src/app/sider-pieces/role-occurence/role-occurence.component.ts
View file @
cdc41d87
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
RoleOccurrence
}
from
'src/app/class/role-occurrence/role-occurrence'
;
import
{
Role
}
from
'src/app/class/role/role'
;
import
{
Scenario
}
from
'src/app/class/scenario/scenario'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
import
{
PieceDetailsService
}
from
'src/app/services/piece-details/piece-details.service'
;
import
{
TooltipService
}
from
'src/app/services/tooltip/tooltip.service'
;
@
Component
({
...
...
@@ -10,19 +13,30 @@ import { TooltipService } from 'src/app/services/tooltip/tooltip.service';
})
export
class
RoleOccurenceComponent
implements
OnInit
{
@
Input
()
scenario
:
Scenario
=
new
Scenario
();
@
Input
()
role
:
Role
=
new
Role
();
constructor
(
protected
tooltipService
:
TooltipService
)
{
}
constructor
(
protected
tooltipService
:
TooltipService
,
private
pieceDetailsService
:
PieceDetailsService
)
{
}
ngOnInit
():
void
{
}
addOccurrence
():
void
{
this
.
role
.
occurences
.
push
(
new
RoleOccurrence
());
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'new'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
'occurence_['
+
(
this
.
role
.
occurences
.
length
-
1
)
+
']'
,
'Role_['
+
this
.
pieceDetailsService
.
roleIndex
+
']'
,
'#E5C5AC'
));
}
removeOccurrence
(
index
:
number
):
void
{
this
.
role
.
occurences
.
splice
(
index
,
1
);
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'delete'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
'occurence_['
+
(
index
)
+
']'
,
'Role_['
+
this
.
pieceDetailsService
.
roleIndex
+
']'
,
'#E5C5AC'
));
}
editTrace
(
event
:
any
,
source
:
string
):
void
{
if
(
event
.
target
.
value
!=
''
)
{
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'write'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
source
,
'Role_['
+
this
.
pieceDetailsService
.
roleIndex
+
']'
,
'#E5C5AC'
));
}
else
{
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'erase'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
source
,
'Role_['
+
this
.
pieceDetailsService
.
roleIndex
+
']'
,
'#E5C5AC'
));
}
}
}
This diff is collapsed.
Click to expand it.
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