Updates to readme

This commit is contained in:
Edward R. Gonzalez 2024-05-04 12:59:08 -04:00
parent 046d79c9bd
commit 0e27635a9b
7 changed files with 13 additions and 14 deletions

View File

@ -1,9 +1,5 @@
# Sectr Prototype
![img](docs/assets/sectr_host_2024-03-09_04-30-27.png)
<video src="docs/assets/raddbg_2024-05-04_12-05-47.mp4" width="600" controls></video>
This prototype aims to flesh out ideas I've wanted to explore futher when it came to code editing and tools for code in general.
The things to explore:
@ -44,3 +40,9 @@ Even so the notatble groups are:
* Auto-layout with heavy procedural generation of box widgets
There is some unused code in `code/__imgui_raddbg`. Its a partial translation of some data structures from raddbg's ui.
## Gallery
![img](docs/assets/sectr_host_2024-03-09_04-30-27.png)
![img](docs/assets/sectr_host_2024-05-04_12-29-39.png)
![img](docs/assets/Code_2024-05-04_12-55-53.png)

View File

@ -153,7 +153,7 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem
rl.SetConfigFlags( {
rl.ConfigFlag.WINDOW_RESIZABLE,
// rl.ConfigFlag.WINDOW_TOPMOST,
rl.ConfigFlag.WINDOW_TOPMOST,
})
window_width : i32 = cast(i32) config.resolution_width

View File

@ -15,7 +15,7 @@ Color_BG_TextBox_Green :: Color { 102, 102, 110, 255 }
Color_Frame_Disabled :: Color { 22, 22, 22, 120 }
Color_Frame_Hover :: Color { 122, 122, 125, 200 }
Color_Frame_Select :: Color { 188, 188, 188, 220 }
Color_GreyRed :: Color { 220, 100, 100, 165 }
Color_GreyRed :: Color { 220, 100, 100, 50 }
Color_White_A125 :: Color { 255, 255, 255, 165 }
Color_Black :: Color { 0, 0, 0, 255 }

View File

@ -244,12 +244,11 @@ update :: proc( delta_time : f64 ) -> b32
{
// frame := ui_widget( "Frame", {} )
// ui_parent(frame)
parent_layout := default_layout
parent_layout.size = range2( { 300, 300 }, {} )
parent_layout.alignment = { 0.5, 0.5 }
parent_layout.margins = { 100, 100, 100, 100 }
parent_layout.padding = {}
parent_layout.padding = { 5, 10, 5, 5 }
parent_layout.pos = { 0, 0 }
parent_theme := frame_style_default
@ -267,11 +266,9 @@ update :: proc( delta_time : f64 ) -> b32
debug.draggable_box_pos = parent.style.layout.pos
debug.draggable_box_size = parent.style.layout.size.min
}
if parent.dragging {
debug.draggable_box_pos += mouse_world_delta()
}
if parent.resizing
{
og_layout := ui_context.active_start_style.layout
@ -286,7 +283,6 @@ update :: proc( delta_time : f64 ) -> b32
if (ui.hot == parent.key) && (ui.hot_resizable || ui.active_start_signal.resizing) {
parent.style.bg_color = Color_Blue
}
parent.style.layout.pos = debug.draggable_box_pos
parent.style.layout.size.min = debug.draggable_box_size
}
@ -295,18 +291,19 @@ update :: proc( delta_time : f64 ) -> b32
child_layout.size = range2({ 0, 0 }, { 0, 0 })
child_layout.alignment = { 0.5, 0.5 }
child_layout.margins = { 20, 20, 20, 20 }
child_layout.padding = {}
child_layout.anchor = range2({ 0.0, 0.0 }, { 0.0, 0.0 })
child_layout.padding = { 5, 5, 5, 5 }
child_layout.anchor = range2({ 0.2, 0.1 }, { 0.1, 0.15 })
child_layout.pos = { 0, 0 }
child_theme := frame_style_default
child_theme.bg_color = Color_GreyRed
child_theme.flags = {
// .Fixed_Width, .Fixed_Height,
.Origin_At_Anchor_Center
}
child_theme.layout = child_layout
ui_theme_via_style(child_theme)
child := ui_widget( "Child", { .Mouse_Clickable })
child := ui_widget( "Child", { .Mouse_Clickable })
}
// Whitespace AST test

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB