mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 17:53:32 +00:00
Fixed a crash on Bubbles and Overlay views
This commit is contained in:
parent
b1f4461b75
commit
479ed0300a
@ -5,7 +5,7 @@
|
|||||||
-- This is a default script to be executed by Artemis.
|
-- This is a default script to be executed by Artemis.
|
||||||
-- You do not need to use this if you don't want to script. The default profiles
|
-- You do not need to use this if you don't want to script. The default profiles
|
||||||
-- should provide you with a lot of functionality out of the box.
|
-- should provide you with a lot of functionality out of the box.
|
||||||
-- However, if you wan't to change the way profiles work, this is the ideal way
|
-- However, if you want to change the way profiles work, this is the ideal way
|
||||||
-- go about it.
|
-- go about it.
|
||||||
|
|
||||||
-- For docs and examples, see wiki: https://github.com/SpoinkyNL/Artemis/wiki/LUA
|
-- For docs and examples, see wiki: https://github.com/SpoinkyNL/Artemis/wiki/LUA
|
||||||
@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
-- This event is raised after every profile update, before drawing.
|
-- This event is raised after every profile update, before drawing.
|
||||||
function updateHandler(profile, eventArgs)
|
function updateHandler(profile, eventArgs)
|
||||||
-- In this example we only want to update once per frame when the keyboard is updated
|
-- In this example we only want to update once per frame when the keyboard is
|
||||||
|
-- updated. If you don't do this the updateHandler will trigger on every
|
||||||
|
-- device's update.
|
||||||
if eventArgs.DeviceType != "keyboard" then
|
if eventArgs.DeviceType != "keyboard" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -25,7 +27,8 @@ end
|
|||||||
|
|
||||||
-- This event is raised after every profile draw, after updating.
|
-- This event is raised after every profile draw, after updating.
|
||||||
function drawHandler(profile, eventArgs)
|
function drawHandler(profile, eventArgs)
|
||||||
-- In this example we only want to draw to the keyboard
|
-- In this example we only want to draw to the keyboard. Each device has it's
|
||||||
|
-- own drawing event
|
||||||
if eventArgs.DeviceType != "keyboard" then
|
if eventArgs.DeviceType != "keyboard" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@ -141,6 +141,12 @@ namespace Artemis.ViewModels
|
|||||||
CheckDuplicateInstances();
|
CheckDuplicateInstances();
|
||||||
Updater.CheckChangelog(MetroDialogService);
|
Updater.CheckChangelog(MetroDialogService);
|
||||||
|
|
||||||
|
// Run this on the UI thread to avoid having to use dispatchers in VMs
|
||||||
|
Execute.OnUIThread(ActivateViews);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ActivateViews()
|
||||||
|
{
|
||||||
var vms = _kernel.GetAll<BaseViewModel>().ToList();
|
var vms = _kernel.GetAll<BaseViewModel>().ToList();
|
||||||
Items.Clear();
|
Items.Clear();
|
||||||
Items.AddRange(vms);
|
Items.AddRange(vms);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user