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 - _4004

Pages: [1]
1
General / Re: Shape animations
« on: April 30, 2020, 08:33:45 pm »

2
General / Shape animations
« on: April 30, 2020, 04:51:58 pm »
How can I do these using shape? Think of them as the CircleShape vector. What should I use? Should I just do it with code(VertexArray) or is it make with another program?

Like this:


3
General / Re: Effects
« on: April 03, 2020, 07:40:51 pm »
Thank you so much. One last question: Where can I get the api documentation for to practice?

4
General / Re: Effects
« on: April 03, 2020, 12:08:07 pm »
I say what I understand: Plinth is used in two ways: with and without SFML. If I want to use it with SFML to the project, I need to include SFML folder, right? I'm sorry I dont know enough english  :-\.

5
General / Re: Effects
« on: April 02, 2020, 08:16:42 pm »
Oh thanks. I read. But, I couldn't find any information about include in the project in this link: https://github.com/Hapaxia/Plinth/wiki. Do I need to drop the .hpp files in the folder to the main directory of the project?

6
General / Effects
« on: April 02, 2020, 12:53:46 pm »
Hello. I want working with effects(for example: fade effect, opening effect, loading effect, blob effect or any effects). But I want do without the Swoosh lib. What do I need to know for this?

7
General / Re: Event problems.
« on: March 05, 2020, 08:29:29 pm »
OMG. Thank you very much. I wrote the code like this because I was in a hurry. But what I want to tell is this: Watch out for 14th and 28th seconds. Why has the position not changed? Look at the text "clicked" .Thanks again.

https://streamable.com/4xdw2

8
General / Re: Event problems.
« on: March 04, 2020, 09:05:11 pm »
My translation skills are not good. So I will summarize my problem again. Thank you for the answer. If you want to find a solution to the problem, you can help me with an edit on the code. My problem is that if we click the mouse, the position of the circle that randomly changes position does not detect that we click on it if it is in the position immediately after the previous one. I hope I explained.

9
General / Re: Event problems.
« on: March 03, 2020, 11:03:26 pm »
Yes. I read what you say. Thanks but this project was a little urgent. Either I need to pay attention to urgent projects or arrange a little while asking for help because those who have difficulties in understanding do not could to help. Also, as far as I understand from your last sentence, holding the mouse down does not triggered tons of times if in the event loop.

Actually I want to say:
Consider two circles. One of them is moving and the other is constant position. When the moving circle over to the fixed one, you click the mouse and the fixed one teleports to a random position. However, if the incoming position is the next position of the circle, it does not detect when you click. It is necessary to wait for the circle to return one turn.

10
General / Event problems.
« on: March 02, 2020, 08:13:17 pm »
Hello. In the application I am trying to make, I move a circle in certain positions. And there is one blue (anacircle) circle. When we hover over and click on this blue circle, the location of the blue circle will change. Okay, so far, everything is normal. However, when the next position of the blue circle is very close to its previous position and I try to click it, it does not detect the second click. In order to perceive the click, the "gezgin" circle must return one more turn. Why? Sorry for my bad English.

This happens only when I speed up the "gezgin" circle . And I'm sure I clicked, I get output with the cout.

I put their variable names according to my head, they don't represent anything.

Code:
#include "stdafx.h"
#include <SFML/Graphics.hpp>
#include <Windows.h>
#include <iostream>
 
 
using namespace std;;
using namespace sf;;
 
 
 
int main()
{
        sf::RenderWindow window(sf::VideoMode(400, 400), "beta");
 
        sf::CircleShape shape(10.f);
        shape.setFillColor(sf::Color::Green);
        shape.setOrigin(7.f, 10.f);
 
        CircleShape gezgin(10.f);
        gezgin.setFillColor(Color::Red);
        gezgin.setOrigin(7.f, 10.f);
 
        vector <sf::CircleShape> anacircle;
        shape.setPosition(205, 40);
        anacircle.push_back(shape);
        shape.setPosition(286, 62);
        anacircle.push_back(shape);
        shape.setPosition(347, 123);
        anacircle.push_back(shape);
        shape.setPosition(369, 205);
        anacircle.push_back(shape);
        shape.setPosition(348, 287);
        anacircle.push_back(shape);
        shape.setPosition(286, 347);
        anacircle.push_back(shape);
        shape.setPosition(205, 369);
        anacircle.push_back(shape);
        shape.setPosition(122, 347);
        anacircle.push_back(shape);
        shape.setPosition(62, 286);
        anacircle.push_back(shape);
        shape.setPosition(41, 206);
        anacircle.push_back(shape);
        shape.setPosition(64, 124);
        anacircle.push_back(shape);
        shape.setPosition(124, 64);
        anacircle.push_back(shape);
 
        Clock clock;
        int random = 0;
        int que = 0;
        int degis = 0;
        int zamanlayici = 1000;
        while (window.isOpen())
        {
                Event olay;
 
                Time zaman = clock.getElapsedTime();
                int speed = zaman.asMilliseconds();
 
                if (que == 0)
                {
                        random = rand() % 11;
                        cout << random << endl;
                        que = 1;
                        anacircle[random].setFillColor(Color::Cyan);
                }
 
                if (speed >= zamanlayici)
                {
                        clock.restart();
                        degis++;
                        if (degis == 12)
                                degis = 0;
 
                }
                for (int i = 0; i < 12; i++) {
                       
                        if (degis == i) {
                                gezgin.setPosition(anacircle[i].getPosition().x, anacircle[i].getPosition().y);
                               
                       
                        }
 
                        else if (zaman.asMilliseconds() >= 12000)
                        clock.restart();
 
        }
 
 
                sf::Event event;
                while (window.pollEvent(event))
                {
                       
                        //      if (event.type == sf::Event::MouseButtonPressed)
                //      {
                        //      if (event.mouseButton.button == sf::Mouse::Left){
                        if(Mouse::isButtonPressed(Mouse::Left)){
                                        if (gezgin.getPosition().x == anacircle[random].getPosition().x && gezgin.getPosition().y == anacircle[random].getPosition().y) {
 
                                                que = 0;
                                                anacircle[random].setFillColor(Color::Green);
//
                                        }
                           }
                        //      if (event.mouseButton.button == sf::Mouse::Right)
                                                if(Mouse::isButtonPressed(Mouse::Right))
                                {
                                        if (zamanlayici <= 100)
                                                zamanlayici -= 10;
 
                                        else
                                                zamanlayici -= 100;;
                                        cout << zamanlayici << endl;
                                }
                       
                        if (event.type == sf::Event::Closed)
                                window.close();
                }
 
 
                window.clear();        
                for (int i = 0; i < anacircle.size(); i++) {
                        window.draw(anacircle[i]);
 
                }
                window.draw(gezgin);
                window.display();
 
 
        }
 
 
        return 0;
}

11
General / Re: Run any computer.
« on: May 02, 2019, 07:58:05 pm »
Yes I chose 64 bit. I'm sure of that.

12
General / Run any computer.
« on: May 02, 2019, 12:47:26 pm »
Hello there. I did interface design with tgui to get rid of the console screen. On the console screen (project version 1) I played without any errors. I made this project with vs2013. When I switch to vs2017(project version 2), I can't play it myself but on other computers (64bit computer) my project. Error code: 0xc000007b.

ucrtbased.dll missing, I copied to project location after the download file.
vcruntime140d.dll missing, i copied to project location after the download file.
After 2 file copied error code: 0xc000007b.
Why?


Pages: [1]