From b684afc345d00a180173a01b8a6a1ae5ce280aa7 Mon Sep 17 00:00:00 2001 From: Trevor Hickey Date: Sun, 21 Jul 2024 13:34:07 -0400 Subject: [PATCH] updates --- source/code/programs/ide/frame/BUILD | 2 ++ .../code/programs/ide/frame/apply_schema_to_elements.hcp | 8 ++++++++ .../code/programs/ide/frame/convert_all_ide_elements.hcp | 4 ++++ source/code/programs/ide/frame/find_mouse_over_index.hcp | 3 +++ .../ide/frame/forward_compatible_element_upgrades.hcp | 4 ++++ source/code/programs/ide/frame/move_ide_element.hcp | 4 ++++ source/code/programs/ide/frame/validate_ide_element.hcp | 8 ++++++++ source/code/programs/ide/gl_context_element_load.hcp | 2 ++ .../ide/global_actions/global_element_builder.hcp | 3 +++ .../programs/ide/global_actions/main_menu_selector.hcp | 2 ++ source/code/programs/ide/settings/data/BUILD | 1 + source/code/programs/ide/settings/data/ide_element.hcp | 1 + .../programs/ide/settings/ide_default_settings_getter.hcp | 3 +++ .../code/utilities/code/save/state_to_code_converter.hcp | 4 ++++ .../objects/faced_label/faced_label_is_mouse_over.hcp | 3 +++ 15 files changed, 52 insertions(+) diff --git a/source/code/programs/ide/frame/BUILD b/source/code/programs/ide/frame/BUILD index 11ff7f21e..cf92b1017 100644 --- a/source/code/programs/ide/frame/BUILD +++ b/source/code/programs/ide/frame/BUILD @@ -154,6 +154,7 @@ hcp_hdrs_derive( "//code/utilities/data_structures/graphics/objects/buildable_faced_tree:buildable_face_tree_is_mouse_over", "//code/utilities/data_structures/graphics/objects/buildable_schema_faced_tree:buildable_schema_face_tree_drawer", "//code/utilities/data_structures/graphics/objects/buttoned_faced_tree:button_face_tree_drawer", + "//code/utilities/data_structures/graphics/objects/faced_label:faced_label_drawer", "//code/utilities/data_structures/graphics/objects/cursor:cursor_drawer", "//code/utilities/data_structures/graphics/objects/cursor:label_cursor_action_doer", "//code/utilities/data_structures/graphics/objects/faced_grid:grid_label_drawer", @@ -184,6 +185,7 @@ hcp_hdrs_derive( "//code/utilities/data_structures/graphics/objects/buildable_schema_faced_tree:buildable_schema_face_tree_drawer", "//code/utilities/data_structures/graphics/objects/buildable_schema_faced_tree:buildable_schema_faced_tree_is_mouse_over", "//code/utilities/data_structures/graphics/objects/buttoned_faced_tree:button_face_tree_drawer", + "//code/utilities/data_structures/graphics/objects/faced_label:faced_label_is_mouse_over", "//code/utilities/data_structures/graphics/objects/cursor:cursor_drawer", "//code/utilities/data_structures/graphics/objects/cursor:label_cursor_action_doer", "//code/utilities/data_structures/graphics/objects/faced_grid:grid_label_drawer", diff --git a/source/code/programs/ide/frame/apply_schema_to_elements.hcp b/source/code/programs/ide/frame/apply_schema_to_elements.hcp index 4f14e93a3..b912afac3 100644 --- a/source/code/programs/ide/frame/apply_schema_to_elements.hcp +++ b/source/code/programs/ide/frame/apply_schema_to_elements.hcp @@ -37,6 +37,10 @@ class //NOT NEEDED (void)x; }, + [&](Positioned_Faced_Label & x) { + //NOT NEEDED + (void)x; + }, }, it.element); ❱ @@ -73,5 +77,9 @@ class //NOT NEEDED (void)x; }, + [&](Positioned_Faced_Label & x) { + //NOT NEEDED + (void)x; + }, }, it.element); ❱ \ No newline at end of file diff --git a/source/code/programs/ide/frame/convert_all_ide_elements.hcp b/source/code/programs/ide/frame/convert_all_ide_elements.hcp index 78ae4c3bc..afcc82164 100644 --- a/source/code/programs/ide/frame/convert_all_ide_elements.hcp +++ b/source/code/programs/ide/frame/convert_all_ide_elements.hcp @@ -52,6 +52,10 @@ class //todo results.frame_elements.types += Label_Drawer::Full_Draw(settings.desktop.unilang_font_lookup,x,pc_input).types; }, + [&](Positioned_Faced_Label & x) { + //todo + results.frame_elements.types += Faced_Label_Drawer::Full_Draw(settings.desktop.unilang_font_lookup,x,pc_input).types; + }, }, it.element); } diff --git a/source/code/programs/ide/frame/find_mouse_over_index.hcp b/source/code/programs/ide/frame/find_mouse_over_index.hcp index 1462d1123..f7bc2c102 100644 --- a/source/code/programs/ide/frame/find_mouse_over_index.hcp +++ b/source/code/programs/ide/frame/find_mouse_over_index.hcp @@ -40,6 +40,9 @@ class [&](Positioned_Label & x) { was_performed = Label_Is_Mouse_Over::Check(x.pos, x.state, pc_input); }, + [&](Positioned_Faced_Label & x) { + was_performed = Faced_Label_Is_Mouse_Over::Check(settings.desktop.unilang_font_lookup,x, x.pos, pc_input); + }, }, it.element); if (was_performed){ diff --git a/source/code/programs/ide/frame/forward_compatible_element_upgrades.hcp b/source/code/programs/ide/frame/forward_compatible_element_upgrades.hcp index 35b628a54..0cc6e4281 100644 --- a/source/code/programs/ide/frame/forward_compatible_element_upgrades.hcp +++ b/source/code/programs/ide/frame/forward_compatible_element_upgrades.hcp @@ -37,6 +37,10 @@ class //NOT NEEDED (void)x; }, + [&](Positioned_Faced_Label & x) { + //NOT NEEDED + (void)x; + }, }, it.element); ❱ diff --git a/source/code/programs/ide/frame/move_ide_element.hcp b/source/code/programs/ide/frame/move_ide_element.hcp index 05cdbdd97..b51be56df 100644 --- a/source/code/programs/ide/frame/move_ide_element.hcp +++ b/source/code/programs/ide/frame/move_ide_element.hcp @@ -33,5 +33,9 @@ class x.pos.x += pos.x; x.pos.y += pos.y; }, + [&](Positioned_Faced_Label & x) { + x.pos.x += pos.x; + x.pos.y += pos.y; + }, }, it.element); ❱ \ No newline at end of file diff --git a/source/code/programs/ide/frame/validate_ide_element.hcp b/source/code/programs/ide/frame/validate_ide_element.hcp index 5594c0d61..4f4edcc53 100644 --- a/source/code/programs/ide/frame/validate_ide_element.hcp +++ b/source/code/programs/ide/frame/validate_ide_element.hcp @@ -36,6 +36,10 @@ class //NOT NEEDED (void)x; }, + [&](Positioned_Faced_Label const& x) { + //NOT NEEDED + (void)x; + }, }, it.element); @@ -76,6 +80,10 @@ class //NOT NEEDED (void)x; }, + [&](Positioned_Faced_Label const& x) { + //NOT NEEDED + (void)x; + }, }, it.element); diff --git a/source/code/programs/ide/gl_context_element_load.hcp b/source/code/programs/ide/gl_context_element_load.hcp index b6de5b051..bd612d8bf 100644 --- a/source/code/programs/ide/gl_context_element_load.hcp +++ b/source/code/programs/ide/gl_context_element_load.hcp @@ -27,6 +27,8 @@ class [&](Positioned_Rectangle_Settings & x) { }, [&](Positioned_Label & x) { + }, + [&](Positioned_Faced_Label & x) { } }, it.element); ❱ \ No newline at end of file diff --git a/source/code/programs/ide/global_actions/global_element_builder.hcp b/source/code/programs/ide/global_actions/global_element_builder.hcp index 19e1a937e..dbc8c82fe 100644 --- a/source/code/programs/ide/global_actions/global_element_builder.hcp +++ b/source/code/programs/ide/global_actions/global_element_builder.hcp @@ -42,6 +42,9 @@ class e.element = e2; settings.elements.types.emplace_back(e); } + else if (selected_item == "Add Positioned_Faced_Label"){ + // + } else if (selected_item == "Add Positioned_Image_Data"){ // } diff --git a/source/code/programs/ide/global_actions/main_menu_selector.hcp b/source/code/programs/ide/global_actions/main_menu_selector.hcp index 00811898d..af4dd019c 100644 --- a/source/code/programs/ide/global_actions/main_menu_selector.hcp +++ b/source/code/programs/ide/global_actions/main_menu_selector.hcp @@ -33,6 +33,8 @@ class }, [&](Positioned_Label & x) { }, + [&](Positioned_Faced_Label & x) { + }, [&](Positioned_Select_Menu & x) { auto label = Tree_Label_Active_Finder::Find_Active_Label(x.menu); if (label != x.menu.nodes.end()){ diff --git a/source/code/programs/ide/settings/data/BUILD b/source/code/programs/ide/settings/data/BUILD index 7606c615e..51b99b2a3 100644 --- a/source/code/programs/ide/settings/data/BUILD +++ b/source/code/programs/ide/settings/data/BUILD @@ -62,6 +62,7 @@ hcp_hdrs_derive( "//code/utilities/data_structures/graphics/image:positioned_image_data", "//code/utilities/data_structures/graphics/objects/buildable_faced_tree/data:positioned_buildable_face_tree", "//code/utilities/data_structures/graphics/objects/buildable_schema_faced_tree/data:positioned_buildable_schema_faced_tree", + "//code/utilities/data_structures/graphics/objects/faced_label/data:positioned_faced_label", "//code/utilities/data_structures/graphics/objects/label/data:positioned_label", "//code/utilities/formats/json/converters:lib", "//code/utilities/formats/json/overloads:variant_json_converters", diff --git a/source/code/programs/ide/settings/data/ide_element.hcp b/source/code/programs/ide/settings/data/ide_element.hcp index 83873d388..24eab17fc 100644 --- a/source/code/programs/ide/settings/data/ide_element.hcp +++ b/source/code/programs/ide/settings/data/ide_element.hcp @@ -16,6 +16,7 @@ public: // Text-like boxes Positioned_Label, + Positioned_Faced_Label, // GUI Menu Positioned_Select_Menu, diff --git a/source/code/programs/ide/settings/ide_default_settings_getter.hcp b/source/code/programs/ide/settings/ide_default_settings_getter.hcp index 972121fe6..d09e2fea4 100644 --- a/source/code/programs/ide/settings/ide_default_settings_getter.hcp +++ b/source/code/programs/ide/settings/ide_default_settings_getter.hcp @@ -260,6 +260,9 @@ class face_label.state.faces[0].label.message = "Add Positioned_Label"; x.menu.nodes.insert(top,face_label); + + face_label.state.faces[0].label.message = "Add Positioned_Faced_Label"; + x.menu.nodes.insert(top,face_label); face_label.state.faces[0].label.message = "Add Positioned_Image_Data"; x.menu.nodes.insert(top,face_label); diff --git a/source/code/utilities/code/save/state_to_code_converter.hcp b/source/code/utilities/code/save/state_to_code_converter.hcp index ef67c5b50..65dc2f60f 100644 --- a/source/code/utilities/code/save/state_to_code_converter.hcp +++ b/source/code/utilities/code/save/state_to_code_converter.hcp @@ -35,6 +35,10 @@ class //don't care (void)x; }, + [&](Positioned_Faced_Label & x) { + //don't care + (void)x; + }, [&](Positioned_Buildable_Schema_Faced_Tree & x) { //tokenize diff --git a/source/code/utilities/data_structures/graphics/objects/faced_label/faced_label_is_mouse_over.hcp b/source/code/utilities/data_structures/graphics/objects/faced_label/faced_label_is_mouse_over.hcp index 167354d41..3409db83e 100644 --- a/source/code/utilities/data_structures/graphics/objects/faced_label/faced_label_is_mouse_over.hcp +++ b/source/code/utilities/data_structures/graphics/objects/faced_label/faced_label_is_mouse_over.hcp @@ -3,6 +3,9 @@ class ⚞⚟ +◀public: static▶ bool ☀Check(Character_Maps const& font_chars, Positioned_Faced_Label & label, Position const& pos, Pc_Input_State const& pc_input)❰ + return Do_Check(font_chars,label.state,pos,pc_input.mouse.pos); +❱ ◀public: static▶ bool ☀Check(Character_Maps const& font_chars, Faced_Label & label, Position const& pos, Pc_Input_State const& pc_input)❰ return Do_Check(font_chars,label.state,pos,pc_input.mouse.pos); ❱