B4J Library [ SteamWorks4B4J ] Wrapper Steamworks4J to B4J

hello my dear friends, I am a game developer, I have some games released on steam (all developed in C++). I'm fascinated by the ease and power of B4X , so I created a SteamWorks4J wrapper for B4J.
I just did some basic functions just to boot steam, the others haven't done yet due to lack of time... but soon I'll do them! ( whoever wants to help me, the source code will be available soon )

DOWNLOAD LIBS AND EXAMPLES

* Fixed B4XPageMain Lost .
 
Last edited:

Waldemar Lima

Well-Known Member
Licensed User
there is a problem between Steam and java, if you try to close the application using the Steam Client Close Button, all windows will close, but the application will still remain in the background...
 

LucaMs

Expert
Licensed User
Longtime User
I have downloaded your projects only now.

They are two:
1 - type B4XPages but... without B4XPages 😕
2 - NON-UI type.

You should create a "normal" B4XPages project, do not remove the B4XMain B4XPage and write your code n B4XPages, not in the Main. Anyway, try this, in that your project (if it works for the other jobs):
B4X:
Sub MainForm_CloseRequest (EventData As Event)
    ' remove/comment this lineB4XPages.Delegate.MainForm_CloseRequest(EventData)
    ExitApplication
End Sub

[NOTE: I didn't run them]
 

Waldemar Lima

Well-Known Member
Licensed User
I have downloaded your projects only now.

They are two:
1 - type B4XPages but... without B4XPages 😕
2 - NON-UI type.

You should create a "normal" B4XPages project, do not remove the B4XMain B4XPage and write your code n B4XPages, not in the Main. Anyway, try this, in that your project (if it works for the other jobs):
B4X:
Sub MainForm_CloseRequest (EventData As Event)
    ' remove/comment this lineB4XPages.Delegate.MainForm_CloseRequest(EventData)
    ExitApplication
End Sub

[NOTE: I didn't run them]

there must be something that JFX, because only in Forms this happens ... if you test the console version, it dies as it should be
 

Waldemar Lima

Well-Known Member
Licensed User
sorry by delay, here download link : https://file.io/bdI4GXocDBVs

in main.bas you need to add this dependency
B4X:
#AdditionalJar: steamworks4j-1.8.0.jar

in b4xmainpage
B4X:
Sub Class_Globals
    Private steam As SteamWorks4j
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    B4XPages.SetTitle(Me, "MySteam application")
    Root.LoadLayout("MainPage")

    steam.SteamInit
    
    If (steam.isSteamRunning = False) Then
        Dim sf As Object = xui.Msgbox2Async("Please make sure your steam account is running.", "is steam running?", "Yes", "", "", Null)
        Wait For (sf) Msgbox_Result (Result As Int)
        ExitApplication
    End If
End Sub
 
Last edited:
Top