Basic Red Triangle#256
Basic Red Triangle#256omckeon merged 11 commits intothoth-tech:usage-examplesfrom huyhuynh2319:Simple-Red-Triangle-Usage-Example
Conversation
✅ Deploy Preview for splashkit-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
breezy-codes
left a comment
There was a problem hiding this comment.
I'm not quite sure on whats happened here. This planner card was for doing -
https://splashkit.io/usage-examples/graphics/#simple-red-triangle
This is just to update the existing usage example by adding the missing files.
…Red_Triangle-opp.cs
…Red_Triangle_top_level.cs
| public class SimpleRedTriangle | ||
| { | ||
| public static void Main() | ||
| { | ||
| new SimpleRedTriangle().Run(); | ||
| } | ||
| public void Run() | ||
| { | ||
| Window _window = new Window("Simple Red Triangle", 800, 600); | ||
|
|
||
| while (!_window.CloseRequested) | ||
| { | ||
| SplashKit.ProcessEvents(); | ||
| _window.Clear(Color.White); | ||
| SplashKit.FillTriangle(Color.Red, 150, 50, 250, 250, 50, 250); | ||
| _window.Refresh(); | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Please review the guide on how to convert from top level to OOP. There should be minimal change to the actual code.
Then correct the code.
public/usage-examples/graphics/draw_triangle/Simple_Red_Triangle.py
Outdated
Show resolved
Hide resolved
| while (!_window.CloseRequested) | ||
| { | ||
| SplashKit.ProcessEvents(); | ||
| _window.Clear(Color.White); | ||
| SplashKit.FillTriangle(Color.Red, 150, 50, 250, 250, 50, 250); | ||
| _window.Refresh(); | ||
| } |
There was a problem hiding this comment.
Also remove the while close not requested, this is not found in the other versions of this code.
breezy-codes
left a comment
There was a problem hiding this comment.
I've left several requests for changes.
In addition these files are incorrectly named, meaning they don't actually come up on the site.
Please ensure you are actually following the documentation on how to do usage examples.
https://thoth-tech.netlify.app/products/splashkit/splashkit-website/usage-examples/01-overview/
|
I did update all the code. Thanks for your feedback. |
public/usage-examples/graphics/fill_triangle/fill_triangle-1-simple.py
Outdated
Show resolved
Hide resolved
public/usage-examples/graphics/fill_triangle/fill_triangle-1-simple.py
Outdated
Show resolved
Hide resolved
public/usage-examples/graphics/fill_triangle/fill_triangle-1-simple-oop.cs
Show resolved
Hide resolved
✅ Deploy Preview for splashkit-usage-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
breezy-codes
left a comment
There was a problem hiding this comment.
Code is now correct, structured correctly and free of errors.
I approve this PR.
omckeon
left a comment
There was a problem hiding this comment.
Make sure to use the same Window name to ensure consistency

Describe the example and what it demonstrates.
The code demonstrates the use of Basic_Red_Triangle
Splashkit Function: Basic_Red_Triangle
Files Included
Usage Example Checks