File size: 1,282 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
-- ========== GENERATED BY XTemplate Editor (Alt-F3) DO NOT EDIT MANUALLY! ==========

PlaceObj('XTemplate', {
	group = "GedApps",
	id = "ClassDefEditor",
	save_in = "Ged",
	PlaceObj('XTemplateTemplate', {
		'__template', "PresetEditor",
	}, {
		PlaceObj('XTemplateAction', {
			'ActionId', "OpenEditor",
			'ActionSortKey', "2",
			'ActionName', T(419747557885, --[[XTemplate ClassDefEditor ActionName]] "Open Preset Editor"),
			'ActionIcon', "CommonAssets/UI/Ged/explorer.tga",
			'ActionToolbar', "main",
			'ActionToolbarSplit', true,
			'ActionState', function (self, host)
				local class = g_Classes[rawget(host, "selected_class")]
				return not IsKindOf(class, "PresetDef") and "hidden"
			end,
			'OnAction', function (self, host, source, ...)
				local panel = host.idPresets
				host:Op("GedOpOpenPresetEditor", panel.context, panel:GetMultiSelection(), host.PresetClass)
			end,
		}),
		PlaceObj('XTemplateWindow', {
			'__context', function (parent, context) return "SelectedPreset" end,
			'__class', "GedBindView",
			'BindView', "class",
			'BindFunc', "GedGetObjectClass",
			'OnViewChanged', function (self, value, control)
				local app = GetParentOfKind(self, "GedApp")
				rawset(app, "selected_class", value)
				app:ActionsUpdated()
			end,
		}),
		}),
})