mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-26 23:34:58 +02:00
Fixed chat tabs mouse click position
This commit is contained in:
parent
6b602a01ba
commit
018776a8de
@ -682,7 +682,8 @@ Public Class ChatScreen
|
|||||||
|
|
||||||
'First, draw global:
|
'First, draw global:
|
||||||
DrawChatTab(100, "global", HasNewGlobalMessages, globalText, ChatState = ChatStates.Global)
|
DrawChatTab(100, "global", HasNewGlobalMessages, globalText, ChatState = ChatStates.Global)
|
||||||
If p.X >= 100 And p.X < 100 + 48 + globalTextWidth Then
|
|
||||||
|
If New Rectangle(100, CInt(Core.windowSize.Height - 50), 48 + globalTextWidth, 32).Contains(p) Then
|
||||||
canClickOnTab = True
|
canClickOnTab = True
|
||||||
canClickOnTabType = ChatStates.Global
|
canClickOnTabType = ChatStates.Global
|
||||||
canClickOnTabText = "Global"
|
canClickOnTabText = "Global"
|
||||||
@ -694,7 +695,7 @@ Public Class ChatScreen
|
|||||||
If HasCommandChat = True Then
|
If HasCommandChat = True Then
|
||||||
DrawChatTab(x + 100, "command", False, commandsText, ChatState = ChatStates.Command)
|
DrawChatTab(x + 100, "command", False, commandsText, ChatState = ChatStates.Command)
|
||||||
x += CInt(48 + commandsTextWidth)
|
x += CInt(48 + commandsTextWidth)
|
||||||
If p.X >= CInt(100 + 48 + globalTextWidth) And p.X < CInt(100 + 48 + globalTextWidth + 48 + commandsTextWidth) Then
|
If New Rectangle(100 + 48 + globalTextWidth, CInt(Core.windowSize.Height - 50), 48 + globalTextWidth + 48 + commandsTextWidth, 32).Contains(p) Then
|
||||||
canClickOnTab = True
|
canClickOnTab = True
|
||||||
canClickOnTabType = ChatStates.Command
|
canClickOnTabType = ChatStates.Command
|
||||||
canClickOnTabText = "Commands"
|
canClickOnTabText = "Commands"
|
||||||
@ -706,8 +707,7 @@ Public Class ChatScreen
|
|||||||
For i = 0 To PMChats.Count - 1
|
For i = 0 To PMChats.Count - 1
|
||||||
If Core.ServersManager.PlayerCollection.HasPlayer(PMChats.Keys(i)) = True Then
|
If Core.ServersManager.PlayerCollection.HasPlayer(PMChats.Keys(i)) = True Then
|
||||||
tabWidth = DrawChatTab(x + 100, "pm", PMChats.Values(i), PMChats.Keys(i), ChatState = ChatStates.PM And PMChats.Keys(i) = CurrentPMChat)
|
tabWidth = DrawChatTab(x + 100, "pm", PMChats.Values(i), PMChats.Keys(i), ChatState = ChatStates.PM And PMChats.Keys(i) = CurrentPMChat)
|
||||||
|
If New Rectangle(100 + x, CInt(Core.windowSize.Height - 50), x + tabWidth, 32).Contains(p) Then
|
||||||
If p.X >= 100 + x And p.X < 100 + x + tabWidth Then
|
|
||||||
canClickOnTab = True
|
canClickOnTab = True
|
||||||
canClickOnTabType = ChatStates.PM
|
canClickOnTabType = ChatStates.PM
|
||||||
canClickOnTabText = PMChats.Keys(i)
|
canClickOnTabText = PMChats.Keys(i)
|
||||||
@ -717,7 +717,7 @@ Public Class ChatScreen
|
|||||||
Else
|
Else
|
||||||
tabWidth = DrawChatTab(x + 100, "pmoff", PMChats.Values(i), PMChats.Keys(i), ChatState = ChatStates.PM And PMChats.Keys(i) = CurrentPMChat)
|
tabWidth = DrawChatTab(x + 100, "pmoff", PMChats.Values(i), PMChats.Keys(i), ChatState = ChatStates.PM And PMChats.Keys(i) = CurrentPMChat)
|
||||||
|
|
||||||
If p.X >= 100 + x And p.X < 100 + x + tabWidth Then
|
If New Rectangle(100 + x, CInt(Core.windowSize.Height - 50), x + tabWidth, 32).Contains(p) Then
|
||||||
canClickOnTab = True
|
canClickOnTab = True
|
||||||
canClickOnTabType = ChatStates.PM
|
canClickOnTabType = ChatStates.PM
|
||||||
canClickOnTabText = PMChats.Keys(i)
|
canClickOnTabText = PMChats.Keys(i)
|
||||||
@ -727,7 +727,7 @@ Public Class ChatScreen
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If p.Y < Core.windowSize.Height - 114 Or p.Y >= Core.windowSize.Height - 82 Then
|
If p.Y < Core.windowSize.Height - 114 Then
|
||||||
canClickOnTab = False
|
canClickOnTab = False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user