mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-12-22 12:28:19 -06:00
change name function to lower case
This commit is contained in:
parent
fa994e659a
commit
5ce9dda77b
|
@ -40,7 +40,9 @@ pub struct ProcessContext<'a> {
|
|||
}
|
||||
|
||||
pub trait UiElement {
|
||||
/// Get the name of the element, for example "Button" or "ProgressBar"
|
||||
/// Get the name of the element (in lower case)
|
||||
///
|
||||
/// For example, "button" or "progress_bar"
|
||||
fn name(&self) -> &'static str;
|
||||
|
||||
/// Get the unique id used for internal state management\
|
||||
|
|
|
@ -8,7 +8,7 @@ pub struct Break;
|
|||
|
||||
impl UiElement for Break {
|
||||
fn name(&self) -> &'static str {
|
||||
"Break"
|
||||
"break"
|
||||
}
|
||||
|
||||
fn measure(&self, _: MeasureContext) -> Response {
|
||||
|
|
|
@ -133,7 +133,7 @@ impl Container {
|
|||
|
||||
impl UiElement for Container {
|
||||
fn name(&self) -> &'static str {
|
||||
"Container"
|
||||
"container"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -40,7 +40,7 @@ impl Default for FillRect {
|
|||
|
||||
impl UiElement for FillRect {
|
||||
fn name(&self) -> &'static str {
|
||||
"FillRect"
|
||||
"fill_rect"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -51,7 +51,7 @@ impl Image {
|
|||
|
||||
impl UiElement for Image {
|
||||
fn name(&self) -> &'static str {
|
||||
"Image"
|
||||
"image"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -45,7 +45,7 @@ impl Interactable {
|
|||
|
||||
impl UiElement for Interactable {
|
||||
fn name(&self) -> &'static str {
|
||||
"Interactable"
|
||||
"interactable"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> crate::measure::Response {
|
||||
|
|
|
@ -49,7 +49,7 @@ impl Default for ProgressBar {
|
|||
|
||||
impl UiElement for ProgressBar {
|
||||
fn name(&self) -> &'static str {
|
||||
"ProgressBar"
|
||||
"progress_bar"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -103,7 +103,7 @@ impl Slider {
|
|||
|
||||
impl UiElement for Slider {
|
||||
fn name(&self) -> &'static str {
|
||||
"Slider"
|
||||
"slider"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -19,7 +19,7 @@ impl Default for Spacer {
|
|||
|
||||
impl UiElement for Spacer {
|
||||
fn name(&self) -> &'static str {
|
||||
"Spacer"
|
||||
"spacer"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -71,7 +71,7 @@ impl Text {
|
|||
|
||||
impl UiElement for Text {
|
||||
fn name(&self) -> &'static str {
|
||||
"Text"
|
||||
"text"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
|
@ -38,7 +38,7 @@ impl Transformer {
|
|||
|
||||
impl UiElement for Transformer {
|
||||
fn name(&self) -> &'static str {
|
||||
"Transformer"
|
||||
"transformer"
|
||||
}
|
||||
|
||||
fn measure(&self, ctx: MeasureContext) -> Response {
|
||||
|
|
Loading…
Reference in a new issue