зеркало из https://github.com/mozilla/shumway.git
Fixes glue for MouseEvent and SimpleButton
This commit is contained in:
Родитель
f5403dc3ae
Коммит
b6ab6d59ea
|
@ -94,6 +94,7 @@
|
|||
<script src="../../src/flash/util.js"></script>
|
||||
<script src="../../src/flash/events/Event.js"></script>
|
||||
<script src="../../src/flash/events/KeyboardEvent.js"></script>
|
||||
<script src="../../src/flash/events/MouseEvent.js"></script>
|
||||
<script src="../../src/flash/events/TimerEvent.js"></script>
|
||||
<script src="../../src/flash/events/EventDispatcher.js"></script>
|
||||
<script src="../../src/flash/net/NetConnection.js"></script>
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
const SimpleButtonDefinition = {
|
||||
__class__: 'flash.display.SimpleButton'
|
||||
};
|
||||
const SimpleButtonDefinition = (function () {
|
||||
var def = {
|
||||
__class__: 'flash.display.SimpleButton',
|
||||
|
||||
initialize: function () {
|
||||
},
|
||||
|
||||
_updateButton: function () {
|
||||
}
|
||||
};
|
||||
|
||||
def.__glue__ = {
|
||||
native: {
|
||||
instance: {
|
||||
_updateButton: def._updateButton
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return def;
|
||||
}).call(this);
|
||||
|
|
|
@ -3,6 +3,7 @@ const SpriteDefinition = (function () {
|
|||
__class__: 'flash.display.Sprite',
|
||||
|
||||
initialize: function () {
|
||||
this._buttonMode = false;
|
||||
var s = this.symbol;
|
||||
if (s) {
|
||||
this._graphics = s.graphics || new flash.display.Graphics;
|
||||
|
@ -16,10 +17,10 @@ const SpriteDefinition = (function () {
|
|||
},
|
||||
|
||||
get buttonMode() {
|
||||
return false;
|
||||
return this._buttonMode;
|
||||
},
|
||||
set buttonMode(val) {
|
||||
notImplemented();
|
||||
this._buttonMode = val;
|
||||
},
|
||||
get graphics() {
|
||||
return this._graphics;
|
||||
|
|
|
@ -31,7 +31,7 @@ const MouseEventDefinition = (function () {
|
|||
ROLL_OUT: 'public ROLL_OUT',
|
||||
ROLL_OVER: 'public ROLL_OVER'
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
native: {
|
||||
instance: {
|
||||
|
|
|
@ -103,6 +103,7 @@ var as3error = {};
|
|||
M("flash.display.Loader", "LoaderClass", LoaderDefinition),
|
||||
M("flash.display.LoaderInfo", "LoaderInfoClass", LoaderInfoDefinition),
|
||||
M("flash.display.Graphics", "GraphicsClass", GraphicsDefinition),
|
||||
M("flash.display.SimpleButton", "SimpleButtonClass", SimpleButtonDefinition),
|
||||
|
||||
M("flash.geom.Point", "PointClass", PointDefinition),
|
||||
M("flash.geom.Rectangle", "RectangleClass", RectangleDefinition),
|
||||
|
@ -113,6 +114,7 @@ var as3error = {};
|
|||
M("flash.events.EventDispatcher", "EventDispatcherClass", EventDispatcherDefinition),
|
||||
M("flash.events.Event", "EventClass", EventDefinition),
|
||||
M("flash.events.KeyboardEvent", "KeyboardEventClass", KeyboardEventDefinition),
|
||||
M("flash.events.MouseEvent", "MouseEventClass", MouseEventDefinition),
|
||||
M("flash.events.TimerEvent", "TimerEventClass", TimerEventDefinition),
|
||||
|
||||
M("flash.ui.Keyboard", "KeyboardClass", KeyboardDefinition),
|
||||
|
|
Загрузка…
Ссылка в новой задаче