ui_message
Definition
-- @/lua/common/utils.lua:963
--== User interface ==--
function ui_message(msg, ttl, category, icon)
guihooks.message(msg, (ttl or 5), (category or ''), icon or "info")
end
Callers
@/lua/ge/extensions/core/camera.lua
if not vdata.focusedCamName then return end
ui_message({txt='ui.camera.switched', context={name='ui.camera.mode.' .. vdata.focusedCamName}}, 10, 'cameramode')
end
ui_message({txt="ui.camera.speed", context={speed=camData.speed}}, 1, "cameraspeed")
if editor and editor.active and editor.showNotification then
@/lua/ge/extensions/flowgraph/nodes/gameplay/rally/countdown.lua
function C:show(msg, big, duration)
--ui_message(msg, 1, "")
duration = duration or (big and 1.4 or 0.95)
@/lua/ge/extensions/gameplay/markerInteraction.lua
extensions.hook("onReachedTargetPos")
ui_message("bigmap.info.reachedTarget", nil, "bigmapTarget", "checkmark")
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/rally/countdownSynced.lua
function C:show(msg, big, duration)
--ui_message(msg, 1, "")
duration = duration or (big and 1.4 or 0.95)
@/lua/vehicle/extensions/scenario/shiftBooster.lua
-- show something on the UI
ui_message("Boooooost!", 5, "boost")
@/lua/ge/extensions/gameplay/garageMode.lua
if tableSize(career_modules_inventory.getVehicles()) == 0 then
ui_message("No vehicles in inventory! Buy a vehicle to enter garage mode.", nil, "garageMode")
return
@/lua/ge/extensions/campaign/exploration.lua
end
ui_message('', 0, 'MINIMAP_HELP', nil) -- remove hint on how to open the map
guihooks.trigger('ChangeState', {state ='mapview', params = {data=uiParams}})
if layoutType == 'exploration' then
ui_message('extensions.campaign.exploration.mapHint', 600, 'MINIMAP_HELP', nil)
end
@/lua/ge/extensions/gameplay/police.lua
if gameplay_traffic.showMessages and policePlayer and not policePlayer.role.flags.busy then
ui_message(string.format('%s %s', translateLanguage('ui.traffic.suspectFlee', 'A suspect is fleeing from you! Vehicle:'), targetVeh.modelName), 5, 'traffic', 'traffic')
end
if gameplay_traffic.showMessages and be:getPlayerVehicleID(0) == targetId then
ui_message('ui.traffic.policePursuit', 5, 'traffic', 'traffic')
end
local str = veh.pursuit.mode == 1 and 'ui.traffic.policeTicket' or 'ui.traffic.policeArrest'
ui_message(str, 4, 'traffic', 'traffic')
ui_message(string.format('%s %s', translateLanguage('ui.traffic.infractions.title', 'Offenses:'), table.concat(offensesTranslated, ', ')), 5, 'trafficInfractions', 'traffic')
end
elseif be:getPlayerVehicleID(0) == veh.role.targetId or policeVehs[be:getPlayerVehicleID(0)] then
ui_message('ui.traffic.suspectArrest', 5, 'traffic', 'traffic')
end
if be:getPlayerVehicleID(0) == id then
ui_message('ui.traffic.policeEvade', 5, 'traffic', 'traffic')
elseif be:getPlayerVehicleID(0) == veh.role.targetId or policeVehs[be:getPlayerVehicleID(0)] then
elseif be:getPlayerVehicleID(0) == veh.role.targetId or policeVehs[be:getPlayerVehicleID(0)] then
ui_message('ui.traffic.suspectEvade', 5, 'traffic', 'traffic')
end
if showMessages and be:getPlayerVehicleID(0) == id then
ui_message('ui.traffic.driveAway', 5, 'traffic', 'traffic')
end
@/lua/ge/extensions/core/cameraModes/driver.lua
if dr ~= 0 then
ui_message({txt='ui.camera.driverTiltAdjusted', context={vehicleName = data.veh:getJBeamFilename(), angle=self.seatRotation}}, 2, 'cameramode')
self.saveTimeout = 1
if dy ~= 0 or dz ~= 0 then
ui_message({txt='ui.camera.driverPositionAdjusted', context={vehicleName = data.veh:getJBeamFilename(), y=self.seatPosition.y, z=self.seatPosition.z}}, 2, 'cameramode')
self.saveTimeout = 1
@/lua/ge/extensions/core/cameraModes/manualzoom.lua
self.lastNotifiedFov = fov
ui_message({txt=self.uiTxt, context={degrees=fov}}, 2, 'cameramode')
end
@/lua/ge/server/commands.lua
setFreeCamera()
ui_message("ui.camera.freecam", 10, "cameramode")
extensions.hook("onCameraToggled", {cameraType='FreeCam'})
@/lua/ge/extensions/gameplay/drag/general.lua
screenshot.doScreenshot(nil, nil, dir,'jpg')
ui_message("Timeslip saved: " .. dir .. ".jpg", nil, nil, "save")
end
@/lua/ge/extensions/ui/bindingsLegend.lua
if settings.getValue("bindingsLegendShowApp", true) then
ui_message("Press [action=toggleShowVehicleSpecificActions] or click the car icon to show/hide vehicle specific actions", 10, "vehicleSpecific", "car")
end
@/lua/ge/main.lua
end
ui_message({txt="vehicle.main.instability", context={vehicle=tostring(jbeamFilename)}}, 10, 'instability', "danger")
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/countdown.lua
function C:show(msg, big, duration)
--ui_message(msg, 1, "")
duration = duration or (big and 1.4 or 0.95)
@/lua/ge/extensions/career/modules/speedTraps.lua
career_modules_payment.pay(fine, {label="Fine for speeding", tags={"fine"}})
ui_message({txt="ui.career.speedTrap.speedingMessage", context={licensePlate = core_vehicles.getVehicleLicenseText(veh), fine = fine.money.amount, recordedSpeed = playerSpeed, speedLimit = speedTrapData.speedLimit}}, 10, 'speedTrap')
Engine.Audio.playOnce('AudioGui','event:>UI>Career>Speedcam_Snapshot')
elseif penaltyType == "noLicensePlate" then
ui_message({txt="ui.career.speedTrap.noLicensePlateMessage", context={recordedSpeed = playerSpeed, speedLimit = speedTrapData.speedLimit}}, 10, 'speedTrap')
Engine.Audio.playOnce('AudioGui','event:>UI>Career>Speedcam_Snapshot')
ui_message(message, 10, 'speedTrapRecord')
end
Engine.Audio.playOnce('AudioGui','event:>UI>Career>Speedcam_Snapshot')
ui_message(string.format("Traffic Violation (Failure to stop at Red Light): \n - %q | Fine %d$", core_vehicles.getVehicleLicenseText(veh), fine.money.amount), 10, "speedTrap")
else
else
ui_message(string.format("Traffic Violation (Failure to stop at Red Light): \n - No license plate detected | Fine could not be issued"), 10, "speedTrap")
end
@/lua/ge/extensions/core/recoveryPrompt.lua
if option.message then
ui_message(option.message, 5, "recoveryPromptMessage")
end
@/lua/ge/extensions/tech/platoonFunctions.lua
if vehicleID == leaderID then
ui_message("This vehicle is already the leader", 5, "Tech", "forward")
else
if vehicleID == leaderID then
ui_message("This vehicle is already the leader", 5, "Tech", "forward")
else
@/lua/vehicle/extensions/tech/ACC.lua
local function MPCOverride(targetSpeedVal)
ui_message("Cruise Override", 0.01, "Tech", "forward")
else
ui_message("Must be atleast 45 kmh", 5, "Tech", "forward")
return
end
ui_message("ACC extension loaded", 5, "Tech", "forward")
end
end
ui_message("ACC extension unloaded", 5, "Tech", "forward")
end
@/lua/ge/extensions/util/stepHandler.lua
return makeStepReturnTrueFunction(function()
ui_message(message)
log("I", "test", message)
@/lua/ge/extensions/core/input/bindings.lua
elseif not isCommonDevice then
ui_message(msg, 5, "input", "gamepad")
end
log("I", "bindings", msg.." ("..device.."/0x"..pidvid..")")
ui_message(msg, 5, "input", "gamepad")
end
else
ui_message(msg, 5, "input", "gamepad")
end
@/lua/ge/extensions/core/groundMarkerArrows.lua
if wrongDirectionCounter > 0 then
ui_message("Please make a U-turn when possible", 5, 'wrongDirection', 'turnHp')
else
else
ui_message("", 5, 'wrongDirection', 'turnHp')
end
@/lua/ge/extensions/editor/perfProfiler.lua
editor.setEditorActive(false)
ui_message("Starting Recording... Please wait.")
local sequence = { util_stepHandler.makeStepWait(3) }
test_util_fpsCamRecorder.clear()
ui_message("Done with the recording!")
return true
@/lua/vehicle/extensions/tech/platooning.lua
local function MPCOverride(targetSpeedVal)
ui_message("Cruise Override", 0.01, "Tech", "forward")
ui_message("Vehicle Exit Platoon", 5, "Tech", "forward")
end
ui_message("Ultrasonic Detected Hazardous Distance", 5, "Tech", "forward")
end
ui_message("Platoon leader assigned", 5, "Tech", "forward")
else
else
ui_message("vehicles sizes are not compatible for a platoon", 5, "Tech", "forward")
-- loaded = false
end
ui_message("Vehicle Joined The Platoon", 5, "Tech", "forward")
else
else
ui_message("Relay vehicle size is not compatible to join this platoon", 5, "Tech", "forward")
end
ui_message("Leader of vehicle "..vehicleId.." updated", 5, "Tech", "forward")
end
ai.driveInLane('on')
ui_message("Platoon Launched successfully", 5, "Tech", "forward")
end
end
ui_message("Platoon extension loaded", 5, "Tech", "forward")
end
ai.setMode('manual')
ui_message("Leader Exit Platoon", 5, "Tech", "forward")
end
ai.driveInLane('on')
ui_message("Platoon Leader assigned successfully", 5, "Tech", "forward")
end
ai.driveInLane('on')
ui_message("Platoon Leader assigned successfully", 5, "Tech", "forward")
ui_message("Platoon Leader assigned successfully", 5, "Tech", "forward")
end
ui_message("platooning extension unloaded", 5, "Tech", "forward")
end
@/ui/ui-vue/mockdata/inputBindings.js
"title": "ui.inputActions.vehicle.ffbForceCoefDec.title",
"onDown": "local c = hydros.getFFBConfig(); c.forceCoef = c.forceCoef - 10; hydros.setFFBConfig(c) ui_message('Testing FFB strength at '..dumps(c.forceCoef))",
"order": 61,
"title": "ui.inputActions.vehicle.ffbSmoothingDec.title",
"onDown": "local c = hydros.getFFBConfig(); c.smoothing = c.smoothing - 10; hydros.setFFBConfig(c) ui_message('Testing FFB smoothing at '..dumps(c.smoothing))",
"order": 63,
"title": "ui.inputActions.vehicle.ffbSmoothingInc.title",
"onDown": "local c = hydros.getFFBConfig(); c.smoothing = c.smoothing + 10; hydros.setFFBConfig(c) ui_message('Testing FFB smoothing at '..dumps(c.smoothing))",
"order": 62,
"title": "ui.inputActions.vehicle.ffbForceCoefInc.title",
"onDown": "local c = hydros.getFFBConfig(); c.forceCoef = c.forceCoef + 10; hydros.setFFBConfig(c) ui_message('Testing FFB strength at '..dumps(c.forceCoef))",
"order": 60,
"actionMap": "Global",
"onDown": "Lua:requestReload(); ui_message('engine.lua.reloaded', 2, 'lua', 'refresh')",
"order": 20,
@/lua/ge/extensions/freeroam/freeroam.lua
local highscore, leaderboard = gameplay_speedTrapLeaderboards.addRecord(speedTrapData, playerSpeed, overSpeed, veh)
ui_message({txt="ui.freeroam.speedTrap.speedingMessage", context={licensePlate = core_vehicles.getVehicleLicenseText(veh), recordedSpeed = playerSpeed, speedLimit = speedTrapData.speedLimit}}, 10, 'speedTrap')
ui_message(message, 10, 'speedTrapRecord')
end
local veh = getPlayerVehicle(0)
ui_message({txt="ui.freeroam.speedTrap.redLightMessage", context={licensePlate = core_vehicles.getVehicleLicenseText(veh)}}, 10, 'speedTrap')
end
@/lua/ge/extensions/core/cameraModes/relative.lua
self:_updateLight()
ui_message('Light intensity: ' .. math.ceil(self.lightBrightness * 100) .. ' %' , 10, 'cameramode')
return {'reload'}
end
ui_message('Near clip: '..nearClipLabel, 10, 'cameramode')
return {'reload'}
}
ui_message('Camera position stored in slot ' .. tostring(slot), 10, 'cameramode')
end
if not self.slots[slot] then
ui_message('Slot ' .. tostring(slot) .. ' empty' , 10, 'cameramode')
return false
@/lua/ge/extensions/gameplay/traffic.lua
end
ui_message('ui.traffic.spawnLimit', 5, 'traffic', 'traffic')
return false
@/lua/ge/extensions/career/modules/playerDriving.lua
career_modules_payment.pay({money = {amount = fine}}, {label = "Fine for being arrested by the police"})
ui_message(translateLanguage("ui.traffic.policeFine", "You got fined by the police: ")..fine, 5, "careerPursuit")
end
@/lua/ge/extensions/gameplay/forceField.lua
local status = forceMultiplier > 0 and "ui.radialmenu2.funstuff.ForceField.repulsion" or "ui.radialmenu2.funstuff.ForceField.attraction"
ui_message({txt = "ui.radialmenu2.funstuff.ForceField.activated", context = {status = status}}, nil, "forceField")
active = true
if not silent then
ui_message({txt = "ui.radialmenu2.funstuff.ForceField.deactivated", context = {status = "ui.radialmenu2.funstuff.ForceField.inactive"}}, nil, "forceField")
end
@/lua/ge/extensions/tech/adasUltrasonic.lua
if readings[i] < 2 or readings[i + 2] < 2 then
ui_message("Blind spot left", 1, "Tech", "matterial_arrow_back")
end
if readings[i + 1] < 2 or readings[i + 3] < 2 then
ui_message("Blind spot right", 1, "Tech", "material_arrow_forward")
end
ui_message("Ultrasonic ADAS extension loaded", 5, "Tech", "forward")
end
log('I', 'ADAS', 'ultrasonic ADAS extension unloaded')
ui_message("Ultrasonic ADAS extension unloaded", 5, "Tech", "forward")
end
@/lua/ge/extensions/scenario/raceUI.lua
--guihooks.trigger('ScenarioFlashMessage', {{'Lap ' ..tostring(data.lap) .. ' time: ' .. curTime, 3}} )
ui_message('lap ' ..tostring(data.lap) .. ' time: '..curTime, 2)
end
@/lua/ge/extensions/flowgraph/nodes/ui/monologue.lua
self.current = i
ui_message(tostring(self.pinIn['message_'..i].value), self.pinIn['duration_'..i].value, self.pinIn.category.value or "", self.pinIn.icon.value)
end
@/lua/ge/extensions/gameplay/walk.lua
if showMessage then
ui_message("ui.inputActions.gameplay.toggleWalkingMode.enterMessage", 10, "walkingmode")
else
else
ui_message("", 0, "walkingmode")
end
@/lua/ge/extensions/career/modules/fuel.lua
if career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()].loanType == "work" then
ui_message(string.format("Fuel paid for by the company"), 6, "refueling")
else
tank.currentEnergy = tank.maxEnergy
ui_message("Your vehicle has been fully recharged", nil, "emergencyRefuel")
elseif tank.currentEnergy <= tank.maxEnergy * 0.01 then
tank.currentEnergy = tank.maxEnergy * 0.05
ui_message("Your tank was close to empty, so it has been refueled a little bit. You should visit a fuel station", nil, "emergencyRefuel")
end
@/lua/ge/extensions/core/vehicles.lua
if vehicle:getField('JBeam','0') ~= "unicycle" then
ui_message("ui.hints.switchVehicle", 10, "spawn")
end
@/lua/ge/extensions/tech/utils.lua
updateUINextRefresh = permanent and 0.5 or 5
ui_message(message, 5, "Tech", "forward")
end
@/lua/ge/extensions/flowgraph/nodes/ui/message.lua
--print(self.pinIn.message.value)
--ui_message(tostring(self.pinIn.message.value), self.pinIn.duration.value or 5, self.pinIn.category.value or ("__"..self.id), self.pinIn.icon.value)
guihooks.trigger('Message',helper)
@/lua/ge/simTimeAuthority.lua
if speed > 1.001 then
ui_message({txt="vehicle.bullettime.changeFast", context={speed=speed}}, 5, "bullettime")
elseif speed > 0.999 then
if not simplified then
ui_message("vehicle.bullettime.realtime", 5, "bullettime")
end
if simplified then
ui_message("vehicle.bullettime.slowmotion", 5, "bullettime")
else
end
ui_message({txt="vehicle.bullettime.changeSlow", context={slowmoTimes=times}}, 5, "bullettime")
end
@/lua/ge/extensions/career/modules/loanerVehicles.lua
if not loanedVehiclesInfo[inventoryId] and playerPos:distance(vehPos) > walkAwayRadius then
ui_message(string.format("You are leaving a loaned vehicle behind. After %d seconds, it will be returned to the owner.", walkAwayTimeLimit), 5, "loanedVehicleTime")
loanedVehiclesInfo[inventoryId] = {time = walkAwayTimeLimit}
if not loanedVehInfo.warningShown and loanedVehInfo.time < walkAwayWarningTime then
ui_message(string.format("After %d more seconds of not returning to the loaned vehicle, it will be returned to the owner.", walkAwayWarningTime), 5, "loanedVehicleTime")
loanedVehInfo.warningShown = true
@/lua/ge/extensions/career/modules/inspectVehicle.lua
if not dontShowLeaveSaleMessage then
ui_message(defaultLeaveMessage, '4', 'testDriveAbandoned')
end
@/lua/ge/extensions/career/modules/insurance/insurance.lua
})
ui_message(string.format("'%s' insurance has given you a repair forgiveness due to not having submitted any claim for a while", availableInsurances[plInsuranceData.insuranceId].name))
local label = string.format("Test drive vehicle damaged: -%i$", testDriveClaimPrice.money.amount)
ui_message(label)
local label = string.format("Insurance '%s' renewed! (-%0.2f$)", availableInsurances[insuranceId].name, renewalPrice)
ui_message(label)
})
ui_message(string.format("Safe driving: Driver score increased by %d to %d", safeDrivingScoreIncrease, plDriverScore))
end
@/lua/ge/extensions/career/modules/testDrive.lua
local label = string.format("Fee for not returning the test drive vehicle : -%i$", testDriveInfo.abandonFees)
ui_message(label, 5, 'test1')
career_modules_payment.pay({money = { amount = testDriveInfo.abandonFees, canBeNegative = true}}, {label = logBookLabel})
@/lua/ge/extensions/core/replay.lua
if M.state.state == 'recording' then
ui_message("replay.cancelRecording", 5, "replay", "local_movies")
local file = M.state.loadedFile
if not isMissionReplay and missionReplayRecording then
ui_message("replay.cantManualRecording", 5, "replay", "local_movies")
return
if autoplayAfterStopping then
ui_message(isMissionReplay and "stopAutoReplayRecordingAutoplay" or "replay.stopRecordingAutoplay", 5, "replay", "local_movies")
loadFile(M.state.loadedFile)
else
ui_message(isMissionReplay and "stopAutoReplayRecording" or "replay.stopRecording", 5, "replay", "local_movies")
stream:stop()
if not isMissionReplay and missionReplayRecording then
ui_message("replay.cantManualRecording", 5, "replay", "local_movies")
return
log("D","",'record to: '..filename)
ui_message(isMissionReplay and "replay.startRecordingAutoReplay" or "replay.startRecording", 5, "replay", "local_movies")
stream:record(filename)
stream:stepFrames(offset)
ui_message({txt="replay.jumpFrames", context={frameCount=offset}}, 2, "replay", "local_movies")
end
stream:stepTime(timeDiffInSeconds)
ui_message({txt="replay.jump", context={seconds=timeDiffInSeconds}}, 2, "replay", "local_movies")
end
@/lua/ge/extensions/career/modules/inventory.lua
if vehInfo.delayReason == "bought" then
ui_message(string.format("The %s has been delivered to your vehicle storage.", vehInfo.niceName), nil, "vehicleInventory")
elseif vehInfo.delayReason == "repair" then
elseif vehInfo.delayReason == "repair" then
ui_message(string.format("Your %s has been repaired and returned to your vehicle storage.", vehInfo.niceName), nil, "vehicleInventory")
end
@/lua/ge/extensions/career/modules/delivery/cargoScreen.lua
ui_message(string.format("Thrown away %d items. Penalty: %0.2f", countDeleted, deletedMoneySum * dGeneral.getDeliveryAbandonPenaltyFactor()))
career_modules_playerAttributes.addAttributes({money=-deletedMoneySum * dGeneral.getDeliveryAbandonPenaltyFactor()}, {tags={"delivery","gameplay","fine"}, label="Penalty for throwing away cargo."})
dGeneral.getNearbyVehicleCargoContainers(nop)
ui_message("Cancelled Delivery Configuration.")
end
if gameplay_walk.isWalking() then
ui_message("Press [action=reset_physics] to open the recovery menu to take a taxi.",6,"post_delivery","local_taxi")
career_modules_linearTutorial.introPopup("delivery/postDeliveryTaxi")
@/lua/ge/extensions/gameplay/crawl/display.lua
local function showPointsMessage(points)
ui_message({txt="ui.crawl.penaltyPoints", context={points=points}}, 600, "points")
end
local function clearPointsMessage()
ui_message("", nil, "points")
end
local function showCrawlCompletedMessage(time, points)
ui_message("ui.crawl.crawlCompleted", nil, "crawlCompleted")
ui_message({txt="ui.crawl.crawlResults", context={time=string.format("%.3f", time), points=points}}, 10, "crawlCompleted")
ui_message("ui.crawl.crawlCompleted", nil, "crawlCompleted")
ui_message({txt="ui.crawl.crawlResults", context={time=string.format("%.3f", time), points=points}}, 10, "crawlCompleted")
end
local function showSkippedCheckpointsMessage(skippedCount)
ui_message({txt="ui.crawl.skippedCheckpoints", context={skippedCount=skippedCount, penaltyPoints=skippedCount * gameplay_crawl_utils.infractionPoints.skippedCheckpoint}}, nil, "skippedCheckpoints")
end
local function showGateReachedMessage()
ui_message("ui.crawl.gateReached", nil, "gateReached")
end
local function showStartedCrawlMessage()
ui_message("ui.crawl.startedCrawl", nil, "startedCrawl")
end
local function showDisqualifiedMessage()
ui_message("ui.crawl.disqualified", nil, "disqualified")
end
local function showDrivingBackwardsMessage()
ui_message({txt="ui.crawl.drivingBackwards", context={penaltyPoints=gameplay_crawl_utils.infractionPoints.drivingBackwards}}, nil, "drivingBackwards")
end
local function showVehicleFlippedUprightMessage()
ui_message({txt="ui.crawl.vehicleFlippedUpright", context={penaltyPoints=gameplay_crawl_utils.infractionPoints.vehicleFlippedUpright}}, nil, "vehicleFlippedUpright")
end
local function showVehicleResetMessage()
ui_message({txt="ui.crawl.vehicleReset", context={penaltyPoints=gameplay_crawl_utils.infractionPoints.vehicleReset}}, nil, "vehicleReset")
end
local function showBoundaryViolationMessage()
ui_message({txt="ui.crawl.boundaryViolation", context={penaltyPoints=gameplay_crawl_utils.infractionPoints.boundaryViolation}}, nil, "boundaryViolation")
end
local function showBonusCheckpointMessage(penaltyPoints)
ui_message({txt="ui.crawl.bonusCheckpoint", context={penaltyPoints=penaltyPoints}}, nil, "bonusCheckpoint")
end
local function showGateClearedMessage(penaltyPoints)
ui_message({txt="ui.crawl.gateCleared", context={penaltyPoints=penaltyPoints}}, nil, "gateCleared")
end
local function showDNFMessage()
ui_message("ui.crawl.dnf", nil, "dnf")
end
@/lua/ge/extensions/gameplay/traffic/roles/standard.lua
else
ui_message('ui.traffic.interactions.insuranceExchanged', 5, 'traffic', 'trafficLight')
end