Skip to content

Commit

Permalink
◉○をメニュー項目名に使えるように。
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanasu committed Nov 22, 2023
1 parent 52ba72b commit 6632e23
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 31 deletions.
8 changes: 5 additions & 3 deletions src/app/component/chat-input/chat-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ export class ChatInputComponent implements OnInit, OnDestroy {
EventSystem.trigger('UPDATE_INVENTORY', null);
},
default: this.character.currntImageIndex == i,
icon: image
icon: image,
checkBox: 'radio'
};
})
});
Expand Down Expand Up @@ -901,8 +902,8 @@ export class ChatInputComponent implements OnInit, OnDestroy {
},
checkBox: 'check'
}),
{ name: 'オーラ', action: null, subActions: [{ name: `${this.character.aura == -1 ? '◉' : '○'} なし`, action: () => { this.character.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) } }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${this.character.aura == i ? '◉' : '○'} ${color}`, action: () => { this.character.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) } };
{ name: 'オーラ', action: null, subActions: [{ name: `${this.character.aura == -1 ? '◉' : '○'} なし`, action: () => { this.character.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) }, checkBox: 'radio' }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${this.character.aura == i ? '◉' : '○'} ${color}`, action: () => { this.character.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) }, colorSample: true, checkBox: 'radio' };
})) },
ContextMenuSeparator,
{
Expand Down Expand Up @@ -933,6 +934,7 @@ export class ChatInputComponent implements OnInit, OnDestroy {
},
default: this.character.currntIconIndex == i,
icon: faceIconImage,
checkBox: 'radio'
};
}),
disabled: this.character.faceIcons.length <= 1
Expand Down
4 changes: 2 additions & 2 deletions src/app/component/context-menu/context-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<span *ngIf="action.error" title="{{action.error}}">⚠️</span>
<input *ngIf="action.name && action.checkBox == 'check' && action.name.indexOf('☑') == 0" type="checkbox" [disabled]="action.disabled" checked/>
<input *ngIf="action.name && action.checkBox == 'check' && action.name.indexOf('☐') == 0" type="checkbox" [disabled]="action.disabled" />
<input *ngIf="action.name && action.name.indexOf('◉') == 0" type="radio" [disabled]="action.disabled" checked />
<input *ngIf="action.name && action.name.indexOf('○') == 0" type="radio" [disabled]="action.disabled" />
<input *ngIf="action.name && action.checkBox == 'radio' && action.name.indexOf('◉') == 0" type="radio" [disabled]="action.disabled" checked />
<input *ngIf="action.name && action.checkBox == 'radio' && action.name.indexOf('○') == 0" type="radio" [disabled]="action.disabled" />
<span *ngIf="action.name && action.colorSample && action.name.indexOf('ブラック') == 2" class="color-indicator" style="color: #000"></span>
<span *ngIf="action.name && action.colorSample && action.name.indexOf('ブルー') == 2" class="color-indicator" style="color: #00f"></span>
<span *ngIf="action.name && action.colorSample && action.name.indexOf('グリーン') == 2" class="color-indicator" style="color: #0f0"></span>
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/context-menu/context-menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ export class ContextMenuComponent implements OnInit, OnDestroy, AfterViewInit {
if (str == null) return '';
if (checkBox == 'check') str = str.replace(/^[☑☐]/, '');
if (checkBox == 'radio') str = str.replace(/^[◉○]/, '');
return StringUtil.escapeHtml(str.replace('◉', '').replace('○', '')).replace(/💭/g, '<span style="text-shadow: #111 0 0 1px">💭</span>');
return StringUtil.escapeHtml(str).replace(/💭/g, '<span style="text-shadow: #111 0 0 1px">💭</span>');
}
}
6 changes: 4 additions & 2 deletions src/app/component/dice-symbol/dice-symbol.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ export class DiceSymbolComponent implements OnChanges, AfterViewInit, OnDestroy
name: `${this.face == face ? '◉' : '○'} ${face} `, action: () => {
SoundEffect.play(PresetSound.dicePut);
this.face = face;
}
},
checkBox: 'radio'
});
});
subActions.push(ContextMenuSeparator);
Expand All @@ -457,7 +458,8 @@ export class DiceSymbolComponent implements OnChanges, AfterViewInit, OnDestroy
if (this.owner === '') SoundEffect.play(PresetSound.dicePut);
if (this.owner === '' && this.face != face) this.chatMessageService.sendOperationLog(`${this.diceSymbol.name == '' ? '(無名の' + (this.isCoin ? 'コイン' : 'ダイス') + ')' : this.diceSymbol.name}${this.isCoin ? '表/裏' : '目'}を変更 → ${face}`);
this.face = face;
}
},
checkBox: 'radio'
});
});
actions.push({ name: this.isCoin ? '表/裏' : 'ダイス目', action: null, subActions: subActions });
Expand Down
7 changes: 4 additions & 3 deletions src/app/component/game-character/game-character.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,8 @@ export class GameCharacterComponent implements OnChanges, AfterViewInit, OnDestr
name: `${this.gameCharacter.currntImageIndex == i ? '◉' : '○'}`,
action: () => { this.changeImage(i); },
default: this.gameCharacter.currntImageIndex == i,
icon: image
icon: image,
checkBox: 'radio'
};
})
}),
Expand Down Expand Up @@ -734,8 +735,8 @@ export class GameCharacterComponent implements OnChanges, AfterViewInit, OnDestr
},
checkBox: 'check'
}),
{ name: 'オーラ', action: null, subActions: [{ name: `${this.aura == -1 ? '◉' : '○'} なし`, action: () => { this.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) } }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${this.aura == i ? '◉' : '○'} ${color}`, colorSample: true, action: () => { this.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) } };
{ name: 'オーラ', action: null, subActions: [{ name: `${this.aura == -1 ? '◉' : '○'} なし`, action: () => { this.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) }, checkBox: 'radio' }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${this.aura == i ? '◉' : '○'} ${color}`, colorSample: true, action: () => { this.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) }, checkBox: 'radio' };
})) },
ContextMenuSeparator,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ export class GameObjectInventoryComponent implements OnInit, OnDestroy {
EventSystem.trigger('UPDATE_INVENTORY', null);
},
default: gameObject.currntImageIndex == i,
icon: image
icon: image,
checkBox: 'radio'
};
}),
});
Expand Down Expand Up @@ -402,8 +403,8 @@ export class GameObjectInventoryComponent implements OnInit, OnDestroy {
},
checkBox: 'check'
}),
{ name: 'オーラ', action: null, subActions: [ { name: `${gameObject.aura == -1 ? '◉' : '○'} なし`, action: () => { gameObject.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) } }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${gameObject.aura == i ? '◉' : '○'} ${color}`, action: () => { gameObject.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) } };
{ name: 'オーラ', action: null, subActions: [ { name: `${gameObject.aura == -1 ? '◉' : '○'} なし`, action: () => { gameObject.aura = -1; EventSystem.trigger('UPDATE_INVENTORY', null) }, checkBox: 'radio' }, ContextMenuSeparator].concat(['ブラック', 'ブルー', 'グリーン', 'シアン', 'レッド', 'マゼンタ', 'イエロー', 'ホワイト'].map((color, i) => {
return { name: `${gameObject.aura == i ? '◉' : '○'} ${color}`, action: () => { gameObject.aura = i; EventSystem.trigger('UPDATE_INVENTORY', null) }, checkBox: 'radio' };
})) },
ContextMenuSeparator,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,9 @@ export class GameTableMaskComponent implements OnChanges, OnDestroy, AfterViewIn
{
name: '画像と色の表示',
subActions: [
{ name: `${this.blendType == 0 ? '◉' : '○'} 画像のみ`, action: () => { this.blendType = 0; SoundEffect.play(PresetSound.cardDraw) } },
{ name: `${this.blendType == 1 ? '◉' : '○'} 背景色と重ねる`, action: () => { this.blendType = 1; SoundEffect.play(PresetSound.cardDraw) } },
{ name: `${this.blendType == 2 ? '◉' : '○'} 背景色と混ぜる`, action: () => { this.blendType = 2; SoundEffect.play(PresetSound.cardDraw) } },
{ name: `${this.blendType == 0 ? '◉' : '○'} 画像のみ`, action: () => { this.blendType = 0; SoundEffect.play(PresetSound.cardDraw) }, checkBox: 'radio' },
{ name: `${this.blendType == 1 ? '◉' : '○'} 背景色と重ねる`, action: () => { this.blendType = 1; SoundEffect.play(PresetSound.cardDraw) }, checkBox: 'radio' },
{ name: `${this.blendType == 2 ? '◉' : '○'} 背景色と混ぜる`, action: () => { this.blendType = 2; SoundEffect.play(PresetSound.cardDraw) }, checkBox: 'radio' },
ContextMenuSeparator,
{ name: '色の初期化', action: () => { this.color = '#555555'; this.bgcolor = '#0a0a0a'; SoundEffect.play(PresetSound.cardDraw) } }
],
Expand Down
13 changes: 7 additions & 6 deletions src/app/component/range/range.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,12 @@ export class RangeComponent implements OnChanges, OnDestroy, AfterViewInit {
{
name: '影響グリッドの判定方法', action: null,
subActions: [
{ name: `${this.range.fillType == 0 ? '◉' : '○'} 判定なし (輪郭内を塗りつぶす)`, action: () => { this.range.fillType = 0; } },
{ name: `${this.range.fillType == 0 ? '◉' : '○'} 判定なし (輪郭内を塗りつぶす)`, action: () => { this.range.fillType = 0; }, checkBox: 'radio' },
ContextMenuSeparator,
{ name: `${this.range.fillType == 1 ? '◉' : '○'} グリッドの中心を覆う`, action: () => { this.range.fillType = 1; } },
{ name: `${this.range.fillType == 2 ? '◉' : '○'} グリッドの一部でも覆う`, action: () => { this.range.fillType = 2; } },
{ name: `${this.range.fillType == 3 ? '◉' : '○'} グリッドの半分以上を覆う`, action: () => { this.range.fillType = 3; } },
{ name: `${this.range.fillType == 4 ? '◉' : '○'} グリッド全体を覆う`, action: () => { this.range.fillType = 4; } },
{ name: `${this.range.fillType == 1 ? '◉' : '○'} グリッドの中心を覆う`, action: () => { this.range.fillType = 1; }, checkBox: 'radio' },
{ name: `${this.range.fillType == 2 ? '◉' : '○'} グリッドの一部でも覆う`, action: () => { this.range.fillType = 2; }, checkBox: 'radio' },
{ name: `${this.range.fillType == 3 ? '◉' : '○'} グリッドの半分以上を覆う`, action: () => { this.range.fillType = 3; }, checkBox: 'radio' },
{ name: `${this.range.fillType == 4 ? '◉' : '○'} グリッド全体を覆う`, action: () => { this.range.fillType = 4; }, checkBox: 'radio' },
]
}
);
Expand All @@ -565,7 +565,8 @@ export class RangeComponent implements OnChanges, OnDestroy, AfterViewInit {
//this.setRange();
});
SoundEffect.play(PresetSound.lock);
}
},
checkBox: 'radio'
};
});
//if (this.followingCharactor) {
Expand Down
24 changes: 16 additions & 8 deletions src/app/component/terrain/terrain.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,42 +319,49 @@ export class TerrainComponent implements OnChanges, OnDestroy, AfterViewInit {
{
name: `${ this.slopeDirection == SlopeDirection.NONE ? '◉' : '○' } なし`, action: () => {
this.slopeDirection = SlopeDirection.NONE;
}
},
checkBox: 'radio'
},
ContextMenuSeparator,
{
name: `${ this.slopeDirection == SlopeDirection.TOP ? '◉' : '○' } 上(北)`, action: () => {
this.slopeDirection = SlopeDirection.TOP;
}
},
checkBox: 'radio'
},
{
name: `${ this.slopeDirection == SlopeDirection.BOTTOM ? '◉' : '○' } 下(南)`, action: () => {
this.slopeDirection = SlopeDirection.BOTTOM;
}
},
checkBox: 'radio'
},
{
name: `${ this.slopeDirection == SlopeDirection.LEFT ? '◉' : '○' } 左(西)`, action: () => {
this.slopeDirection = SlopeDirection.LEFT;
}
},
checkBox: 'radio'
},
{
name: `${ this.slopeDirection == SlopeDirection.RIGHT ? '◉' : '○' } 右(東)`, action: () => {
this.slopeDirection = SlopeDirection.RIGHT;
}
},
checkBox: 'radio'
}
]},
{ name: '壁の表示', action: null, subActions: [
{
name: `${ this.hasWall && this.isSurfaceShading ? '◉' : '○' } 通常`, action: () => {
this.mode = TerrainViewState.ALL;
this.isSurfaceShading = true;
}
},
checkBox: 'radio'
},
{
name: `${ this.hasWall && !this.isSurfaceShading ? '◉' : '○' } 陰影なし`, action: () => {
this.mode = TerrainViewState.ALL;
this.isSurfaceShading = false;
}
},
checkBox: 'radio'
},
{
name: `${ !this.hasWall ? '◉' : '○' } 非表示`, action: () => {
Expand All @@ -363,7 +370,8 @@ export class TerrainComponent implements OnChanges, OnDestroy, AfterViewInit {
this.terrain.width = this.width <= 0 ? 1 : this.width;
this.terrain.depth = this.depth <= 0 ? 1 : this.depth;
}
}
},
checkBox: 'radio'
},
]},
ContextMenuSeparator,
Expand Down

0 comments on commit 6632e23

Please sign in to comment.