avm2: Stub TextField.mouseWheelEnabled

This commit is contained in:
nosamu 2023-03-17 09:47:51 -05:00 committed by Nathan Adams
parent b791c402d2
commit 33f585fa6c
2 changed files with 21 additions and 0 deletions

View File

@ -54,6 +54,9 @@ package flash.text {
public native function get maxChars():int;
public native function set maxChars(value:int):void;
public native function get mouseWheelEnabled():Boolean
public native function set mouseWheelEnabled(value:Boolean):void
public native function get multiline():Boolean;
public native function set multiline(value:Boolean):void;

View File

@ -1231,6 +1231,24 @@ pub fn set_max_chars<'gc>(
Ok(Value::Undefined)
}
pub fn get_mouse_wheel_enabled<'gc>(
activation: &mut Activation<'_, 'gc>,
_this: Option<Object<'gc>>,
_args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
avm2_stub_getter!(activation, "flash.text.TextField", "mouseWheelEnabled");
Ok(true.into())
}
pub fn set_mouse_wheel_enabled<'gc>(
activation: &mut Activation<'_, 'gc>,
_this: Option<Object<'gc>>,
_args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
avm2_stub_setter!(activation, "flash.text.TextField", "mouseWheelEnabled");
Ok(Value::Undefined)
}
pub fn get_restrict<'gc>(
activation: &mut Activation<'_, 'gc>,
_this: Option<Object<'gc>>,