mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
docs + fixed warnings
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -41,7 +41,6 @@ use crate::{
|
||||
engine::Engine,
|
||||
fxhash::FxHashSet,
|
||||
graph::{BaseSceneGraph, SceneGraph},
|
||||
graphics::gpu_texture::PixelKind,
|
||||
gui::{
|
||||
brush::Brush,
|
||||
draw::{CommandTexture, Draw},
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user