1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Implement chat history browsing (Client and Python)

This commit is contained in:
Filtik
2014-05-09 20:40:18 +02:00
parent b3d6afc1c1
commit 7d104772fd
4 changed files with 28 additions and 4 deletions

View File

@ -105,6 +105,14 @@ void pfGUIDialogNotifyProc::HandleExtendedEvent( pfGUIControlMod *ctrl, uint32_t
//send notify, somebody will do something with that (like python script)
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kSpecialAction );
}
else if(edit && event == pfGUIEditBoxMod::kWantMessageHistoryUp)
{
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kMessageHistoryUp );
}
else if(edit && event == pfGUIEditBoxMod::kWantMessageHistoryDown)
{
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kMessageHistoryDown );
}
}
void pfGUIDialogNotifyProc::OnInit( void )

View File

@ -335,11 +335,11 @@ bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
{
fFirstHalfExitKeyPushed = false;
// Use arrow keys to do our dirty work
if( key == KEY_UP || key == KEY_HOME )
if( key == KEY_HOME )
{
SetCursorToHome();
}
else if( key == KEY_DOWN || key == KEY_END )
else if( key == KEY_END )
{
SetCursorToEnd();
}
@ -381,9 +381,19 @@ bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
}
else if (key == KEY_TAB)
{
//Send notify for python scripts
// Send notify for python scripts
HandleExtendedEvent(kWantAutocomplete);
}
else if (key == KEY_UP)
{
// Send notify for python scripts
HandleExtendedEvent(kWantMessageHistoryUp);
}
else if (key == KEY_DOWN)
{
// Send notify for python scripts
HandleExtendedEvent(kWantMessageHistoryDown);
}
else if (modifiers & pfGameGUIMgr::kCtrlDown)
{
if (key == KEY_C)

View File

@ -129,7 +129,9 @@ class pfGUIEditBoxMod : public pfGUIControlMod
enum ExtendedEvents
{
kValueChanging,
kWantAutocomplete
kWantAutocomplete,
kWantMessageHistoryUp,
kWantMessageHistoryDown
};
};