Main/resources/[carscripts]/slashtires/bridge/helptext/standalone.lua

25 lines
781 B
Lua
Raw Normal View History

2025-06-07 08:51:21 +02:00
local showHelpText = false
AddTextEntry('slashtire_help_text_keyboard', GetLocalization('help_text_keyboard', '~INPUT_89560A13~'))
AddTextEntry('slashtire_help_text_controller', GetLocalization('help_text_controller', '~INPUT_5FCAA612~'))
---Displays the help text for as long showHelpText is true
local function helpTextThread()
while showHelpText do
local textLabel = IsUsingKeyboard(1) and 'slashtire_help_text_keyboard' or 'slashtire_help_text_controller'
DisplayHelpTextThisFrame(textLabel, false)
Wait(0)
end
end
---Starts showing the help text
function StartHelpText()
showHelpText = true
CreateThread(helpTextThread)
end
---Stops showing the help text
function StopHelpText()
showHelpText = false
end