Browse Source

Merge branch 'marten/boq-chat-name-completion'

closes #2
tickets/02/2/2
rarified 3 years ago
parent
commit
2ab6cdf49f
  1. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp
  2. 25
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp
  3. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h
  4. 10
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMessage/pfGUINotifyMsg.h

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp

@ -101,7 +101,12 @@ void pfGUIDialogNotifyProc::HandleExtendedEvent( pfGUIControlMod *ctrl, UInt32 e
{ {
pfGUIEditBoxMod *edit = pfGUIEditBoxMod::ConvertNoRef( ctrl ); pfGUIEditBoxMod *edit = pfGUIEditBoxMod::ConvertNoRef( ctrl );
if(edit && event == pfGUIEditBoxMod::kWantMessageHistoryUp) if(edit != nil && event == pfGUIEditBoxMod::kWantAutocomplete)
{
//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 ); ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kMessageHistoryUp );
} }

25
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp

@ -502,16 +502,21 @@ hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
DoSomething(); // Query WasEscaped() to see if it was escape vs enter DoSomething(); // Query WasEscaped() to see if it was escape vs enter
return true; return true;
} }
else if (key == KEY_UP) else if (key == KEY_TAB)
{ {
// Send notify for python scripts //Send notify for python scripts
HandleExtendedEvent(kWantMessageHistoryUp); HandleExtendedEvent(kWantAutocomplete);
} }
else if (key == KEY_DOWN) else if (key == KEY_UP)
{ {
// Send notify for python scripts // Send notify for python scripts
HandleExtendedEvent(kWantMessageHistoryDown); 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)

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h

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

10
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMessage/pfGUINotifyMsg.h

@ -83,8 +83,9 @@ public:
kFocusChange, // when one of its controls loses focus to another kFocusChange, // when one of its controls loses focus to another
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
kMessageHistoryUp = 9, // up key to scroll back in history kSpecialAction, // meaning depends on control functionality (see below)
kMessageHistoryDown,// down key to scroll forward in history kMessageHistoryUp, // up key to scroll back in history
kMessageHistoryDown,// down key to scroll forward in history
kEndEventList kEndEventList
}; };
@ -99,8 +100,9 @@ public:
// kAction - single click on item(s) // kAction - single click on item(s)
// kEditBox // kEditBox
// kAction - enter key hit // kAction - enter key hit
// kMessageHistoryUp - up key hit // kSpecialAction - tab key hit (for autocompletion on Python side)
// kMessageHistoryDown - down key hit // 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

Loading…
Cancel
Save