intermediate #1
44
README.md
44
README.md
@@ -79,18 +79,18 @@ the primary use-case for myself to create this library in the first place.
|
|||||||
- [x] horizontal
|
- [x] horizontal
|
||||||
- [x] padding
|
- [x] padding
|
||||||
- [x] gap
|
- [x] gap
|
||||||
- [ ] alignment
|
- [x] alignment (removed - for now at least)
|
||||||
- [ ] center
|
- center
|
||||||
- [ ] left
|
- left
|
||||||
- [ ] right
|
- right
|
||||||
- [ ] sizing
|
- [x] sizing (removed - for now at least)
|
||||||
- [ ] width
|
- width
|
||||||
- [ ] height
|
- height
|
||||||
- [ ] options
|
- options
|
||||||
- [ ] fit
|
- fit
|
||||||
- [ ] grow
|
- grow
|
||||||
- [x] fixed
|
- fixed
|
||||||
- [x] percent
|
- percent
|
||||||
- [ ] Border
|
- [ ] Border
|
||||||
- [x] sides
|
- [x] sides
|
||||||
- [x] corners
|
- [x] corners
|
||||||
@@ -108,6 +108,19 @@ cells of the content (and may be overwritten by child elements contents).
|
|||||||
The border of an element should be around independent of the scrolling of the
|
The border of an element should be around independent of the scrolling of the
|
||||||
contents, just like padding.
|
contents, just like padding.
|
||||||
|
|
||||||
|
### Input
|
||||||
|
|
||||||
|
How is the user input handled in the containers? Should there be active
|
||||||
|
containers? Some input may happen for a specific container (i.e. when using
|
||||||
|
mouse input). How would I handle scrolling for outer and inner elements of
|
||||||
|
a container?
|
||||||
|
|
||||||
|
### Archive
|
||||||
|
|
||||||
|
The alignment and sizing options only make sense if both are available. For
|
||||||
|
this the current implementation has the viewport size and the content size too
|
||||||
|
linked. Therefore they have both been removed (at least for now):
|
||||||
|
|
||||||
- *fit*: adjust virtual space of container by the size of its children (i.e. a
|
- *fit*: adjust virtual space of container by the size of its children (i.e. a
|
||||||
container needs to be able to get the necessary size of its children)
|
container needs to be able to get the necessary size of its children)
|
||||||
- *grow*: use as much space as available (what exactly would be the difference
|
- *grow*: use as much space as available (what exactly would be the difference
|
||||||
@@ -120,10 +133,3 @@ contents, just like padding.
|
|||||||
container on the screen) -> similar to the current implementation!
|
container on the screen) -> similar to the current implementation!
|
||||||
- *right*: the anchor is fixed to the right side (i.e. size of the contents -
|
- *right*: the anchor is fixed to the right side (i.e. size of the contents -
|
||||||
size of the viewport)
|
size of the viewport)
|
||||||
|
|
||||||
### Input
|
|
||||||
|
|
||||||
How is the user input handled in the containers? Should there be active
|
|
||||||
containers? Some input may happen for a specific container (i.e. when using
|
|
||||||
mouse input). How would I handle scrolling for outer and inner elements of
|
|
||||||
a container?
|
|
||||||
|
|||||||
@@ -227,12 +227,6 @@ pub const Layout = packed struct {
|
|||||||
} = .{},
|
} = .{},
|
||||||
/// Padding used in between child elements as gaps when laid out
|
/// Padding used in between child elements as gaps when laid out
|
||||||
gap: u16 = 0,
|
gap: u16 = 0,
|
||||||
// TODO: is there a way to make x / y type copied by the compiler at comptime instead? such that this only has to be defined once?
|
|
||||||
/// Alignment of where the child elements are positioned relative to the parent container when laid out
|
|
||||||
alignment: packed struct {
|
|
||||||
x: enum(u2) { center, left, right } = .center,
|
|
||||||
y: enum(u2) { center, left, right } = .center,
|
|
||||||
} = .{},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn Container(comptime Event: type) type {
|
pub fn Container(comptime Event: type) type {
|
||||||
|
|||||||
Reference in New Issue
Block a user