Files
aego/editor/panels/sceneview/capture.go
sanspie 2fcbaa6c12 Stage 11g1: the editor in Russian (D348)
engine/i18n with catalogs, plural forms and module catalogs; tools/i18n extract and check; the editor UI, menus, panels and notices in Russian with the author's terms; overflow test and tooltip wrapping; the English log.
2026-10-25 15:31:22 +03:00

33 lines
702 B
Go

package sceneview
import (
"aego/editor/core/context"
"aego/engine/i18n"
)
const CommandCapture = "scene.capture"
func (p *Panel) RequestCapture() error {
if p.d.Docs.Doc() == nil || p.target == nil {
p.d.Notices.Notify(context.LevelInfo, i18n.Note("editor.sceneview.open_a_scene_to_capture", "Open a scene to capture the Scene View"))
return nil
}
if p.d.Capture == nil {
return nil
}
p.captureReq = true
return nil
}
func (p *Panel) flushCapture() {
if !p.captureReq || p.target == nil || p.d.Capture == nil {
return
}
p.captureReq = false
name := "scene"
if d := p.d.Docs.Doc(); d != nil {
name = d.Name()
}
p.d.Capture(p.target.Texture, p.target.W, p.target.H, name)
}