import notes from email bugs; add non-virtual-but-still-multiple-inheritance example to mule_main; slightly increase loudness of exception/trap-caused stop ctrl events

This commit is contained in:
Ryan Fleury
2024-01-16 11:59:44 -08:00
parent 79677875c4
commit 1c40afc067
4 changed files with 71 additions and 12 deletions
+8
View File
@@ -6244,6 +6244,14 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt)
}
}
}
// rjf: exception or unexpected trap -> push error
if(event->cause == CTRL_EventCause_InterruptedByException ||
event->cause == CTRL_EventCause_InterruptedByTrap)
{
DF_CmdParams params = df_cmd_params_zero();
df_cmd_list_push(arena, cmds, &params, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error));
}
}break;
//- rjf: entity creation/deletion
+30 -11
View File
@@ -5051,18 +5051,21 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
Vec4F32 tx_color = df_rgba_from_theme_color(DF_ThemeColor_FailureText);
F32 alpha_factor = Max(ws->error_t, 0.2f);
tx_color.w *= alpha_factor;
ui_set_next_text_color(tx_color);
ui_set_next_pref_width(ui_children_sum(1));
UI_CornerRadius(4)
UI_Row
UI_PrefWidth(ui_text_dim(10, 1))
UI_TextAlignment(UI_TextAlign_Center)
String8 error_string = str8(ws->error_buffer, ws->error_string_size);
if(error_string.size != 0)
{
String8 error_string = str8(ws->error_buffer, ws->error_string_size);
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
ui_label(error_string);
ui_set_next_text_color(tx_color);
ui_set_next_pref_width(ui_children_sum(1));
UI_CornerRadius(4)
UI_Row
UI_PrefWidth(ui_text_dim(10, 1))
UI_TextAlignment(UI_TextAlign_Center)
{
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
ui_label(error_string);
}
}
}
}
@@ -11054,6 +11057,22 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds)
}
}break;
//- rjf: errors
case DF_CoreCmdKind_Error:
{
DF_Window *window = df_window_from_handle(params.window);
if(window == 0)
{
for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next)
{
DF_CmdParams p = df_cmd_params_from_window(w);
p.string = push_str8_copy(arena, params.string);
df_cmd_params_mark_slot(&p, DF_CmdParamSlot_String);
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error));
}
}
}break;
//- rjf: windows
case DF_CoreCmdKind_OpenWindow:
{
+26
View File
@@ -1102,6 +1102,23 @@ struct Vinheritance_Child : Vinheritance_MidLeft, Vinheritance_MidRight{
};
};
struct Minheritance_Base{
int x;
int y;
};
struct Minheritance_MidLeft : Minheritance_Base{
float left;
};
struct Minheritance_MidRight : Minheritance_Base{
float right;
};
struct Minheritance_Child : Minheritance_MidLeft, Minheritance_MidRight{
char *name;
};
struct OverloadedMethods{
int x;
int cool_method(void){
@@ -1297,6 +1314,15 @@ extended_type_coverage_eval_tests(void){
vinheritance_child.x = -1;
vinheritance_child.y = -1;
Minheritance_Child minheritance_child;
minheritance_child.name = "foobar";
minheritance_child.left = 10.5f;
minheritance_child.right = 13.0f;
minheritance_child.Minheritance_MidLeft::x = -1;
minheritance_child.Minheritance_MidLeft::y = -1;
minheritance_child.Minheritance_MidRight::x = +1;
minheritance_child.Minheritance_MidRight::y = +1;
OverloadedMethods overloaded_methods;
{
overloaded_methods.x = 0;
+7 -1
View File
@@ -194,6 +194,12 @@
////////////////////////////////
//~ rjf: Hot, Low Priority Tasks (UI Opinions, Less-Serious Jank, Preferences, Cleanup)
//
// [ ] ** Directory picking is kind of busted, as it goes through the same
// path as file picking, and this doesn't give the user a clean path to
// actually pick a folder, just navigate with them
//
// [ ] ** Hover-Eval-Popup-While-Scrolling is very annoying!
//
// [ ] ** In the call stack, I would like to be able to click quickly and move
// around the stack. Right now, you can do that with the first and third
// column, but the second column drops down a context menu. Since right
@@ -414,7 +420,7 @@
#define RADDBG_VERSION_MAJOR 0
#define RADDBG_VERSION_MINOR 9
#define RADDBG_VERSION_PATCH 3
#define RADDBG_VERSION_PATCH 4
#define RADDBG_VERSION_STRING_LITERAL Stringify(RADDBG_VERSION_MAJOR) "." Stringify(RADDBG_VERSION_MINOR) "." Stringify(RADDBG_VERSION_PATCH)
#if defined(NDEBUG)
# define RADDBG_TITLE_STRING_LITERAL "The RAD Debugger (" RADDBG_VERSION_STRING_LITERAL " ALPHA) - " __DATE__ ""