Skip to content

Commit

Permalink
Default View Rect values.
Browse files Browse the repository at this point in the history
  • Loading branch information
Decapitated committed Jul 25, 2024
1 parent 7823388 commit de7ede2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions demo/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ index_path = "example_site/index.html"
custom_minimum_size = Vector2(0, 100)
layout_mode = 2
size_flags_vertical = 3
focus_mode = 1
mouse_filter = 0
mouse_force_pass_scroll_events = false
expand_mode = 1

[node name="CenterContainer" type="CenterContainer" parent="HSplitContainer/VBoxContainer"]
layout_mode = 2
Expand Down Expand Up @@ -74,6 +70,3 @@ text = "Click Me!"
[node name="InspectorRect" type="InspectorRect" parent="HSplitContainer" node_paths=PackedStringArray("html_rect")]
html_rect = NodePath("../VBoxContainer/HtmlRect")
layout_mode = 2
mouse_filter = 0
mouse_force_pass_scroll_events = false
expand_mode = 1
7 changes: 7 additions & 0 deletions src/view_rect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ using namespace godot;

ViewRect::ViewRect()
{
// #region Set default values.
set_expand_mode(TextureRect::ExpandMode::EXPAND_IGNORE_SIZE);
set_mouse_filter(MouseFilter::MOUSE_FILTER_STOP);
set_focus_mode(FocusMode::FOCUS_CLICK);
set_force_pass_scroll_events(false);
// #endregion

image = Ref<Image>();

RenderingServer::get_singleton()->connect("frame_post_draw", Callable(this, "render_frame"));
Expand Down

0 comments on commit de7ede2

Please sign in to comment.