B4J Library [B4X] [XUI] jSD_Dice

Star-Dust

Expert
Licensed User
dado.gif
ezgif.com-crop.gif


jSD_Dice

Author:
Star-Dust
Version: 1.04
  • DiceView
    • Events:
      • Click
      • CompleteRoll
    • Fields:
      • mBase As B4XView
      • Tag As Object
      • TimeMovment As Int
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, PropS As Map) As String
        Base type must be Object
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • Move (X As Int, Y As Int, Z As Int) As String
      • RollTo (FaceNumber As Int)
      • Rotate (DegreeX As Int, DegreeY As Int, DegreeZ As Int) As String

Download from Here
 
Last edited:

Star-Dust

Expert
Licensed User
Update rel 1.01
  • Add RollTo(FaceNumber)

Allows you to roll the data until it reaches a face
B4X:
DiceView1.RollTo(RND(1,7))
Video 3.gif
 

Star-Dust

Expert
Licensed User
Update rel 1.02
  • Improved rotation. Ability to change the timing of the animation

Trick to turn the nut to the desired face
Code:
Sub ChangeFace(FaceNumber As B4XFont)
    Select FaceNumber
        Case 1
            DiceView1.Rotate(0,10,0)
        Case 2
            DiceView1.Rotate(0,280,0)
        Case 3
            DiceView1.Rotate(90,10,0)
        Case 4
            DiceView1.Rotate(270,10,0)
        Case 5
            DiceView1.Rotate(0,100,0)
        Case 6
            DiceView1.Rotate(0,190,0)
    End Select
End Sub
 
Last edited:

Star-Dust

Expert
Licensed User
I was wrong :rolleyes:
 

Star-Dust

Expert
Licensed User
The library is now transferred, you can download it from Here
 
Top