mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-28 05:11:37 +00:00
message_window: only accept mouse click if option is selected
This commit is contained in:
parent
82fdf2ed1b
commit
56153cb60a
1 changed files with 3 additions and 1 deletions
|
|
@ -241,6 +241,8 @@ void MessageWindow::Draw()
|
|||
auto clipRectMin = drawList->GetClipRectMin();
|
||||
auto clipRectMax = drawList->GetClipRectMax();
|
||||
|
||||
g_selectedRowIndex = -1;
|
||||
|
||||
for (int i = 0; i < rowCount; i++)
|
||||
{
|
||||
ImVec2 itemMin = { clipRectMin.x + windowMarginX, clipRectMin.y + windowMarginY + itemHeight * i };
|
||||
|
|
@ -251,7 +253,7 @@ void MessageWindow::Draw()
|
|||
}
|
||||
}
|
||||
|
||||
if (isAccepted)
|
||||
if (g_selectedRowIndex != -1 && isAccepted)
|
||||
{
|
||||
g_result = g_selectedRowIndex;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue