1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add folding gutter to code_edit

This commit is contained in:
Paulb23
2020-07-27 13:54:12 +01:00
parent 4d7df24d46
commit 7829fdc1d0
6 changed files with 104 additions and 128 deletions

View File

@@ -71,6 +71,14 @@ private:
Color line_number_color = Color(1, 1, 1);
void _line_number_draw_callback(int p_line, int p_gutter, const Rect2 &p_region);
/* Fold Gutter */
int fold_gutter = -1;
bool draw_fold_gutter = false;
Color folding_color = Color(1, 1, 1);
Ref<Texture2D> can_fold_icon = Ref<Texture2D>();
Ref<Texture2D> folded_icon = Ref<Texture2D>();
void _fold_gutter_draw_callback(int p_line, int p_gutter, Rect2 p_region);
void _gutter_clicked(int p_line, int p_gutter);
void _lines_edited_from(int p_from_line, int p_to_line);
@@ -116,6 +124,10 @@ public:
void set_line_numbers_zero_padded(bool p_zero_padded);
bool is_line_numbers_zero_padded() const;
/* Fold gutter */
void set_draw_fold_gutter(bool p_draw);
bool is_drawing_fold_gutter() const;
CodeEdit();
~CodeEdit();
};