Skip to content

Commit

Permalink
Potential New Feature to B2S Snippet x/y translation #71: Make only t…
Browse files Browse the repository at this point in the history
…he absolute B2SSetPos(Id, xpos, ypos) available
  • Loading branch information
JockeJarre committed Jun 26, 2024
1 parent ffa1038 commit 66df61a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
</Compile>
<Compile Include="Dream7\Segment.vb" />
<Compile Include="Dream7\SegmentNumber.vb" />
<Compile Include="EXEServer.vb" />
<Compile Include="Forms\Background.Designer.vb">
<DependentUpon>Background.vb</DependentUpon>
</Compile>
Expand Down
37 changes: 0 additions & 37 deletions b2sbackglassserver/b2sbackglassserver/Server.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1715,14 +1715,6 @@ Public Class Server
End If
End Sub


Public Sub B2SSetPosAbsolute(ByVal idORname As Object, ByVal xpos As Object, ByVal ypos As Object)

If IsNumeric(idORname) And IsNumeric(xpos) And IsNumeric(ypos) Then
MyB2SSetPosAbsolute(CInt(idORname), CInt(xpos), CInt(ypos))
End If
End Sub

' method to set illumination
Public Sub B2SSetIllumination(ByVal name As Object, ByVal value As Object)

Expand Down Expand Up @@ -2145,35 +2137,6 @@ Public Class Server

Private Sub MyB2SSetPos(ByVal id As Integer, ByVal xpos As Integer, ByVal ypos As Integer)

If B2SData.IsBackglassRunning Then

If B2SData.IsBackglassStartedAsEXE Then

Else
If B2SData.UsedRomLampIDs.ContainsKey(id) Then
Dim rescaleBackglass As SizeF
Me.formBackglass.GetScaleFactor(rescaleBackglass)

For Each picbox As B2SPictureBox In B2SData.UsedRomLampIDs(id)
If picbox IsNot Nothing AndAlso (Not B2SData.UseIlluminationLocks OrElse String.IsNullOrEmpty(picbox.GroupName) OrElse Not B2SData.IlluminationLocks.ContainsKey(picbox.GroupName)) Then
picbox.Left += xpos
picbox.Top += ypos
' Using RectangleF as this is used in the DrawImage within OnPaint for picturBoxes.
picbox.RectangleF = New RectangleF(CInt(picbox.Left / rescaleBackglass.Width), CInt(picbox.Top / rescaleBackglass.Height), picbox.RectangleF.Width, picbox.RectangleF.Height)
'Invalidating this object does not work, need to Invalidate the parent.
If picbox.Parent IsNot Nothing Then
picbox.Parent.Invalidate()
End If
End If
Next
End If
End If
End If

End Sub

Private Sub MyB2SSetPosAbsolute(ByVal id As Integer, ByVal xpos As Integer, ByVal ypos As Integer)

If B2SData.IsBackglassRunning Then

If B2SData.IsBackglassStartedAsEXE Then
Expand Down

0 comments on commit 66df61a

Please sign in to comment.