implementation for getText
This commit is contained in:
parent
f74e9dfdb4
commit
660413ea7f
@ -47,7 +47,7 @@ void Input::updateEvents(){
|
||||
break;
|
||||
case sf::Event::TextEntered:
|
||||
c = (char) event.text.unicode;
|
||||
m_buffer.append(&c);
|
||||
m_buffer.push_back(c);
|
||||
break;
|
||||
case sf::Event::KeyPressed:
|
||||
m_actions.push_back(kb.getPressedAction(event.key.code));
|
||||
@ -152,6 +152,13 @@ float Input::getDeltaVerticalScroll() const
|
||||
return m_delta_vertical_scroll;
|
||||
}
|
||||
|
||||
std::string Input::getText()
|
||||
{
|
||||
std::string t = m_buffer;
|
||||
m_buffer.clear();
|
||||
return t;
|
||||
}
|
||||
|
||||
/* ------ */
|
||||
|
||||
void Input::test()
|
||||
|
@ -18,6 +18,7 @@ struct Binding{
|
||||
int type;
|
||||
};
|
||||
|
||||
//write a function to add new Binding?
|
||||
class IKeysMap{
|
||||
public:
|
||||
enum {PRESSED, RELEASED, HOLD};
|
||||
|
Loading…
x
Reference in New Issue
Block a user