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

Pages: [1]
1
Window / Re: Textbox in Window
« on: March 20, 2016, 12:17:22 am »
It's a bit crude and requires an overhaul, but it does the job.

Help ?

2
Window / Re: Textbox in Window
« on: March 20, 2016, 12:05:46 am »
n the code you sent me, could you explain to me the second part ?
you see i am using a generic code by having a Interface class. Everybody inherits it.
I have a TextBox class with :
class TextBox : public IObject
  20 {
  21   private:
  22    int                   _x;
  23    int                   _y;
  24    int                   _height;
  25    int                   _width;
  26    int                   _type;
  27    bool                  _isVisible;
  28    bool                  _isConcerned;
  29    std::string           _color;
  30    sf::RectangleShape    *_box;
  31    sf::Font              *_font;
  32    sf::Text              *_text;


i have a CreateObject() function and a DrawObject() function for each classes (objects). How do i apply your code to my class ?

3
Window / Re: Textbox in Window
« on: March 19, 2016, 11:29:38 pm »
Thank you very much, i have to modify it a little but THANK YOU SO MUCH :')

4
Window / Re: Textbox in Window
« on: March 19, 2016, 10:58:38 pm »
Do you know how to use the TextEntered event? http://www.sfml-dev.org/tutorials/2.3/window-events.php#the-textentered-event
Do you know how to draw a rectangle? http://www.sfml-dev.org/tutorials/2.3/graphics-shape.php
Do you know how to draw a string? http://www.sfml-dev.org/tutorials/2.3/graphics-text.php

Entire day, seriously? oO

I did the rectangle and the string that is the not the issue, i did everything needed. The only thing missing is the text entered and NO i don't know how to use it otherwise I wouldn't be here begging for help now would I

5
Window / Re: Textbox in Window
« on: March 19, 2016, 10:50:02 pm »
Also sounds like you're looking for something like SFGUI (?)

Pretty much yeah, i can handle about 80% of the project, but the keyboard input has taken me my entire day and it STILL doesn't work.... i am at the end of my rope here, please help me

6
Window / Re: Textbox in Window
« on: March 19, 2016, 10:48:01 pm »
Thank you for clearing that up... But now that we got that out of the way can you help me create said object ? Just the keyboard input of the alphabet please ? i desperately need it

7
Window / Textbox in Window
« on: March 19, 2016, 10:24:44 pm »
Hello, i am trying to create a Textbox (rectangle shape in which i can type text DIRECTLY in the window), and i keep trying to use window.getinput() yet in version 2.3 i seem to either using it wrong OR it doesn't exist... Can you please help me create this TextBox?
I already have the mouse detection (i know IF i am in the rectangle on the screen) i simply need the while () loop to create it... please i have been at it all day

8
General / Mouse isButtonReleased
« on: March 18, 2016, 11:54:31 pm »
I need to use the mouse to launch certain events and animation in my school project using SFML 2.3. In the sf::Mouse class documnentation you mention the MouseButtonReleased in this exact context :
"Compared to the MouseMoved, MouseButtonPressed and MouseButtonReleased events, sf::Mouse can retrieve the state of the cursor and the buttons at any time (you don't need to store and update a boolean on your side in order to know if a button is pressed or released), and you always get the real state of the mouse, even if it is moved, pressed or released when your window is out of focus and no event is triggered."

BUT there doesn't exist a method isButtonReleased like there is a isButtonPressed...... WHY ? I need that method !

Pages: [1]
anything