Skip to content

Commit

Permalink
Enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBluth committed Mar 11, 2016
1 parent 1085c45 commit 32134e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions static/js/scenarioEditor/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ function Character(id, name) {
this.insight = 0;
this.defense = 0;
this.visible = true;
this.enabled = true;
this.voice = "RANDOM"
this.components = [{
tags: new Tags(),
Expand Down Expand Up @@ -419,6 +420,10 @@ Character.BuildFromData = function (data) {
char.visible = data.visible;
}

if(data.hasOwnProperty("enabled")){
char.enabled = data.enabled;
}

if(data.hasOwnProperty("voice")){
char.voice = data.voice;
}
Expand Down
8 changes: 8 additions & 0 deletions templates/scenarioEditor/charView/charView.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ <h3>{$character.name$}</h3>
<div class="col-sm-4">
<input type="checkbox" ng-model="character.visible"/>
</div>
</div>
<div class="row">
<div class="col-sm-1">
<span>Enabled:</span>
</div>
<div class="col-sm-4">
<input type="checkbox" ng-model="character.enabled"/>
</div>
</div>
<div class="padded-top-bottom-10">
<span>Voice: </span>
Expand Down

0 comments on commit 32134e5

Please sign in to comment.