Conversation
|
||
// TODO(happens): Can we just use the TextureId here? We need | ||
// `Debug` on this and `Hash` on palette::Srgba | ||
// cached_color_textures: HashMap<palette::Srgba, Texture<B>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that the UI shaders accept the texture and a tint, then mixes them together. That means you don't need a texture per color. You can preload a static single-pixel white texture (probably in a lazy_static) and just use it for all "solid color" cases with the color being used as a tint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress looks good :)
@@ -24,26 +24,31 @@ use crate::{ | |||
/// | |||
/// Will fail with error 'No resource with the given id' if the InputBundle is not added. | |||
#[derive(new)] | |||
pub struct UiBundle<A = String, B = String, C = NoCustomUi, W = u32, G = ()> { | |||
pub struct UiBundle<R, I, T, A = String, B = String, C = NoCustomUi, W = u32, G = ()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs docs lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the entire bundle.rs
and prefab.rs
need to be updated, there is a metric ton of generics now and I didn't want to update it until I'm through with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no way we can reduce those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Frizi just did a major refactor to use boxed trait objects instead of generics for this, since it has practically no performance impact and makes this code readable again =P This means that this will continue once he is done with that.
// Required for text editing. You want the cursor image to blink. | ||
builder.add(BlinkSystem, "blink_system", &[]); | ||
// builder.add(BlinkSystem, "blink_system", &[]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are in ui already?
Superseded by 1e39c52#diff-2f73b2b8472b2f81a559547ec35d37a7R73 |
This is the tracking PR for porting the UI pass over to the new renderer.