EntryLink component
This commit is contained in:
@@ -539,8 +539,14 @@
|
||||
(addComponent archive e Dates [=>"Created" (Date.now)])
|
||||
})])
|
||||
|
||||
(defCommand AddEntryLink [entries (SelectedEntries 1 null) linkTo OneEntry]
|
||||
(for e entries
|
||||
(addEntryLink archive e linkTo)))
|
||||
|
||||
(defCommand InvokeEntry [e SelectedEntry]
|
||||
(cond
|
||||
((hasComponent e EntryLink)
|
||||
(InvokeEntry (dictGet archive.entries (readComponent e EntryLink))))
|
||||
((hasComponent e NATCommand)
|
||||
(tryRunCommand (readComponent e NATCommand)) 0)
|
||||
((hasComponent e NATCommands)
|
||||
|
@@ -149,6 +149,10 @@
|
||||
(doFor e2 entriesToRemove (conn.remove e2.id))))
|
||||
e)
|
||||
|
||||
(function addEntryLink [:nat.Archive archive :nat.Entry e :nat.Entry eLink]
|
||||
(addComponent archive e EntryLink eLink.id)
|
||||
e)
|
||||
|
||||
(function colorIFromF [:nat.components.ColorF cf]
|
||||
(object r (Std.int (* 255 cf.r)) g (Std.int (* 255 cf.g)) b (Std.int (* 255 cf.b)) a (Std.int (* 255 cf.a))))
|
||||
|
||||
|
3
src/nat/components/EntryLink.hx
Normal file
3
src/nat/components/EntryLink.hx
Normal file
@@ -0,0 +1,3 @@
|
||||
package nat.components;
|
||||
|
||||
typedef EntryLink = EntryRef;
|
Reference in New Issue
Block a user