2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-15 10:54:18 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
036a5a21b1 Merge branch 'marten/Noikas-horplus-field-of-view' 2021-04-09 19:33:18 -06:00
a212105067 Pull of marten port of field of view improvements from Hoikas.
Merge commit 'b08521425bfbeff4c8a0a120d7fa5f27e0694bb6' into marten/Noikas-horplus-field-of-view
2021-04-09 19:23:47 -06:00
b08521425b More aspect ratio fixes from Hoikas and Deledrius
ultrawide: 2dc3d527d4
fullscreen default: 7519fe403b
voice chat icon: 060c710ab5
gui screenshots fix (aspect ratio parts ONLY):
c4e10aa11b
2021-04-07 15:36:47 -07:00
874a38b351 Merge branch 'marten/boq-chat-name-completion'
closes #2
closes #3 (was closed earlier but mis-spelt closes)
2021-03-27 16:33:44 -06:00
feb0434f25 Fixed error in merge. 2021-03-27 16:32:05 -06:00
2ab6cdf49f Merge branch 'marten/boq-chat-name-completion'
closes #2
2021-03-27 16:05:12 -06:00
a984b1159f chat name completion by boq
2807fb455b
2021-03-13 20:48:48 -08:00
7 changed files with 49 additions and 20 deletions

View File

@ -2265,8 +2265,6 @@ void plClient::IDetectAudioVideoSettings()
if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DRefDev) if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DRefDev)
refDevice = true; refDevice = true;
plPipeline::fDefaultPipeParams.Width = hsG3DDeviceSelector::kDefaultWidth;
plPipeline::fDefaultPipeParams.Height = hsG3DDeviceSelector::kDefaultHeight;
plPipeline::fDefaultPipeParams.ColorDepth = hsG3DDeviceSelector::kDefaultDepth; plPipeline::fDefaultPipeParams.ColorDepth = hsG3DDeviceSelector::kDefaultDepth;
#if defined(HS_DEBUGGING) || defined(DEBUG) #if defined(HS_DEBUGGING) || defined(DEBUG)
plPipeline::fDefaultPipeParams.Windowed = true; plPipeline::fDefaultPipeParams.Windowed = true;
@ -2274,6 +2272,18 @@ void plClient::IDetectAudioVideoSettings()
plPipeline::fDefaultPipeParams.Windowed = false; plPipeline::fDefaultPipeParams.Windowed = false;
#endif #endif
// Use current desktop resolution for fullscreen mode
if(!plPipeline::fDefaultPipeParams.Windowed)
{
plPipeline::fDefaultPipeParams.Width = GetSystemMetrics(SM_CXSCREEN);
plPipeline::fDefaultPipeParams.Height = GetSystemMetrics(SM_CYSCREEN);
}
else
{
plPipeline::fDefaultPipeParams.Width = hsG3DDeviceSelector::kDefaultWidth;
plPipeline::fDefaultPipeParams.Height = hsG3DDeviceSelector::kDefaultHeight;
}
plPipeline::fDefaultPipeParams.Shadows = 0; plPipeline::fDefaultPipeParams.Shadows = 0;
// enable shadows if TnL is available, meaning not an intel extreme. // enable shadows if TnL is available, meaning not an intel extreme.
if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DTnLHalDev) if(rec->GetG3DHALorHEL() == hsG3DDeviceSelector::kHHD3DTnLHalDev)

View File

@ -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 );
} }

View File

@ -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)

View File

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

View File

@ -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

View File

@ -86,7 +86,7 @@ plVoiceRecorder::plVoiceRecorder()
plPlateManager::Instance().CreatePlate( &fDisabledIcon ); plPlateManager::Instance().CreatePlate( &fDisabledIcon );
fDisabledIcon->CreateFromResource( MICROPHONE ); fDisabledIcon->CreateFromResource( MICROPHONE );
fDisabledIcon->SetPosition(-0.90, -0.90); fDisabledIcon->SetPosition(-0.90, -0.90);
fDisabledIcon->SetSize(0.0675, 0.09); fDisabledIcon->SetSize(0.064, 0.064, true);
fDisabledIcon->SetVisible(false); fDisabledIcon->SetVisible(false);
plPlateManager::Instance().CreatePlate( &fTalkIcon ); plPlateManager::Instance().CreatePlate( &fTalkIcon );
@ -210,13 +210,16 @@ void plVoiceRecorder::DrawDisabledIcon(hsBool b)
{ {
fDisabledIcon->CreateFromResource( MICROPHONE ); fDisabledIcon->CreateFromResource( MICROPHONE );
fDisabledIcon->SetPosition(-0.90, -0.90); fDisabledIcon->SetPosition(-0.90, -0.90);
fDisabledIcon->SetSize(0.0675, 0.09); fDisabledIcon->SetSize(0.064, 0.064, true);
fDisabledIcon->SetVisible(false); fDisabledIcon->SetVisible(false);
} }
} }
if (fDisabledIcon) if (fDisabledIcon)
{
fDisabledIcon->SetSize(0.064, 0.064, true); // Re-compute plate size in case the aspect ratio has changed.
fDisabledIcon->SetVisible(b); fDisabledIcon->SetVisible(b);
}
} }
void plVoiceRecorder::DrawTalkIcon(hsBool b) void plVoiceRecorder::DrawTalkIcon(hsBool b)
@ -227,13 +230,14 @@ void plVoiceRecorder::DrawTalkIcon(hsBool b)
if (fTalkIcon) if (fTalkIcon)
{ fTalkIcon->CreateFromResource( TALKING ); { fTalkIcon->CreateFromResource( TALKING );
fTalkIcon->SetPosition(-0.9,-0.9); fTalkIcon->SetPosition(-0.9,-0.9);
fTalkIcon->SetSize(0.0675, 0.09); fTalkIcon->SetSize(0.064, 0.064, true);
fTalkIcon->SetVisible(false); fTalkIcon->SetVisible(false);
} }
} }
if (fTalkIcon) if (fTalkIcon)
{ {
fTalkIcon->SetSize(0.064, 0.064, true); // Re-compute plate size in case the aspect ratio has changed.
fTalkIcon->SetVisible(b); fTalkIcon->SetVisible(b);
} }
} }

View File

@ -91,6 +91,7 @@ void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
SetClearDepth(1); SetClearDepth(1);
// render all GUI items // render all GUI items
pfGameGUIMgr::GetInstance()->SetAspectRatio((float)fRenderTarget->GetWidth() / (float)fRenderTarget->GetHeight());
std::vector<plPostEffectMod*> guiRenderMods = pfGameGUIMgr::GetInstance()->GetDlgRenderMods(); std::vector<plPostEffectMod*> guiRenderMods = pfGameGUIMgr::GetInstance()->GetDlgRenderMods();
for (int i = (int)guiRenderMods.size() - 1; i >= 0; i--) // render in reverse, so dialogs on the bottom get rendered first for (int i = (int)guiRenderMods.size() - 1; i >= 0; i--) // render in reverse, so dialogs on the bottom get rendered first
{ {
@ -104,6 +105,7 @@ void plCaptureRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
pipe->PopRenderRequest(this); pipe->PopRenderRequest(this);
} }
} }
pfGameGUIMgr::GetInstance()->SetAspectRatio((float)pipe->Width() / (float)pipe->Height());
// Callback on plCaptureRender to process the render target into a mipmap // Callback on plCaptureRender to process the render target into a mipmap
// and send it back to the requester. // and send it back to the requester.