diff --git a/src/editors/xrECore/Core/ELog.cpp b/src/editors/xrECore/Core/ELog.cpp index 68363d95efa..c0548929fd6 100644 --- a/src/editors/xrECore/Core/ELog.cpp +++ b/src/editors/xrECore/Core/ELog.cpp @@ -12,10 +12,20 @@ XRECORE_API void ELogCallback(void* context, pcstr message) return; bool isDialog = false; - MessageType type = MessageType::Information; + MessageType type; switch (message[0]) { + case '*': + type = MessageType::Information; + message++; + break; + + case '~': + type = MessageType::Warning; + message++; + break; + case '!': type = MessageType::Error; message++; @@ -26,6 +36,20 @@ XRECORE_API void ELogCallback(void* context, pcstr message) type = MessageType::Confirmation; message++; break; + + case '@': + type = MessageType::UserInput; + message++; + break; + + case '-': + type = MessageType::Confirmation; + message++; + break; + + default: + type = MessageType::Custom; + break; } auto windowLog = safe_cast(Form::FromHandle(IntPtr(context))); diff --git a/src/editors/xrECore/Core/ELog.h b/src/editors/xrECore/Core/ELog.h index 3b5aa58f32d..c60ecede0d5 100644 --- a/src/editors/xrECore/Core/ELog.h +++ b/src/editors/xrECore/Core/ELog.h @@ -2,10 +2,11 @@ enum class MessageType { - Information, - Warning, - Error, - Confirmation, + Information, // * + Warning, // ~ + Error, // ! + Confirmation, // #, - + UserInput, // @ Custom }; diff --git a/src/editors/xrECore/Windows/WindowLog.cpp b/src/editors/xrECore/Windows/WindowLog.cpp index 0e4c57ea705..83159ea1441 100644 --- a/src/editors/xrECore/Windows/WindowLog.cpp +++ b/src/editors/xrECore/Windows/WindowLog.cpp @@ -18,8 +18,12 @@ void WindowLog::AddMessage(MessageType type, System::String^ message) switch (type) { + case MessageType::Information: + newMessage->BackColor = Color::LightGray; + break; + case MessageType::Warning: - newMessage->BackColor = Color::Yellow; + newMessage->BackColor = Color::LightGoldenrodYellow; break; case MessageType::Error: @@ -30,12 +34,13 @@ void WindowLog::AddMessage(MessageType type, System::String^ message) newMessage->BackColor = Color::LightGreen; break; - case MessageType::Custom: - newMessage->BackColor = Color::LightYellow; + case MessageType::UserInput: + newMessage->BackColor = Color::LightBlue; break; } logList->Items->Add(newMessage); + newMessage->EnsureVisible(); if (type == MessageType::Error) Focus(); @@ -64,7 +69,7 @@ System::Void WindowLog::buttonClearSelected_Click(System::Object^ sender, System System::Void WindowLog::logList_Resize(System::Object^ sender, System::EventArgs^ e) { - columnHeader1->Width = logList->Size.Width; + columnHeader1->AutoResize(ColumnHeaderAutoResizeStyle::HeaderSize); } System::Void WindowLog::LogForm_Closing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) diff --git a/src/editors/xrECore/Windows/WindowLog.h b/src/editors/xrECore/Windows/WindowLog.h index 33305b122b5..554978d3aa7 100644 --- a/src/editors/xrECore/Windows/WindowLog.h +++ b/src/editors/xrECore/Windows/WindowLog.h @@ -110,7 +110,7 @@ private: System::Windows::Forms::Button^ buttonFlush; this->logList->UseCompatibleStateImageBehavior = false; this->logList->View = System::Windows::Forms::View::Details; this->logList->Resize += gcnew System::EventHandler(this, &WindowLog::logList_Resize); - this->columnHeader1->Width = 121; + this->columnHeader1->Width = 333; this->buttonClose->Location = System::Drawing::Point(0, 0); this->buttonClose->Name = L"buttonClose"; this->buttonClose->Size = System::Drawing::Size(85, 23);