Skip to content

Commit

Permalink
Add training pitches dialog to Smoosic
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDavidNewman committed Sep 26, 2024
1 parent b6e37fb commit 599269a
Show file tree
Hide file tree
Showing 8 changed files with 494 additions and 13 deletions.
6 changes: 4 additions & 2 deletions build/styles/bravura-font-codes.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
}
/* not in file */
.icon-note:before {content: "\2669";}
.icon-grace-note:before {content: "\e562"}
.icon-grace-note-strike:before {content: "\e560"}
.icon-grace-note:before {content: "\e562";}
.icon-grace-note-strike:before {content: "\e560";}

.icon-bracketTop:before {content: "\e003";}
.icon-bracketBottom:before {content: "\e004";}
Expand Down Expand Up @@ -154,6 +154,8 @@
.icon-rest32nd:before {content: "\e4e8";}
.icon-rest64th:before {content: "\e4e9";}
.icon-rest128th:before {content: "\e4ea";}
.icon-ottavaAlta:before { content: "\e511";}
.icon-ottavaBassa:before { content: "\e512";}
.icon-dynamicPiano:before {content: "\e520";}
.icon-dynamicMezzo:before {content: "\e521";}
.icon-dynamicForte:before {content: "\e522";}
Expand Down
6 changes: 6 additions & 0 deletions build/styles/dialogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ button.nav-link {
font-style: italic;
flex: 4 1 220px;
}
.smoControl button.icon-bravura {
position: inherit;
top: inherit;
left: inherit;
pointer-events: inherit;
}
.smoControlContainer .button-array-buttons button.repetext .icon-bravura .button-text {
font-size: 12px;
min-width: 35px;
Expand Down
5 changes: 4 additions & 1 deletion src/application/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ import { buildDom, addFileLink, InputTrapper, draggable, closeDialogPromise, get

import { renderVexTests } from './generateVexTests';
import { SuiDurationAdapter, SuiDurationButtonComponent, SuiDurationDialog } from '../ui/dialogs/durations';
import { SuiPitchAdapter, SuiPitchDialog, SuiLetterButtonComponent, SuiIntervalButtonComponent, SuiTransposeButtonComponent } from '../ui/dialogs/pitch';
const getClass = (jsonString: string) => {
return eval('Smo.' + jsonString);
};
Expand Down Expand Up @@ -212,7 +213,9 @@ export const Smo = {
SuiEndBarButtonComponent, SuiStartBarButtonComponent, SuiRepeatSymbolButtonComponent,
/* SuiLoadActionsDialog, SuiSaveActionsDialog, */
SuiPrintFileDialog, SuiSaveFileDialog, SuiSaveXmlDialog, SuiSaveVexDialog,
SuiSaveMidiDialog, SuiDialogBase,
SuiSaveMidiDialog, SuiDialogBase,
SuiPitchDialog, SuiPitchAdapter,SuiIntervalButtonComponent, SuiLetterButtonComponent,
SuiTransposeButtonComponent,
// Dialog components
SuiTreeComponent,
SuiDropdownComponent,
Expand Down
6 changes: 4 additions & 2 deletions src/styles/bravura-font-codes.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
}
/* not in file */
.icon-note:before {content: "\2669";}
.icon-grace-note:before {content: "\e562"}
.icon-grace-note-strike:before {content: "\e560"}
.icon-grace-note:before {content: "\e562";}
.icon-grace-note-strike:before {content: "\e560";}

.icon-bracketTop:before {content: "\e003";}
.icon-bracketBottom:before {content: "\e004";}
Expand Down Expand Up @@ -154,6 +154,8 @@
.icon-rest32nd:before {content: "\e4e8";}
.icon-rest64th:before {content: "\e4e9";}
.icon-rest128th:before {content: "\e4ea";}
.icon-ottavaAlta:before { content: "\e511";}
.icon-ottavaBassa:before { content: "\e512";}
.icon-dynamicPiano:before {content: "\e520";}
.icon-dynamicMezzo:before {content: "\e521";}
.icon-dynamicForte:before {content: "\e522";}
Expand Down
6 changes: 6 additions & 0 deletions src/styles/dialogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ button.nav-link {
font-style: italic;
flex: 4 1 220px;
}
.smoControl button.icon-bravura {
position: inherit;
top: inherit;
left: inherit;
pointer-events: inherit;
}
.smoControlContainer .button-array-buttons button.repetext .icon-bravura .button-text {
font-size: 12px;
min-width: 35px;
Expand Down
12 changes: 6 additions & 6 deletions src/ui/dialogs/durations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SuiDurationButtonComponent extends SuiComponentParent {
super(dialog, params);
this.growDurationComponent = new SuiButtonComposite(this.dialog,
{
id: this.id + 'addGraceNote',
id: this.id + 'growDuration',
smoName: 'growDuration',
parentControl: this,
icon: 'icon-smo ribbon-button-text icon-duration_grow',
Expand All @@ -27,7 +27,7 @@ export class SuiDurationButtonComponent extends SuiComponentParent {
});
this.lessDurationComponent = new SuiButtonComposite(this.dialog,
{
id: this.id + 'addGraceNote',
id: this.id + 'lessDuration',
smoName: 'lessDuration',
parentControl: this,
icon: 'icon-smo ribbon-button-text icon-duration_less',
Expand All @@ -38,7 +38,7 @@ export class SuiDurationButtonComponent extends SuiComponentParent {
});
this.growDotComponent = new SuiButtonComposite(this.dialog,
{
id: this.id + 'addGraceNote',
id: this.id + 'growDot',
smoName: 'growDot',
parentControl: this,
icon: 'icon-smo ribbon-button-text icon-duration_grow_dot',
Expand All @@ -49,15 +49,15 @@ export class SuiDurationButtonComponent extends SuiComponentParent {
});
this.lessDotComponent = new SuiButtonComposite(this.dialog,
{
id: this.id + 'addGraceNote',
id: this.id + 'lessDot',
smoName: 'lessDot',
parentControl: this,
icon: 'icon-smo ribbon-button-text icon-duration_less_dot',
classes: 'icon collapseParent button-hotkey',
control: 'SuiButtonComponent',
label: 'Remove Dot',
text: '<'
});
});
}
getValue(): string {
if (this.growDurationComponent.changeFlag) {
Expand Down Expand Up @@ -141,7 +141,7 @@ export class SuiDurationDialog extends SuiDialogAdapterBase<SuiDurationAdapter>
[{
smoName: 'durationButtons',
control: 'SuiDurationButtonComponent',
label: 'Note Head'
label: 'Note Duration'
}, {
smoName: 'textMessage',
control: 'SuiReadOnlyTextComponent',
Expand Down
Loading

0 comments on commit 599269a

Please sign in to comment.