Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ricky
MDPro3
Commits
f5512878
Commit
f5512878
authored
Apr 29, 2024
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mouse wheel response horizontal scrollbar
parent
4e75be13
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
3 deletions
+67
-3
Assets/Prefabs/PopupDuelSelectCard.prefab
Assets/Prefabs/PopupDuelSelectCard.prefab
+14
-0
Assets/Scripts/MDPro3/Duel/TcpHelper.cs
Assets/Scripts/MDPro3/Duel/TcpHelper.cs
+1
-1
Assets/Scripts/MDPro3/Managers/MessageManager.cs
Assets/Scripts/MDPro3/Managers/MessageManager.cs
+12
-0
Assets/Scripts/MDPro3/Servants/OcgCore.cs
Assets/Scripts/MDPro3/Servants/OcgCore.cs
+1
-0
Assets/Scripts/MDPro3/Servants/Room.cs
Assets/Scripts/MDPro3/Servants/Room.cs
+3
-2
Assets/Scripts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs
...Scripts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs
+25
-0
Assets/Scripts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs.meta
...ts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs.meta
+11
-0
No files found.
Assets/Prefabs/PopupDuelSelectCard.prefab
View file @
f5512878
...
...
@@ -2002,6 +2002,7 @@ GameObject:
-
component
:
{
fileID
:
9149400914606224882
}
-
component
:
{
fileID
:
9149400914606224885
}
-
component
:
{
fileID
:
9149400914606224884
}
-
component
:
{
fileID
:
8212829223627264905
}
m_Layer
:
5
m_Name
:
Scroll View
m_TagString
:
Untagged
...
...
@@ -2098,6 +2099,19 @@ MonoBehaviour:
m_OnValueChanged
:
m_PersistentCalls
:
m_Calls
:
[]
---
!u!114
&8212829223627264905
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
9149400914606224886
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
2def38340b4d0bd4495d41c98270e6fe
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
scrollSensitivity
:
0.3
---
!u!1
&9149400914617502442
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scripts/MDPro3/Duel/TcpHelper.cs
View file @
f5512878
...
...
@@ -52,7 +52,7 @@ namespace MDPro3
}
catch
(
Exception
e
)
{
Debug
.
LogError
(
"JoinError: "
+
e
)
;
MessageManager
.
messageFromSubString
=
"JoinError: "
+
e
;
}
canJoin
=
true
;
}
...
...
Assets/Scripts/MDPro3/Managers/MessageManager.cs
View file @
f5512878
...
...
@@ -18,6 +18,9 @@ namespace MDPro3
static
List
<
GameObject
>
items
=
new
List
<
GameObject
>();
static
readonly
float
transitionTime
=
0.3f
;
static
readonly
float
existTime
=
3f
;
public
static
string
messageFromSubString
=
string
.
Empty
;
public
override
void
Initialize
()
{
base
.
Initialize
();
...
...
@@ -33,6 +36,15 @@ namespace MDPro3
messageCard
=
result
.
Result
;
};
}
public
override
void
PerFrameFunction
()
{
base
.
PerFrameFunction
();
if
(
messageFromSubString
!=
string
.
Empty
)
{
Cast
(
messageFromSubString
);
messageFromSubString
=
string
.
Empty
;
}
}
public
void
CastCard
(
int
code
)
{
...
...
Assets/Scripts/MDPro3/Servants/OcgCore.cs
View file @
f5512878
...
...
@@ -2604,6 +2604,7 @@ namespace MDPro3
messagePass = false;
int playerType = r.ReadByte();
isFirst = (playerType & 0xF) == 0;
Room.coreShowing = true;
isObserver = (playerType & 0xF0) > 0;
if (r.BaseStream.Length > 17)
MasterRule = r.ReadByte();
...
...
Assets/Scripts/MDPro3/Servants/Room.cs
View file @
f5512878
...
...
@@ -63,7 +63,7 @@ namespace MDPro3
public
static
bool
fromSolo
;
public
static
bool
soloLockHand
;
public
static
bool
fromLocalHost
;
public
static
bool
coreShowing
;
public
class
Player
{
public
string
name
=
""
;
...
...
@@ -150,6 +150,7 @@ namespace MDPro3
public
override
void
Show
(
int
preDepth
)
{
base
.
Show
(
preDepth
);
coreShowing
=
false
;
ChatOn
(
transitionTime
);
Program
.
I
().
ocgcore
.
handler
=
Handler
;
deckName
.
text
=
Config
.
Get
(
"DeckInUse"
,
"@ui"
);
...
...
@@ -405,7 +406,7 @@ namespace MDPro3
}
void
AddChatItem
(
int
player
,
string
content
)
{
if
(
Program
.
I
().
ocgcore
.
isShowed
&&
player
<
4
)
if
(
coreShowing
&&
player
<
4
)
{
if
(
mode
!=
2
)
{
...
...
Assets/Scripts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs
0 → 100644
View file @
f5512878
using
UnityEngine
;
using
UnityEngine.UI
;
using
UnityEngine.EventSystems
;
namespace
MDPro3.UI
{
[
RequireComponent
(
typeof
(
ScrollRect
))]
public
class
HorizontalScrollbarMouseWheel
:
MonoBehaviour
,
IScrollHandler
{
Scrollbar
scrollbar
;
public
float
scrollSensitivity
=
0.3f
;
void
Start
()
{
scrollbar
=
GetComponent
<
ScrollRect
>().
horizontalScrollbar
;
}
public
void
OnScroll
(
PointerEventData
eventData
)
{
float
scrollDelta
=
eventData
.
scrollDelta
.
y
;
if
(
scrollDelta
<
0
)
scrollbar
.
value
+=
scrollbar
.
size
*
scrollSensitivity
;
else
if
(
scrollDelta
>
0
)
scrollbar
.
value
-=
scrollbar
.
size
*
scrollSensitivity
;
}
}
}
Assets/Scripts/MDPro3/UI/New UI/HorizontalScrollbarMouseWheel.cs.meta
0 → 100644
View file @
f5512878
fileFormatVersion: 2
guid: 2def38340b4d0bd4495d41c98270e6fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment