Adding clip rects to UI logic

This commit is contained in:
Allen Webster 2019-10-22 22:14:47 -07:00
parent 10ed4ee4b7
commit 0b14cd8ba1
2 changed files with 6 additions and 2 deletions

View File

@ -358,6 +358,8 @@ profile_draw_node(Application_Links *app, View_ID view, Face_ID face_id,
time_slice_box = rect_inner(time_slice_box, 3.f); time_slice_box = rect_inner(time_slice_box, 3.f);
if (node->closed){ if (node->closed){
draw_set_clip(app, time_slice_box);
x = rect_range_x(time_slice_box); x = rect_range_x(time_slice_box);
y = rect_range_y(time_slice_box); y = rect_range_y(time_slice_box);
@ -404,6 +406,8 @@ profile_draw_node(Application_Links *app, View_ID view, Face_ID face_id,
Rect_f32 info_box = side_by_side.max; Rect_f32 info_box = side_by_side.max;
{ {
draw_set_clip(app, info_box);
x = rect_range_x(info_box); x = rect_range_x(info_box);
x_pos = x.min + x_half_padding; x_pos = x.min + x_half_padding;
@ -441,7 +445,7 @@ profile_draw_node(Application_Links *app, View_ID view, Face_ID face_id,
String_Const_u8 child_name = profile_node_name(child); String_Const_u8 child_name = profile_node_name(child);
Fancy_Line line = {}; Fancy_Line line = {};
push_fancy_string_trunc(scratch, &line, child_name, 10); push_fancy_string_trunc(scratch, &line, child_name, 20);
push_fancy_stringf(scratch, &line, fcolor_id(Stag_Default), 0.5f, 0.f, push_fancy_stringf(scratch, &line, fcolor_id(Stag_Default), 0.5f, 0.f,
"#%4llu", child->unique_counter); "#%4llu", child->unique_counter);
push_fancy_stringf(scratch, &line, fcolor_id(Stag_Pop2), push_fancy_stringf(scratch, &line, fcolor_id(Stag_Pop2),

View File

@ -441,7 +441,7 @@ static Command_Metadata fcoder_metacmd_table[211] = {
{ PROC_LINKS(miblo_decrement_time_stamp, 0), false, "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 237 }, { PROC_LINKS(miblo_decrement_time_stamp, 0), false, "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 237 },
{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 243 }, { PROC_LINKS(miblo_increment_time_stamp_minute, 0), false, "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 243 },
{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 249 }, { PROC_LINKS(miblo_decrement_time_stamp_minute, 0), false, "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\custom\\4coder_miblo_numbers.cpp", 43, 249 },
{ PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "w:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 770 }, { PROC_LINKS(profile_inspect, 0), true, "profile_inspect", 15, "Inspect all currently collected profiling information in 4coder's self profiler.", 80, "w:\\4ed\\code\\custom\\4coder_profile_inspect.cpp", 45, 774 },
{ PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 }, { PROC_LINKS(default_startup, 0), false, "default_startup", 15, "Default command for responding to a startup event", 49, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 7 },
{ PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 21 }, { PROC_LINKS(default_try_exit, 0), false, "default_try_exit", 16, "Default command for responding to a try-exit event", 50, "w:\\4ed\\code\\custom\\4coder_default_hooks.cpp", 43, 21 },
}; };