Skip to content

Commit

Permalink
Bump to v0.1.1 to fix dumb documentation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Aug 21, 2024
1 parent 1d23577 commit 85d2a37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyri_tooltip"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "Powerful tooltips for Bevy"
repository = "https://github.com/benfrankel/pyri_tooltip"
Expand Down
29 changes: 14 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@
//!
//! Add [`TooltipPlugin`] to set up the tooltip system:
//!
//! ```ignore
//! ```
//! # /*
//! app.add_plugins(TooltipPlugin::default());
//! # */
//! ```
//!
//! Spawn a UI node with [`Interaction`](bevy_ui::Interaction) and [`Tooltip`] components:
//!
//! ```ignore
//! ```
//! # /*
//! commands.spawn((
//! NodeBundle::default(),
//! Interaction::default(),
//! Tooltip::cursor("Hello, world!"),
//! ));
//! # */
//! ```
//!
//! # Advanced
Expand Down Expand Up @@ -173,14 +177,9 @@ impl PrimaryTooltip {
// TODO: Animation, wedge (like a speech bubble), easier content customization / icons.
/// A [`Component`] that specifies a tooltip to be displayed on hover.
///
/// This will only work on entities that also include the following components:
/// - [`NodeBundle`] components
/// This will only work for entities that also include the following:
/// - [`NodeBundle`]
/// - [`Interaction`](bevy_ui::Interaction)
///
/// The default behavior consists of the following values:
/// - [`TooltipActivation::IDLE`]
/// - [`TooltipTransfer::NONE`]
/// - [`TooltipPlacement::CURSOR`]
#[derive(Component, Clone, Debug)]
#[cfg_attr(
feature = "bevy_reflect",
Expand All @@ -194,7 +193,7 @@ pub struct Tooltip {
pub dismissal: TooltipDismissal,
/// The conditions for skipping the next tooltip's activation delay.
pub transfer: TooltipTransfer,
/// How the position of the tooltip entity should be determined.
/// How the position of the tooltip entity will be determined.
pub placement: TooltipPlacement,
/// The tooltip entity and content to be displayed.
pub content: TooltipContent,
Expand Down Expand Up @@ -223,7 +222,7 @@ impl Tooltip {
}
}

/// Set [`JustifyText`].
/// Change the text justification.
///
/// NOTE: This does nothing for custom tooltips.
pub fn with_justify(mut self, justify_text: JustifyText) -> Self {
Expand All @@ -234,25 +233,25 @@ impl Tooltip {
self
}

/// Set [`TooltipActivation`].
/// Set a custom [`TooltipActivation`].
pub fn with_activation(mut self, activation: impl Into<TooltipActivation>) -> Self {
self.activation = activation.into();
self
}

/// Set [`TooltipDismissal`].
/// Set a custom [`TooltipDismissal`].
pub fn with_dismissal(mut self, dismissal: impl Into<TooltipDismissal>) -> Self {
self.dismissal = dismissal.into();
self
}

/// Set [`TooltipTransfer`].
/// Set a custom [`TooltipTransfer`].
pub fn with_transfer(mut self, transfer: impl Into<TooltipTransfer>) -> Self {
self.transfer = transfer.into();
self
}

/// Set [`TooltipPlacement`].
/// Set a custom [`TooltipPlacement`].
pub fn with_placement(mut self, placement: impl Into<TooltipPlacement>) -> Self {
self.placement = placement.into();
self
Expand Down

0 comments on commit 85d2a37

Please sign in to comment.