Scene picking, shadow mapping adjustments

This commit is contained in:
2024-10-17 23:54:44 +02:00
parent 221be140bf
commit 8ee000ab74
6 changed files with 94 additions and 70 deletions

View File

@@ -173,7 +173,7 @@ ui_box_make :: (flags: UI_Box_Flags, hash: u32) -> *UI_Box {
if parent != null {
parent.num_children += 1;
//actual_hash += parent.hash;
actual_hash += parent.hash * xx parent.num_children;
//actual_hash += xx (parent.num_children*2);
}

View File

@@ -68,7 +68,7 @@ ui_toolbar_button :: (text: string, identifier: s64 = 0, loc := #caller_location
return box.interaction.clicked, box.interaction;
}
ui_label :: (text: string, text_color: Color = .{1,1,1,1}, identifier: s64 = 0, loc := #caller_location) {
ui_label_animated :: (text: string, text_color: Color = .{1,1,1,1}, identifier: s64 = 0, loc := #caller_location) {
ui_set_next_text(text);
ui_set_next_background_color(.{0.0,1.0,1.0,0.0});
ui_set_next_text_color(text_color);
@@ -78,6 +78,16 @@ ui_label :: (text: string, text_color: Color = .{1,1,1,1}, identifier: s64 = 0,
box := ui_box_make(.DRAW_TEXT | .ANIMATE_ON_HOVER, get_hash(loc, identifier));
}
ui_label :: (text: string, text_color: Color = .{1,1,1,1}, identifier: s64 = 0, loc := #caller_location) {
ui_set_next_text(text);
ui_set_next_background_color(.{0.0,1.0,1.0,0.0});
ui_set_next_text_color(text_color);
ui_set_next_size_x(.TEXT_DIM);
ui_set_next_size_y(.TEXT_DIM);
ui_set_next_padding(5);
box := ui_box_make(.DRAW_TEXT, get_hash(loc, identifier));
}
ui_label_fill_parent_x :: (text: string, identifier: s64 = 0, loc := #caller_location) {
ui_set_next_text(text);
ui_set_next_background_color(.{0.0,1.0,1.0,0.0});