|
|
@@ -376,10 +376,9 @@ void Console::HandleTextFinished(StringHash eventType, VariantMap& eventData)
|
|
|
// Send the command as an event for script subsystem
|
|
|
using namespace ConsoleCommand;
|
|
|
|
|
|
- VariantMap& newEventData = GetEventDataMap();
|
|
|
- newEventData[P_COMMAND] = line;
|
|
|
- newEventData[P_ID] = static_cast<Text*>(interpreters_->GetSelectedItem())->GetText();
|
|
|
- SendEvent(E_CONSOLECOMMAND, newEventData);
|
|
|
+ SendEvent(E_CONSOLECOMMAND,
|
|
|
+ P_COMMAND, line,
|
|
|
+ P_ID, static_cast<Text*>(interpreters_->GetSelectedItem())->GetText());
|
|
|
|
|
|
// Make sure the line isn't the same as the last one
|
|
|
if (history_.Empty() || line != history_.Back())
|
|
|
@@ -436,7 +435,7 @@ void Console::HandleLineEditKey(StringHash eventType, VariantMap& eventData)
|
|
|
historyPosition_ = history_.Size();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// If no more auto complete options and history options left
|
|
|
if (autoCompletePosition_ == autoComplete_.Size() && historyPosition_ > 0)
|
|
|
{
|
|
|
@@ -568,7 +567,7 @@ void Console::HandlePostUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
rowContainer_->RemoveItem((unsigned)0);
|
|
|
text = new Text(context_);
|
|
|
text->SetText(pendingRows_[i].second_);
|
|
|
-
|
|
|
+
|
|
|
// Highlight console messages based on their type
|
|
|
text->SetStyle(logStyles[pendingRows_[i].first_]);
|
|
|
|