Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - n00boxular

Pages: [1]
1
General / Erasing a certain area of a sprite on mouse click
« on: March 29, 2018, 07:37:00 pm »
I have a program that users can "draw" onto the window using color detection (OpenCV). Basically paint, but instead of using the mouse, they draw using hand-held colored discs. The color detection isn't perfect and sometimes there are a couple of spots where there is color drawn onto the screen where the user doesn't want.

The drawing is stored as a sprite.

How would I go around making a function such that, on mouse click, a circle of radius 30px around the mouse is erased? I'm assuming that it would not only erase the sprite that has the user's drawing on it but also the background sprite and I'm not sure how I would get around that either...

2
General / Adding character menu to my game
« on: April 04, 2017, 08:21:19 pm »
Hi,

I've been using OpenCV and SFML for my game. So far, I've implemented a state machine, I have working menus and such. It's been a great learning experience. Other people are working with OpenCV for the actual game itself.

One of the things I need to do it is to implement a "Add a character" option from the main menu. It seems fairly straight forward.

For this task I want the user to enter in a couple of details about a character in separate text boxes, for example:

Name:
Age:
Sex:
Current Illnesses:

Once these are entered, the user clicks submit and the character is added to a list.
On the same screen I want the scroll-able list of characters already added, selecting one and clicking edit, would should the character's stats in the text boxes where the user can edit them and save.

So three textboxes, three buttons (Submit, save, edit) and one list. Should I be using one of the gui libraries like TGUI or would something else be better(easier) for this?


Pages: [1]
anything