|
|
|
|
|
PlaceObj('XTemplate', { |
|
group = "GedApps", |
|
id = "GedConsoleSaveManager", |
|
save_in = "Ged", |
|
PlaceObj('XTemplateWindow', { |
|
'__class', "GedApp", |
|
'Title', "Console Save Manager", |
|
'AppId', "Console Save Manager", |
|
}, { |
|
PlaceObj('XTemplateWindow', { |
|
'__context', function (parent, context) return "root" end, |
|
'__class', "GedTreePanel", |
|
'Id', "idTargets", |
|
'Title', "Targets", |
|
'ActionContext', "TargetsPanelContext", |
|
'FormatFunc', "GedConsoleTargetsTree", |
|
'Format', "<EditorView>", |
|
'SelectionBind', "SelectedTarget", |
|
}), |
|
PlaceObj('XTemplateWindow', { |
|
'__class', "XPanelSizer", |
|
}), |
|
PlaceObj('XTemplateWindow', { |
|
'__context', function (parent, context) return "SelectedTarget" end, |
|
'__class', "GedListPanel", |
|
'Id', "idSaves", |
|
'Title', "Target Saves", |
|
'ActionContext', "SavesPanelContext", |
|
'Format', "<if(savedata_display)><savedata_display></if><if(not(savedata_display))><savedata_directory></if>", |
|
'SelectionBind', "SelectedSave", |
|
'EmptyText', "<if(power_on)>No saves available.</if><if(not(power_on))>Target is powered off.</if>", |
|
}), |
|
PlaceObj('XTemplateWindow', { |
|
'__class', "XPanelSizer", |
|
}), |
|
PlaceObj('XTemplateWindow', { |
|
'__context', function (parent, context) return "SelectedSave" end, |
|
'__class', "GedPropPanel", |
|
'Id', "idSave", |
|
'Title', "Selected Save", |
|
'RootObjectBindName', "SelectedSave", |
|
}), |
|
PlaceObj('XTemplateAction', { |
|
'ActionId', "PowerOn", |
|
'ActionTranslate', false, |
|
'ActionName', "Power On", |
|
'ActionIcon', "CommonAssets/UI/Ged/poweroff.png", |
|
'ActionToolbar', "main", |
|
'OnAction', function (self, host, source, ...) |
|
if host.idTargets:GetSelection() then |
|
host:Op("GedInvokeMethod", "SelectedTarget", "PowerOn") |
|
end |
|
end, |
|
'ActionContexts', { |
|
"TargetsPanelContext", |
|
}, |
|
}), |
|
PlaceObj('XTemplateAction', { |
|
'ActionId', "Refresh", |
|
'ActionTranslate', false, |
|
'ActionName', "Refresh", |
|
'ActionIcon', "CommonAssets/UI/Ged/undo.tga", |
|
'ActionToolbar', "main", |
|
'ActionToolbarSplit', true, |
|
'ActionShortcut', "F5", |
|
'OnAction', function (self, host, source, ...) |
|
host:Op("GedOpPlayStationRefreshTarget") |
|
end, |
|
'ActionContexts', { |
|
"SavesPanelContext", |
|
}, |
|
}), |
|
PlaceObj('XTemplateAction', { |
|
'ActionId', "NewSave", |
|
'ActionTranslate', false, |
|
'ActionName', "New Save", |
|
'ActionIcon', "CommonAssets/UI/Ged/new.tga", |
|
'ActionToolbar', "main", |
|
'ActionShortcut', "Ctrl-N", |
|
'OnAction', function (self, host, source, ...) |
|
if host.idTargets:GetSelection() then |
|
host:Op("GedOpConsoleTargetNewSave", "SelectedTarget") |
|
end |
|
end, |
|
'ActionContexts', { |
|
"SavesPanelContext", |
|
}, |
|
}), |
|
}), |
|
}) |
|
|
|
|