mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Implement chat history browsing (Client and Python)
This commit is contained in:
@ -105,6 +105,14 @@ void pfGUIDialogNotifyProc::HandleExtendedEvent( pfGUIControlMod *ctrl, uint32_t
|
|||||||
//send notify, somebody will do something with that (like python script)
|
//send notify, somebody will do something with that (like python script)
|
||||||
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kSpecialAction );
|
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 )
|
void pfGUIDialogNotifyProc::OnInit( void )
|
||||||
|
@ -335,11 +335,11 @@ bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
|
|||||||
{
|
{
|
||||||
fFirstHalfExitKeyPushed = false;
|
fFirstHalfExitKeyPushed = false;
|
||||||
// Use arrow keys to do our dirty work
|
// Use arrow keys to do our dirty work
|
||||||
if( key == KEY_UP || key == KEY_HOME )
|
if( key == KEY_HOME )
|
||||||
{
|
{
|
||||||
SetCursorToHome();
|
SetCursorToHome();
|
||||||
}
|
}
|
||||||
else if( key == KEY_DOWN || key == KEY_END )
|
else if( key == KEY_END )
|
||||||
{
|
{
|
||||||
SetCursorToEnd();
|
SetCursorToEnd();
|
||||||
}
|
}
|
||||||
@ -381,9 +381,19 @@ bool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
|
|||||||
}
|
}
|
||||||
else if (key == KEY_TAB)
|
else if (key == KEY_TAB)
|
||||||
{
|
{
|
||||||
//Send notify for python scripts
|
// Send notify for python scripts
|
||||||
HandleExtendedEvent(kWantAutocomplete);
|
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)
|
else if (modifiers & pfGameGUIMgr::kCtrlDown)
|
||||||
{
|
{
|
||||||
if (key == KEY_C)
|
if (key == KEY_C)
|
||||||
|
@ -129,7 +129,9 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
|||||||
enum ExtendedEvents
|
enum ExtendedEvents
|
||||||
{
|
{
|
||||||
kValueChanging,
|
kValueChanging,
|
||||||
kWantAutocomplete
|
kWantAutocomplete,
|
||||||
|
kWantMessageHistoryUp,
|
||||||
|
kWantMessageHistoryDown
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,6 +84,8 @@ public:
|
|||||||
kExitMode, // GUI Exit Mode key was pressed
|
kExitMode, // GUI Exit Mode key was pressed
|
||||||
kInterestingEvent, // GUI interesting-ness has changed
|
kInterestingEvent, // GUI interesting-ness has changed
|
||||||
kSpecialAction, // meaning depends on control functionality (see below)
|
kSpecialAction, // meaning depends on control functionality (see below)
|
||||||
|
kMessageHistoryUp, // up key to scroll back in history
|
||||||
|
kMessageHistoryDown,// down key to scroll forward in history
|
||||||
kEndEventList
|
kEndEventList
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -99,6 +101,8 @@ public:
|
|||||||
// kEditBox
|
// kEditBox
|
||||||
// kAction - enter key hit
|
// kAction - enter key hit
|
||||||
// kSpecialAction - tab key hit (for autocompletion on Python side)
|
// kSpecialAction - tab key hit (for autocompletion on Python side)
|
||||||
|
// kMessageHistoryUp - up key hit
|
||||||
|
// kMessageHistoryDown - down key hit
|
||||||
// kUpDownPair
|
// kUpDownPair
|
||||||
// kValueChanged - the value of the pair has been changed
|
// kValueChanged - the value of the pair has been changed
|
||||||
// kKnob
|
// kKnob
|
||||||
|
Reference in New Issue
Block a user