Skip to content

Commit

Permalink
updated the readme file
Browse files Browse the repository at this point in the history
I updated the README.md file and corrected some comments.
  • Loading branch information
atadenizoktay committed Apr 6, 2023
1 parent 5411227 commit e8ee361
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Godot Click Through Transparent Window
This is a demo project for the Godot Engine that features a transparent window with click-through capability and a Godot icon that moves randomly when clicked.

*This branch is compatible with Godot 3.5.2 LTS version. For the version that supports Godot 4, please check the `godot-4` branch.*
## Screenshots
![GIF](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExOTQ3MjM3MTYxN2EyYWY1MjQ3NmZhOTg5YTI5ZGExZjlkZTExYjRjNyZjdD1n/n2B0EPwIOxKJWTq5qy/giphy.gif)
## Usage
Expand Down
5 changes: 3 additions & 2 deletions src/Scripts/Canvas.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ func _update_size_settings() -> void:


func _update_transparency_settings() -> void:
# Enabling Per Pixel Transparency -> Allowed through code doesn't seem to
# work correctly. Make sure to enable it via the Project Settings menu.
# Enabling Per Pixel Transparency -> Allowed through code doesn't work, as
# the global variables ProjectSettings contain aren't updated when changed.
# Make sure to enable it via the Project Settings menu.
# ProjectSettings.set_setting("display/window/per_pixel_transparency/allowed", true)
# OS.set_window_per_pixel_transparency_enabled(true)
# You'll need to change this setting during runtime as it concerns the
Expand Down
3 changes: 1 addition & 2 deletions src/Scripts/Godot.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ func _update_click_polygon() -> void:
OS.set_window_mouse_passthrough(click_polygon)


# A simple function that changes the position of the Godot icon randomly and
# prints "Clicked" when the icon is clicked by the mouse.
# A simple function that changes the position of the Godot icon randomly.
func _on_ClickArea_input_event(_viewport: Node, event: InputEvent,
_shape_idx: int) -> void:
if event is InputEventMouseButton and event.is_pressed():
Expand Down

0 comments on commit e8ee361

Please sign in to comment.