File size: 4,777 Bytes
b6a38d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
-- ========== GENERATED BY XTemplate Editor (Alt-F3) DO NOT EDIT MANUALLY! ==========
PlaceObj('XTemplate', {
group = "GedApps",
id = "GedScriptEditor",
save_in = "Ged",
PlaceObj('XTemplateWindow', {
'__class', "GedApp",
'Title', "Script Editor",
'AppId', "GedScriptEditor",
}, {
PlaceObj('XTemplateWindow', nil, {
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return "root" end,
'__class', "GedTreePanel",
'Id', "idProgram",
'Margins', box(0, 0, 2, 0),
'TitleFormatFunc', "GedScriptDescription",
'DisplayWarnings', false,
'ActionsClass', "PropertyObject",
'MoveUp', "GedOpTreeMoveItemUp",
'MoveDown', "GedOpTreeMoveItemDown",
'MoveOut', "GedOpTreeMoveItemOutwards",
'MoveIn', "GedOpTreeMoveItemInwards",
'Delete', "GedOpTreeDeleteItem",
'Cut', "GedOpTreeCut",
'Copy', "GedOpTreeCopy",
'Paste', "GedOpTreePaste",
'Duplicate', "GedOpTreeDuplicate",
'ActionContext', "PanelAction",
'SearchActionContexts', {
"PanelAction",
"ChildAction",
},
'Format', "<EditorView>",
'SelectionBind', "SelectedObject",
'EnableRollover', true,
'EnableForRootLevelItems', true,
'ItemClass', function (gedapp) return gedapp.ItemClass end,
'RootActionContext', "PanelAction",
'ChildActionContext', "ChildAction",
}, {
PlaceObj('XTemplateFunc', {
'name', "OnContextUpdate(self, context, view, ...)",
'func', function (self, context, view, ...)
if view == "tree" then
self.connection.app:ActionsUpdated()
end
return GedTreePanel.OnContextUpdate(self, context, view, ...)
end,
}),
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return "root" end,
'__class', "GedTextPanel",
'ZOrder', 2,
'Padding', box(2, 2, 2, -2),
'Dock', "top",
'Title', "",
'DisplayWarnings', false,
'Format', "<EditedScriptStatusText>",
}),
}),
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return "root" end,
'__class', "GedPropPanel",
'Dock', "bottom",
'MaxHeight', 300,
'Title', "Lua Code",
'EnableSearch', false,
'DisplayWarnings', false,
'ActionContext', "PanelAction",
'EnableCollapseDefault', false,
'EnableShowInternalNames', false,
'EnableCollapseCategories', false,
'HideFirstCategory', true,
'PropActionContext', "PanelAction",
}),
}),
PlaceObj('XTemplateWindow', {
'__class', "XPanelSizer",
}),
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return "SelectedObject" end,
'__class', "GedPropPanel",
'ActionsClass', "PropertyObject",
'Copy', "GedOpPropertyCopy",
'Paste', "GedOpPropertyPaste",
'ActionContext', "PanelAction",
'SearchActionContexts', {
"PanelAction",
"ChildAction",
},
'HideFirstCategory', true,
'PropActionContext', "PanelAction",
}),
PlaceObj('XTemplateWindow', {
'__context', function (parent, context) return "SelectedObject" end,
'__class', "GedBindView",
'BindView', "SubItems",
'BindFunc', "GedDynamicItemsMenu",
'ControlId', "idProgram",
'OnViewChanged', function (self, value, control)
RebuildSubItemsActions(control, value, "New", "main", "main")
end,
}),
PlaceObj('XTemplateAction', {
'ActionId', "File",
'ActionName', T(940323577396, --[[XTemplate GedScriptEditor ActionName]] "File"),
'ActionMenubar', "main",
'OnActionEffect', "popup",
}, {
PlaceObj('XTemplateAction', {
'ActionId', "SaveParentPreset",
'ActionName', T(755742229826, --[[XTemplate GedScriptEditor ActionName]] "Save containing preset"),
'ActionIcon', "CommonAssets/UI/Ged/save.tga",
'ActionToolbar', "main",
'ActionToolbarSplit', true,
'ActionShortcut', "Ctrl-S",
'ActionState', function (self, host)
local tree = host.idProgram:Obj("root|tree")
if tree and tree.class == "ScriptTestHarnessProgram" then
return "hidden"
end
end,
'OnAction', function (self, host, source, ...)
host:OnSaving()
host:Send("GedSaveScriptParentPreset")
end,
}),
PlaceObj('XTemplateAction', {
'ActionId', "TestScript",
'ActionName', T(448341630971, --[[XTemplate GedScriptEditor ActionName]] "Test script"),
'ActionIcon', "CommonAssets/UI/Ged/play",
'ActionToolbar', "main",
'ActionToolbarSplit', true,
'ActionShortcut', "Ctrl-T",
'ActionState', function (self, host)
local tree = host.idProgram:Obj("root|tree")
if tree and tree.class ~= "ScriptTestHarnessProgram" then
return "hidden"
end
end,
'OnAction', function (self, host, source, ...)
host:OnSaving()
host:Send("GedTestScript")
end,
}),
}),
}),
})
|