refactored byob.js with new Morphic constants

pull/95/head
jmoenig 2020-07-01 18:36:34 +02:00
rodzic 2b739576bb
commit c1dcdc450d
2 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -13,7 +13,7 @@
<script src="src/gui.js?version=2020-06-28"></script> <script src="src/gui.js?version=2020-06-28"></script>
<script src="src/paint.js?version=2020-05-17"></script> <script src="src/paint.js?version=2020-05-17"></script>
<script src="src/lists.js?version=2020-05-18"></script> <script src="src/lists.js?version=2020-05-18"></script>
<script src="src/byob.js?version=2020-06-29"></script> <script src="src/byob.js?version=2020-07-01"></script>
<script src="src/tables.js?version=2020-05-18"></script> <script src="src/tables.js?version=2020-05-18"></script>
<script src="src/sketch.js?version=2020-04-15"></script> <script src="src/sketch.js?version=2020-04-15"></script>
<script src="src/video.js?version=2019-06-27"></script> <script src="src/video.js?version=2019-06-27"></script>

Wyświetl plik

@ -96,7 +96,7 @@
*/ */
/*global modules, CommandBlockMorph, SpriteMorph, TemplateSlotMorph, Map, /*global modules, CommandBlockMorph, SpriteMorph, TemplateSlotMorph, Map,
StringMorph, Color, DialogBoxMorph, ScriptsMorph, ScrollFrameMorph, StringMorph, Color, DialogBoxMorph, ScriptsMorph, ScrollFrameMorph, WHITE,
Point, HandleMorph, HatBlockMorph, BlockMorph, detect, List, Process, Point, HandleMorph, HatBlockMorph, BlockMorph, detect, List, Process,
AlignmentMorph, ToggleMorph, InputFieldMorph, ReporterBlockMorph, AlignmentMorph, ToggleMorph, InputFieldMorph, ReporterBlockMorph,
StringMorph, nop, radians, BoxMorph, ArrowMorph, PushButtonMorph, StringMorph, nop, radians, BoxMorph, ArrowMorph, PushButtonMorph,
@ -108,7 +108,7 @@ BooleanSlotMorph, XML_Serializer, SnapTranslator*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.byob = '2020-June-29'; modules.byob = '2020-July-01';
// Declarations // Declarations
@ -958,7 +958,7 @@ CustomCommandBlockMorph.prototype.labelPart = function (spec) {
} else { } else {
part = new BlockLabelFragmentMorph(spec); part = new BlockLabelFragmentMorph(spec);
part.fontSize = this.fontSize; part.fontSize = this.fontSize;
part.color = new Color(255, 255, 255); part.color = WHITE;
part.isBold = true; part.isBold = true;
part.shadowColor = this.color.darker(this.labelContrast); part.shadowColor = this.color.darker(this.labelContrast);
part.shadowOffset = this.embossing; part.shadowOffset = this.embossing;
@ -1722,7 +1722,7 @@ BlockDialogMorph.prototype.addCategoryButton = function (category) {
button.labelShadowColor = colors[1]; button.labelShadowColor = colors[1];
button.labelColor = IDE_Morph.prototype.buttonLabelColor; button.labelColor = IDE_Morph.prototype.buttonLabelColor;
if (MorphicPreferences.isFlat) { if (MorphicPreferences.isFlat) {
button.labelPressColor = new Color(255, 255, 255); button.labelPressColor = WHITE;
} }
button.contrast = this.buttonContrast; button.contrast = this.buttonContrast;
button.fixLayout(); button.fixLayout();
@ -3315,7 +3315,7 @@ InputSlotDialogMorph.prototype.createSlotTypeButtons = function () {
// default values // default values
defLabel = new StringMorph(localize('Default Value:')); defLabel = new StringMorph(localize('Default Value:'));
defLabel.fontSize = this.slots.radioButtonSingle.fontSize; defLabel.fontSize = this.slots.radioButtonSingle.fontSize;
defLabel.setColor(new Color(255, 255, 255)); defLabel.setColor(WHITE);
defLabel.refresh = () => { defLabel.refresh = () => {
if (this.isExpanded && contains( if (this.isExpanded && contains(
[ [
@ -3386,7 +3386,7 @@ InputSlotDialogMorph.prototype.createSlotTypeButtons = function () {
new SymbolMorph( new SymbolMorph(
'loop', 'loop',
this.fontSize * 0.7, this.fontSize * 0.7,
new Color(255, 255, 255) WHITE
), ),
null // builder method that constructs the element morph null // builder method that constructs the element morph
); );
@ -3481,7 +3481,7 @@ InputSlotDialogMorph.prototype.addSlotTypeButton = function (
button.outlineGradient = this.buttonOutlineGradient; button.outlineGradient = this.buttonOutlineGradient;
button.fixLayout(); button.fixLayout();
button.label.isBold = false; button.label.isBold = false;
button.label.setColor(new Color(255, 255, 255)); button.label.setColor(WHITE);
this.slots.add(button); this.slots.add(button);
return button; return button;
}; };
@ -3507,7 +3507,7 @@ InputSlotDialogMorph.prototype.addSlotArityButton = function (
button.fixLayout(); button.fixLayout();
// button.label.isBold = false; // button.label.isBold = false;
button.label.setColor(new Color(255, 255, 255)); button.label.setColor(WHITE);
this.slots.add(button); this.slots.add(button);
return button; return button;
}; };