A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ruffle-rs/ruffle/commit/709561a25557520b5c537aad32e6b78512127cdb below:

Use ? on set_text_color so errors are raised · ruffle-rs/ruffle@709561a · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+7

-8

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+7

-8

lines changed Original file line number Diff line number Diff line change

@@ -322,14 +322,13 @@ pub fn set_text_color<'gc>(

322 322

activation: &mut Activation<'_, 'gc, '_>,

323 323

value: Value<'gc>,

324 324

) -> Result<(), Error<'gc>> {

325 -

if let Ok(rgb) = value.coerce_to_u32(activation) {

326 -

let tf = TextFormat {

327 -

color: Some(swf::Color::from_rgb(rgb, 0xFF)),

328 -

..TextFormat::default()

329 -

};

330 -

this.set_text_format(0, this.text_length(), tf.clone(), &mut activation.context);

331 -

this.set_new_text_format(tf, &mut activation.context);

332 -

}

325 +

let rgb = value.coerce_to_u32(activation)?;

326 +

let tf = TextFormat {

327 +

color: Some(swf::Color::from_rgb(rgb, 0xFF)),

328 +

..TextFormat::default()

329 +

};

330 +

this.set_text_format(0, this.text_length(), tf.clone(), &mut activation.context);

331 +

this.set_new_text_format(tf, &mut activation.context);

333 332

Ok(())

334 333

}

335 334

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4