Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D : Simple mouse drawing demo #38

Closed
wants to merge 1 commit into from
Closed

Conversation

zvodd
Copy link

@zvodd zvodd commented Apr 19, 2017

No description provided.

@pwab
Copy link

pwab commented Jul 17, 2017

Works great for me. 👍
I have two points to add:

  • It would be nice, if the clicks generate a cirle or rect at the clicked position (the starting and ending points). This would imitate the behaviour of most vector programs.
  • Could this demo be expanded with the possibility to manually draw and erase dots? This would lead to a simple paint-like program.

@@ -0,0 +1,57 @@
extends Node2D

const line_width = 10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about coding conventions for gdscript, but constants should be named in CAPS.

# Creates 2 points each for start and end point of a line;
# these points make up the corners of the rectangle that is the line representation.

width = width / 2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here should be a short comment, what this line means.

@aaronfranke
Copy link
Member

Superseded by #89, this should be closed.

@akien-mga
Copy link
Member

Thanks, closing as superseded by #89 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants