Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SteelSeriesSecondaryDeviceByZone.cs
Go to the documentation of this file.
1
using
System.Collections.Generic
;
2
using
Microsoft.Xna.Framework
;
3
using
Newtonsoft.Json.Linq;
4
using
SteelSeries.GameSense;
5
using
SteelSeries.GameSense.DeviceZone;
6
7
namespace
ReLogic.Peripherals.RGB.SteelSeries
;
8
9
internal
class
SteelSeriesSecondaryDeviceByZone
:
RgbDevice
,
IGameSenseDevice
,
IGameSenseUpdater
10
{
11
private
string
_zoneTarget
;
12
13
private
int
_xPosition
;
14
15
private
int
_yPosition
;
16
17
private
ColorKey
_colorKey
;
18
19
private
List<JObject>
_requestList
=
new
List<JObject>
();
20
21
public
SteelSeriesSecondaryDeviceByZone
(
DeviceColorProfile
colorProfile
,
RgbDeviceType
type,
string
zoneNameToCheck
,
int
xPosition
,
int
yPosition
)
22
:
base
(
RgbDeviceVendor
.SteelSeries, type,
Fragment
.FromGrid(
new
Rectangle
(
xPosition
,
yPosition
, 1, 1)),
colorProfile
)
23
{
24
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
25
_zoneTarget
=
zoneNameToCheck
;
26
base.PreferredLevelOfDetail =
EffectDetailLevel
.High;
27
_xPosition
=
xPosition
;
28
_yPosition
=
yPosition
;
29
}
30
31
public
override
void
Present
()
32
{
33
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
34
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
35
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
36
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
37
Vector4
processedLedColor
=
GetProcessedLedColor
(0);
38
Color
color =
default
(
Color
);
39
((
Color
)(
ref
color)).
_002Ector
(
processedLedColor
);
40
_colorKey
.
UpdateColor
(color,
isVisible
:
true
);
41
}
42
43
public
List<JObject>
TryGetEventUpdateRequest
()
44
{
45
_requestList
.
Clear
();
46
JObject
jObject
=
_colorKey
.
TryGettingRequest
();
47
if
(
jObject
!=
null
)
48
{
49
_requestList
.
Add
(
jObject
);
50
}
51
return
_requestList
;
52
}
53
54
public
void
CollectEventsToTrack
(
Bind_Event
[]
bindEvents
,
ARgbGameValueTracker
[]
miscEvents
)
55
{
56
foreach
(
Bind_Event
bind_Event
in
bindEvents
)
57
{
58
AbstractHandler
obj =
bind_Event
.handlers[0];
59
ContextColorEventHandlerType
contextColorEventHandlerType
= (
ContextColorEventHandlerType
)(
object
)((obj
is
ContextColorEventHandlerType
) ? obj :
null
);
60
if
(
contextColorEventHandlerType
!=
null
)
61
{
62
AbstractIlluminationDevice_Zone
deviceZone
=
contextColorEventHandlerType
.DeviceZone;
63
RGBZonedDevice
rGBZonedDevice
= (
RGBZonedDevice
)(
object
)((
deviceZone
is
RGBZonedDevice
) ?
deviceZone
:
null
);
64
if
(
rGBZonedDevice
!=
null
&& !(((
AbstractIlluminationDevice_StandardZone
)
rGBZonedDevice
).
zone
!=
_zoneTarget
))
65
{
66
ColorKey
colorKey
=
new
ColorKey
67
{
68
EventName =
bind_Event
.eventName,
69
TriggerName = contextColorEventHandlerType.ContextFrameKey
70
};
71
_colorKey
=
colorKey
;
72
break
;
73
}
74
}
75
}
76
}
77
}
ReLogic.Peripherals.RGB.ARgbGameValueTracker
Definition
ARgbGameValueTracker.cs:38
ReLogic.Peripherals.RGB.DeviceColorProfile
Definition
DeviceColorProfile.cs:7
ReLogic.Peripherals.RGB.Fragment
Definition
Fragment.cs:7
ReLogic.Peripherals.RGB.RgbDevice.GetProcessedLedColor
Vector4 GetProcessedLedColor(int index)
Definition
RgbDevice.cs:37
ReLogic.Peripherals.RGB.RgbDevice
Definition
RgbDevice.cs:7
ReLogic.Peripherals.RGB.SteelSeries.ColorKey.TryGettingRequest
JObject TryGettingRequest()
Definition
ColorKey.cs:39
ReLogic.Peripherals.RGB.SteelSeries.ColorKey.UpdateColor
void UpdateColor(Color color, bool isVisible)
Definition
ColorKey.cs:22
ReLogic.Peripherals.RGB.SteelSeries.ColorKey
Definition
ColorKey.cs:7
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone.TryGetEventUpdateRequest
List< JObject > TryGetEventUpdateRequest()
Definition
SteelSeriesSecondaryDeviceByZone.cs:43
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone._yPosition
int _yPosition
Definition
SteelSeriesSecondaryDeviceByZone.cs:15
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone.SteelSeriesSecondaryDeviceByZone
SteelSeriesSecondaryDeviceByZone(DeviceColorProfile colorProfile, RgbDeviceType type, string zoneNameToCheck, int xPosition, int yPosition)
Definition
SteelSeriesSecondaryDeviceByZone.cs:21
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone._zoneTarget
string _zoneTarget
Definition
SteelSeriesSecondaryDeviceByZone.cs:11
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone.CollectEventsToTrack
void CollectEventsToTrack(Bind_Event[] bindEvents, ARgbGameValueTracker[] miscEvents)
Definition
SteelSeriesSecondaryDeviceByZone.cs:54
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone._xPosition
int _xPosition
Definition
SteelSeriesSecondaryDeviceByZone.cs:13
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone._colorKey
ColorKey _colorKey
Definition
SteelSeriesSecondaryDeviceByZone.cs:17
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone._requestList
List< JObject > _requestList
Definition
SteelSeriesSecondaryDeviceByZone.cs:19
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone.Present
override void Present()
Definition
SteelSeriesSecondaryDeviceByZone.cs:31
ReLogic.Peripherals.RGB.SteelSeries.SteelSeriesSecondaryDeviceByZone
Definition
SteelSeriesSecondaryDeviceByZone.cs:10
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Collections.Generic.List.Clear
void Clear()
Definition
List.cs:313
System.Collections.Generic.List.Add
void Add(T item)
Definition
List.cs:236
ReLogic.Peripherals.RGB.SteelSeries.IGameSenseDevice
Definition
IGameSenseDevice.cs:6
ReLogic.Peripherals.RGB.SteelSeries.IGameSenseUpdater
Definition
IGameSenseUpdater.cs:7
Microsoft.Xna.Framework
Definition
AlphaTestEffect.cs:1
ReLogic.Peripherals.RGB.SteelSeries
Definition
ColorKey.cs:4
ReLogic.Peripherals.RGB.RgbDeviceVendor
RgbDeviceVendor
Definition
RgbDeviceVendor.cs:4
ReLogic.Peripherals.RGB.EffectDetailLevel
EffectDetailLevel
Definition
EffectDetailLevel.cs:4
ReLogic.Peripherals.RGB.RgbDeviceType
RgbDeviceType
Definition
RgbDeviceType.cs:4
System.Collections.Generic
Definition
IHashKeyCollection.cs:1
Microsoft.Xna.Framework.Color
Definition
Color.cs:12
Microsoft.Xna.Framework.Rectangle
Definition
Rectangle.cs:12
Microsoft.Xna.Framework.Vector4
Definition
Vector4.cs:12
source
ReLogic
ReLogic.Peripherals.RGB.SteelSeries
SteelSeriesSecondaryDeviceByZone.cs
Generated by
1.10.0