From f25fe7f70784554cec9b5119ccc47c59b869faeb Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Wed, 28 Aug 2024 14:55:12 +0100 Subject: [PATCH] Add docs for pub exports of backgrounds --- agb/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/agb/src/lib.rs b/agb/src/lib.rs index 7f9cf906..f5f3d272 100644 --- a/agb/src/lib.rs +++ b/agb/src/lib.rs @@ -106,6 +106,15 @@ /// # use agb::include_background_gfx; /// include_background_gfx!(generated_background, "000000", DATA => "$OUT_DIR/generated_background.aseprite"); /// ``` +/// +/// You can also make the exported background a public module which will allow other modules access them. The following +/// will declare `water_tiles` as a `pub mod` rather than a `mod`. +/// +/// ```rust,no_run +/// ##![no_std] +/// ##![no_main] +/// agb::include_background_gfx!(pub water_tiles, tiles => "examples/water_tiles.png"); +/// ``` pub use agb_image_converter::include_background_gfx; #[doc(hidden)]