QALogsUIViewModel
ViewModel for the QALogsUI component.
local QALogsUIViewModel = Import("QALogsUIViewModel")
local visible = Value(false)
local viewModel = QALogsUIViewModel.new(visible)
viewModel:newLog("Client", {
Message = "Hello World",
Type = "MessageOutput",
})
-- to hide the UI
viewModel:close()
Functions
new
QALogsUIViewModel.
new
(
visible:
Value
--
Fusion value that controls the visibility of the UI
) →
(
)
close
QALogsUIViewModel:
close
(
) →
(
)
Closes the UI
_addNewLogEntry
QALogsUIViewModel:
_addNewLogEntry
(
logValue:
FusionValue
,
info:
table
--
The log info
) →
(
)
local info = {
Message = "Hello World",
Type = "MessageOutput", -- MessageType.Value
}
newLog
QALogsUIViewModel:
newLog
(
context:
string
,
--
Either "Client" or "Server"
info:
table
--
The log info
) →
(
)
local info = {
Message = "Hello World",
Type = "MessageOutput", -- MessageType.Value
}
setServerAccess
QALogsUIViewModel:
setServerAccess
(
access:
boolean
--
Whether the player can access the server
) →
(
)
Sets the server access for the UI
This, effectively, just makes the server button in the UI visible or not.
If the player does not have access on the server side, then the button will not be visible.