MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _inline_object_draw

Method _inline_object_draw

editor/script/script_text_editor.cpp:525–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525void ScriptTextEditor::_inline_object_draw(const Dictionary &p_info, const Rect2 &p_rect) {
526 if (_is_valid_color_info(p_info)) {
527 Rect2 col_rect = p_rect.grow(-4);
528 if (color_alpha_texture.is_null()) {
529 color_alpha_texture = inline_color_picker->get_theme_icon("sample_bg", "ColorPicker");
530 }
531 code_editor->get_text_editor()->draw_texture_rect(color_alpha_texture, col_rect, false);
532 code_editor->get_text_editor()->draw_rect(col_rect, Color(p_info["color"]));
533 code_editor->get_text_editor()->draw_rect(col_rect, Color(1, 1, 1), false, 1);
534 }
535}
536
537void ScriptTextEditor::_inline_object_handle_click(const Dictionary &p_info, const Rect2 &p_rect) {
538 if (_is_valid_color_info(p_info)) {

Callers

nothing calls this directly

Calls 7

get_text_editorMethod · 0.80
ColorClass · 0.50
growMethod · 0.45
is_nullMethod · 0.45
get_theme_iconMethod · 0.45
draw_texture_rectMethod · 0.45
draw_rectMethod · 0.45

Tested by

no test coverage detected