pub struct ConsoleConfig {Show 26 fields
pub font_path: Option<String>,
pub font_size: f32,
pub history_font_size: f32,
pub dropdown_font_size: f32,
pub history_height_vh: f32,
pub history_bg: Color,
pub history_padding: f32,
pub history_text_color: Color,
pub input_bg: Color,
pub input_padding_h: f32,
pub input_padding_v: f32,
pub input_border_width: f32,
pub input_border_color: Color,
pub input_text_color: Color,
pub input_ghost_color: Color,
pub input_prefix: String,
pub dropdown_bg: Color,
pub dropdown_border_color: Color,
pub dropdown_item_divider_color: Color,
pub dropdown_padding_h: f32,
pub dropdown_padding_v: f32,
pub dropdown_text_color: Color,
pub dropdown_highlight_bg: Color,
pub dropdown_highlight_text_color: Color,
pub toggle_key: KeyCode,
pub history_file: Option<PathBuf>,
}Expand description
All visual and behavioral settings for the developer console.
Use ConsoleConfig::default() for the built-in dark/gold look, or set any
field to customise every visual element before passing it to the plugin:
app.add_plugins(ChillConsole {
config: ConsoleConfig {
input_border_color: Color::srgb(0.2, 0.8, 0.4),
toggle_key: KeyCode::F1,
..default()
},
});Fields§
§font_path: Option<String>Path to a font asset (e.g. "fonts/UbuntuMono-R.ttf").
None uses Bevy’s built-in default font.
font_size: f32Font size for the input bar text.
history_font_size: f32Font size for history lines.
dropdown_font_size: f32Font size for dropdown suggestion items.
history_height_vh: f32Height of the history panel as a percentage of viewport height.
history_bg: ColorBackground color of the history panel.
history_padding: f32Padding (px) inside the history panel on all sides.
history_text_color: ColorText color for history lines.
input_bg: ColorBackground color of the input bar.
input_padding_h: f32Horizontal padding (px) inside the input bar.
input_padding_v: f32Vertical padding (px) inside the input bar.
input_border_width: f32Width (px) of the divider border drawn above the input bar.
input_border_color: ColorColor of the divider line above the input bar.
input_text_color: ColorColor of the main input text.
input_ghost_color: ColorColor of the ghost / autocomplete hint suffix.
input_prefix: StringPrefix symbol shown before the cursor (e.g. "▶ ").
dropdown_bg: ColorBackground color of the autocomplete dropdown.
dropdown_border_color: ColorColor of the bottom border of the dropdown container.
dropdown_item_divider_color: ColorColor of the hairline dividers between dropdown items.
dropdown_padding_h: f32Horizontal padding (px) inside each dropdown item.
dropdown_padding_v: f32Vertical padding (px) inside each dropdown item.
dropdown_text_color: ColorText color for unselected dropdown items.
dropdown_highlight_bg: ColorBackground color for the currently highlighted dropdown item.
dropdown_highlight_text_color: ColorText color for the currently highlighted dropdown item.
toggle_key: KeyCodeThe key that toggles the console open and closed. Defaults to backtick.
history_file: Option<PathBuf>Path to a plain-text file used to persist the console’s display history
(commands and their outputs) between runs. The file is read once at
startup and rewritten whenever the history changes. Defaults to
"console_history.txt" in the current working directory; set to None
to disable persistence even with the feature enabled. Has no effect on
web/wasm targets.
Implementations§
Source§impl ConsoleConfig
impl ConsoleConfig
Sourcepub fn chillgames() -> Self
pub fn chillgames() -> Self
Icy blue — the Chillgames look.
Trait Implementations§
Source§impl Clone for ConsoleConfig
impl Clone for ConsoleConfig
Source§fn clone(&self) -> ConsoleConfig
fn clone(&self) -> ConsoleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ConsoleConfig
impl Default for ConsoleConfig
impl Resource for ConsoleConfig
Auto Trait Implementations§
impl Freeze for ConsoleConfig
impl RefUnwindSafe for ConsoleConfig
impl Send for ConsoleConfig
impl Sync for ConsoleConfig
impl Unpin for ConsoleConfig
impl UnsafeUnpin for ConsoleConfig
impl UnwindSafe for ConsoleConfig
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more