added "settings" button to input slot dialog

pull/95/head
jmoenig 2020-10-07 08:49:14 +02:00
rodzic 5115f4e7fd
commit c89578450b
3 zmienionych plików z 27 dodań i 3 usunięć

Wyświetl plik

@ -6,6 +6,7 @@
* specifying alpha values is now optional for generating pixels in bitmaps (costumes), none means the pixel is solid
* new "add comment" option in the block context menu, thanks, Rob Fidler!
* attribute selection in the SET block are now prefixed with "my"
* new "settings" button in the input slot dialog
* assume stage dimensions for "SWITCH TO COSTUME" with list if current costume dimensions don't fit
* added "bar / lines" option for plotting charts in the "frequency distribution analysis" library
* new "48 kHz" option in the "sampling rate" dropdown
@ -17,6 +18,9 @@
* Greek, thanks, HM100!
* German
### 2020-10-07
* byob: added "settings" button to input slot dialog
### 2020-10-06
* blocks: disable blurred shadows inside input slots if the hidden "blurred shadows" setting is turned off
* widgets: honor (hidden) blurred shadows setting for input widgets

Wyświetl plik

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

Wyświetl plik

@ -107,7 +107,7 @@ WatcherMorph, Variable, BooleanSlotMorph, XML_Serializer, SnapTranslator*/
// Global stuff ////////////////////////////////////////////////////////
modules.byob = '2020-October-06';
modules.byob = '2020-October-07';
// Declarations
@ -3323,7 +3323,7 @@ InputSlotDialogMorph.prototype.deleteFragment = function () {
InputSlotDialogMorph.prototype.createSlotTypeButtons = function () {
// populate my 'slots' area with radio buttons, labels and input fields
var defLabel, defInput, defSwitch, loopArrow;
var defLabel, defInput, defSwitch, loopArrow, settingsButton;
// slot types
this.addSlotTypeButton('Object', '%obj');
@ -3447,6 +3447,19 @@ InputSlotDialogMorph.prototype.createSlotTypeButtons = function () {
};
this.slots.loopArrow = loopArrow;
this.slots.add(loopArrow);
// settings button
settingsButton = new PushButtonMorph(
this.slots,
() => this.slots.userMenu().popUpAtHand(this.world()),
new SymbolMorph('gears', this.fontSize * 1.2)
);
settingsButton.padding = 0;
settingsButton.fixLayout();
settingsButton.refresh = nop;
this.slots.settingsButton = settingsButton;
this.slots.add(settingsButton);
};
InputSlotDialogMorph.prototype.setSlotType = function (type) {
@ -3629,6 +3642,13 @@ InputSlotDialogMorph.prototype.fixSlotsLayout = function () {
// loop arrow
this.slots.loopArrow.setPosition(this.slots.defaultInputLabel.position());
this.slots.settingsButton.setPosition(
this.slots.bottomRight().subtract(
this.slots.settingsButton.extent().add(
this.padding + this.slots.border
)
)
);
this.slots.changed();
};