@@ -15,21 +15,10 @@ I propose two different solutions for the issues above.
...
@@ -15,21 +15,10 @@ I propose two different solutions for the issues above.
We'll need a few new types to store the fonts. I would also like to make something more generic and reusable in the future. It'll look something like this:
We'll need a few new types to store the fonts. I would also like to make something more generic and reusable in the future. It'll look something like this:
`AssetHandle`:
```rust
pubstructAssetHandle<T>{
id:u32,// Optionally UUID here although I don't think its required..
phantom_data:PhantomData<T>,
}
```
`AssetStorage`:
`AssetStorage`:
```rust
```rust
pubstructAssetStorage<T>{
pubstructAssetStorage<T>{
assets:HashMap<AssetHandle<T>,T>,
assets:HashMap<String,Binding<Option<T>>>,
// Stores bindings that notify us when changes are made.
// Optionally we can make Binding Hash here. Not sure if I like that though..