Chat messages
This commit is contained in:
parent
37ba5e51f6
commit
33040259bd
@ -145,7 +145,8 @@ public:
|
||||
|
||||
boost::signal<void(int)> KeyPressedSignal;
|
||||
boost::signal<void(std::string)> SetTextSignal;
|
||||
//boost::signal<void()> PostUpdateSignal;
|
||||
boost::signal<void()> OnKeyboardShowSignal;
|
||||
boost::signal<void()> OnKeyboardHideSignal;
|
||||
|
||||
TGUIManager();
|
||||
|
||||
@ -178,6 +179,8 @@ public:
|
||||
void ShowKeyboard(const std::string text = "");
|
||||
void HideKeyboard();
|
||||
|
||||
bool IsKeyboardOnScreen();
|
||||
|
||||
|
||||
void PrintWidgetList();
|
||||
|
||||
|
@ -108,12 +108,15 @@ void TGUIManager::Update(cardinal dt)
|
||||
|
||||
for (TWidgetArr::iterator i = WidgetArr.begin(); i != WidgetArr.end(); ++i)
|
||||
{
|
||||
i->Widget->Update(dt);
|
||||
//i->Widget->Update(dt);
|
||||
|
||||
if (i->IsMouseDown)
|
||||
{
|
||||
signalMap.push_back((i->SignalMap[CONST_HOLD_SIGNAL_NAME]));
|
||||
}
|
||||
|
||||
i->Widget->Update(dt);
|
||||
|
||||
}
|
||||
|
||||
//Keep this outside since signal may affect WidgetArr
|
||||
@ -455,6 +458,8 @@ void TGUIManager::OnMove(vec2 shift, int touchNumber)
|
||||
|
||||
|
||||
void TGUIManager::ShowKeyboard(const std::string text)
|
||||
{
|
||||
if (!KeyboardIsOnScreen)
|
||||
{
|
||||
#ifdef TARGET_IOS
|
||||
SE::ShowKeyboard(text);
|
||||
@ -465,15 +470,26 @@ void TGUIManager::ShowKeyboard(const std::string text)
|
||||
MoveWidget("Keyboard", vec2(0, 216));
|
||||
KeyboardIsOnScreen = true;
|
||||
}*/
|
||||
|
||||
OnKeyboardShowSignal();
|
||||
KeyboardIsOnScreen = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TGUIManager::HideKeyboard()
|
||||
{
|
||||
if (KeyboardIsOnScreen)
|
||||
{
|
||||
ResourceManager->GUIManager.SetTextSignal.disconnect_all_slots();
|
||||
#ifdef TARGET_IOS
|
||||
SE::HideKeyboard();
|
||||
#endif
|
||||
OnKeyboardHideSignal();
|
||||
OnKeyboardShowSignal.disconnect_all_slots();
|
||||
OnKeyboardHideSignal.disconnect_all_slots();
|
||||
KeyboardIsOnScreen = false;
|
||||
}
|
||||
/*
|
||||
if (KeyboardIsOnScreen)
|
||||
{
|
||||
@ -482,6 +498,11 @@ void TGUIManager::HideKeyboard()
|
||||
}*/
|
||||
}
|
||||
|
||||
bool TGUIManager::IsKeyboardOnScreen()
|
||||
{
|
||||
return KeyboardIsOnScreen;
|
||||
}
|
||||
|
||||
void TGUIManager::PrintWidgetList()
|
||||
{
|
||||
TWidgetArr::iterator i;
|
||||
|
Loading…
Reference in New Issue
Block a user