Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions native/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ HL_PRIM bool HL_NAME(is_steam_running)(){
return SteamAPI_IsSteamRunning();
}

HL_PRIM bool HL_NAME(show_floating_gamepad_text_input)(EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight) {
if (!CheckInit()) return false;
return SteamUtils()->ShowFloatingGamepadTextInput(eKeyboardMode, nTextFieldXPosition, nTextFieldYPosition, nTextFieldWidth, nTextFieldHeight);
}

HL_PRIM vbyte *HL_NAME(get_current_game_language)(){
if (!CheckInit()) return NULL;
return (vbyte*)SteamApps()->GetCurrentGameLanguage();
Expand Down Expand Up @@ -346,6 +351,7 @@ DEFINE_PRIM(_BOOL, boverlay_needs_present, _NO_ARG);
DEFINE_PRIM(_BOOL, is_steam_in_big_picture_mode, _NO_ARG);
DEFINE_PRIM(_BOOL, is_steam_running_on_steam_deck, _NO_ARG);
DEFINE_PRIM(_BOOL, is_steam_running, _NO_ARG);
DEFINE_PRIM(_BOOL, show_floating_gamepad_text_input, _I32 _I32 _I32 _I32 _I32);
DEFINE_PRIM(_BYTES, get_current_game_language, _NO_ARG);
DEFINE_PRIM(_BYTES, get_auth_ticket, _REF(_I32) _REF(_I32));
DEFINE_PRIM(_VOID, request_encrypted_app_ticket, _BYTES _I32 _FUN(_VOID, _BYTES _I32));
Expand Down
24 changes: 24 additions & 0 deletions steam/Api.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ enum abstract SteamNotificationPosition(Int) to Int
var BottomRight = 3;
}

enum abstract GamepadTextInputMode(Int) to Int {
var Normal = 0;
var Password = 1;
}

enum abstract GamepadTextInputLineMode(Int) to Int {
var SingleLine = 0;
var MultipleLines = 1;
}

enum abstract FloatingGamepadTextInputMode(Int) to Int {
var SingleLine = 0;
var MultipleLines = 1;
var Email = 2;
var Numeric = 3;
}

typedef ControllerHandle = Int64;
typedef ControllerActionSetHandle = Int;
typedef ControllerDigitalActionHandle = Int;
Expand Down Expand Up @@ -309,6 +326,12 @@ class Api
return _IsSteamRunning();
}

public static function showFloatingGamepadTextInput(mode:FloatingGamepadTextInputMode, textFieldX:Int, textFieldY:Int, textFieldWidth:Int, textFieldHeight:Int) {
if (!active)
return false;
return _ShowFloatingGamepadTextInput(mode, textFieldX, textFieldY, textFieldWidth, textFieldHeight);
}

public static function openOverlay(url:String) {
if (!active) return;
_OpenOverlay(@:privateAccess url.toUtf8());
Expand Down Expand Up @@ -537,6 +560,7 @@ class Api
@:hlNative("steam","is_steam_in_big_picture_mode") private static function _IsSteamInBigPictureMode() : Bool { return false; }
@:hlNative("?steam","is_steam_running_on_steam_deck") private static function _IsSteamRunningOnSteamDeck() : Bool { return false; }
@:hlNative("steam","is_steam_running") private static function _IsSteamRunning() : Bool { return false; }
@:hlNative("steam", "show_floating_gamepad_text_input") private static function _ShowFloatingGamepadTextInput(mode:Int, textFieldX:Int, textFieldY:Int, textFieldWidth:Int, textFieldHeight:Int):Bool return false;
@:hlNative("steam","get_current_game_language") private static function _GetCurrentGameLanguage() : hl.Bytes { return null; }
@:hlNative("steam","get_auth_ticket") private static function _GetAuthTicket( size : hl.Ref<Int>, authTicket : hl.Ref<Int> ) : hl.Bytes { return null; }
@:hlNative("?steam","request_encrypted_app_ticket") private static function _RequestEncryptedAppTicket( data : hl.Bytes, size : Int, encryptedAppTicket : (hl.Bytes, Int) -> Void ) : Void { return; }
Expand Down