This commit is contained in:
MartinSDampier 2025-07-12 17:32:44 -05:00
parent eeb67663d4
commit 154e7dbccb
2 changed files with 33 additions and 10 deletions

View file

@ -259,17 +259,18 @@ export class InitiativeView extends ItemView {
row.ondragenter = (e) => this.onHeroTableRowDragEnter(e, this.heroes.indexOf(creature));
row.id = isHero ? "Hero " + this.heroes.indexOf(creature) : "Villain " + this.villains.indexOf(creature);
let tempTable = row.createEl('table')
let tableCell = row.createEl("td", { attr: {"colspan": 2}})
let tempTable = tableCell.createEl('table', {cls: 'fullScreen trackerRowTableStyle'})
let tempHeader = tempTable.createEl('tr');
tempHeader.createEl('th' , {text: 'Name'});
tempHeader.createEl('th' , {text: 'Stamina'});
tempHeader.createEl('th' , {text: 'Acted'});
tempHeader.createEl('th' , {text: 'FTA'});
tempHeader.createEl('th' , {text: ''});
tempHeader.createEl('th' , {text: 'Name', cls: 'trackerTableCellStyle tenRadiusTopLeft'});
tempHeader.createEl('th' , {text: 'Stamina', cls: 'trackerTableCellStyle'});
tempHeader.createEl('th' , {text: 'Acted', cls: 'trackerTableCellStyle'});
tempHeader.createEl('th' , {text: 'FTA', cls: 'trackerTableCellStyle'});
tempHeader.createEl('th' , {text: '', cls: 'trackerTableCellStyle tenRadiusTopRight'});
let tempRow = tempTable.createEl('tr');
let nameCell = tempRow.createEl('td', {cls: "Centered name-Cell trackerTableCellStyle"});
let nameCell = tempRow.createEl('td', {cls: "Centered name-Cell trackerTableNameCellStyle"});
let nameTable = nameCell.createDiv({cls: "tableStyle"});
let nameRow = nameTable.createDiv({cls: "tableRowStyle"});
@ -318,6 +319,7 @@ export class InitiativeView extends ItemView {
let buttonComp = new ExtraButtonComponent(buttonCell);
buttonComp.extraSettingsEl.setText(No);
buttonComp.extraSettingsEl.addClass("trackerCellButtonStyle");
buttonComp.extraSettingsEl.addClass("trackerCellButtonFullHeight");
buttonComp.onClick( () => {
this.changeTriggeredActionCell(row, buttonComp, buttonComp.extraSettingsEl.getText() == No);
});
@ -345,7 +347,7 @@ export class InitiativeView extends ItemView {
actedButtonComp.extraSettingsEl.addClass("trackerCellButtonStyle");
actedButtonComp.extraSettingsEl.addClass("trackerCellButtonFullHeight");
}
buttonCell = tempRow.createEl('td', {cls: 'trackerTableCellStyle'});
buttonCell = tempRow.createEl('td', {cls: 'trackerTableRemoveCellStyle'});
let removeButton = new ExtraButtonComponent(buttonCell);
removeButton.extraSettingsEl.addClass("trackerCellRemoveButtonStyle");
removeButton.extraSettingsEl.addClass("interactiveColor");

View file

@ -99,6 +99,7 @@
.activatedButton {
color: var(--interactive-accent);
font-weight: bold;
}
.renameButton {
width: 20px;
@ -188,7 +189,18 @@
.trackerTableCellStyle {
border: 1px solid;
border-collapse: collapse;
padding: 5px;
}
.trackerTableNameCellStyle {
border: 1px solid;
border-collapse: collapse;
border-bottom-left-radius: 10px;
padding: 0px 0px 0px 5px;
}
.trackerTableRemoveCellStyle {
border: 1px solid;
border-collapse: collapse;
border-bottom-right-radius: 10px;
padding: 0px 0px 0px 5px;
}
.trackerCellButtonStyle {
color: var(--color-base-00);
@ -196,6 +208,15 @@
font-weight: bolder;
width: 100%;
}
.tenRadiusTopLeft{
border-top-left-radius: 10px;
}
.tenRadiusTopRight{
border-top-right-radius: 10px;
}
.trackerRowTableStyle {
border-spacing: 0px;
}
.trackerCellButtonFullHeight{
height: 55px;
}