docs + fixed warnings

This commit is contained in:
Dmitry Stepanov
2025-09-30 10:57:41 +03:00
parent 16cd27dd76
commit 2b382a9179
3 changed files with 9 additions and 5 deletions
+1 -4
View File
@@ -35,10 +35,7 @@ use crate::{
engine::{Engine, GraphicsContext},
fxhash::FxHashMap,
graph::{BaseSceneGraph, SceneGraphNode},
graphics::{
framebuffer::ReadTarget,
gpu_texture::{GpuTextureKind, PixelKind},
},
graphics::{framebuffer::ReadTarget, gpu_texture::GpuTextureKind},
gui::{
font::Font, formatted_text::WrapMode, screen::ScreenBuilder, text::TextBuilder,
widget::WidgetBuilder, HorizontalAlignment, UserInterface, VerticalAlignment,
-1
View File
@@ -41,7 +41,6 @@ use crate::{
engine::Engine,
fxhash::FxHashSet,
graph::{BaseSceneGraph, SceneGraph},
graphics::gpu_texture::PixelKind,
gui::{
brush::Brush,
draw::{CommandTexture, Draw},
+8
View File
@@ -96,11 +96,19 @@ pub struct UiRenderContext<'a, 'b, 'c> {
pub resource_manager: &'a ResourceManager,
}
/// Contains all the info required to render a user interface.
pub struct UiRenderInfo<'a> {
/// A render target to render a user interface (UI) to. If [`None`], then the UI will be rendered
/// to the screen directly.
pub render_target: Option<TextureResource>,
/// Screen size for the UI. In most cases, it should be `ui.screen_size()`.
pub screen_size: Vector2<f32>,
/// A drawing content of a UI. In most cases, it should be `ui.draw()`.
pub drawing_context: &'a DrawingContext,
/// A color that will be used to fill a render target before rendering of the UI. Ignored if the
/// render target is [`None`] and nothing will be cleared.
pub clear_color: Color,
/// A reference to the resource manager.
pub resource_manager: &'a ResourceManager,
}