@@ -12,12 +12,14 @@ use crate::display_object::interactive::{
12
12
use crate :: display_object:: { DisplayObjectBase , DisplayObjectPtr } ;
13
13
use crate :: events:: { ClipEvent , ClipEventResult } ;
14
14
use crate :: prelude:: * ;
15
+ use crate :: string:: AvmString ;
15
16
use crate :: tag_utils:: { SwfMovie , SwfSlice } ;
16
17
use crate :: vminterface:: Instantiator ;
17
18
use core:: fmt;
18
19
use gc_arena:: barrier:: unlock;
19
20
use gc_arena:: lock:: { Lock , RefLock } ;
20
21
use gc_arena:: { Collect , Gc , Mutation } ;
22
+ use ruffle_macros:: istr;
21
23
use ruffle_render:: filters:: Filter ;
22
24
use std:: cell:: { Cell , Ref , RefCell , RefMut } ;
23
25
use std:: collections:: BTreeMap ;
@@ -207,9 +209,9 @@ impl<'gc> Avm1Button<'gc> {
207
209
208
210
fn get_boolean_property (
209
211
self ,
210
- context : & mut UpdateContext < ' gc > ,
211
- name : & ' static str ,
212
+ name : AvmString < ' gc > ,
212
213
default : bool ,
214
+ context : & mut UpdateContext < ' gc > ,
213
215
) -> bool {
214
216
if let Value :: Object ( object) = self . object ( ) {
215
217
let mut activation = Activation :: from_nothing (
@@ -231,11 +233,11 @@ impl<'gc> Avm1Button<'gc> {
231
233
}
232
234
233
235
fn enabled ( self , context : & mut UpdateContext < ' gc > ) -> bool {
234
- self . get_boolean_property ( context, "enabled" , true )
236
+ self . get_boolean_property ( istr ! ( context, "enabled" ) , true , context )
235
237
}
236
238
237
239
fn use_hand_cursor ( self , context : & mut UpdateContext < ' gc > ) -> bool {
238
- self . get_boolean_property ( context, "useHandCursor" , true )
240
+ self . get_boolean_property ( istr ! ( context, "useHandCursor" ) , true , context )
239
241
}
240
242
}
241
243
0 commit comments