aboutsummaryrefslogtreecommitdiff
path: root/posts
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-02 06:41:44 +0100
committerAkshay <[email protected]>2021-04-02 06:41:44 +0100
commitc7a575d3fef907103a94ff444bb86c280e47148b (patch)
treee82b7fbebcb76002ac5122bc6e0d4092cf7eacd5 /posts
parentfe9b5edea79dfc508066efca2156aeb02cf16cde (diff)
add day 17 of devlog
Diffstat (limited to 'posts')
-rw-r--r--posts/SDL2_devlog.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/posts/SDL2_devlog.md b/posts/SDL2_devlog.md
index 991a246..eb11de8 100644
--- a/posts/SDL2_devlog.md
+++ b/posts/SDL2_devlog.md
@@ -5,6 +5,37 @@ on the editor. The days are listed in reverse chronological
5order, begin from the bottom, if this is your first time on 5order, begin from the bottom, if this is your first time on
6this page. 6this page.
7 7
8### Day 17
9
10I decided to give the text-only statusline a touch up, by
11adding a active color and dither level preview. Aligning the
12"widget" to the right of statusline involved a lot more than
13I thought, so I created a ghetto CSS-like rectangle
14placement system to position containers inside containers:
15
16```rust
17// roughly something like this
18let statusline =
19 Container::new(Offset::Left(0), Offset::Bottom(40))
20 .width(Size::Max)
21 .height(Size::Absolute(20));
22
23let mut primary = Container::uninit()
24 .width(Size::Absolute(16))
25 .height(Size::Absolute(16));
26
27container.place(
28 &mut padding_box,
29 HorAlign::Right,
30 VertAlign::Center
31);
32```
33
34The result (brush preview on the bottom right):
35
36![Day 17](https://u.peppe.rs/OtU.mp4)
37
38
8### Day 16 39### Day 16
9 40
10The embedded lisp is coming along nicely, users can load 41The embedded lisp is coming along nicely, users can load