ci / release (push) Successful in 5m5s
ci-platforms / build (amd64, windows, windows-2022) (push) Skipped
ci-platforms / build (arm64, darwin, macos-15) (push) Skipped
ci-platforms / build (amd64, darwin, macos-15-intel) (push) Skipped
ci / checks (push) Successful in 4m41s
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 7m14s
The remaining editor strings and undo step names; component, field, enum, setting, diagnostic and Script API texts under schema.*, enum.*, setting.*, diag.* and api.*; the launcher, the in-game Settings View with a Language setting, the CLI and aego schema show --lang. Every documentation page has a .ru.md translation; the site has a full Russian tree with hreflang, a language switch and ru/llms.txt; aego docs check --lang ru. New doc.tutorial and doc.recipe icons. Fix: an animator restored by a rewind prepares its controller before the replayed step.
34 lines
1.0 KiB
Go
34 lines
1.0 KiB
Go
package editor
|
|
|
|
import (
|
|
"aego/editor/core/workspace"
|
|
"aego/editor/ext"
|
|
"aego/engine"
|
|
"aego/engine/i18n"
|
|
"aego/modules/input"
|
|
raw "aego/platform/input"
|
|
)
|
|
|
|
func Hook(e *ext.Registry) error {
|
|
ed := e.Editor()
|
|
if err := e.SettingsPage(input.ID, NewPage(ed).Draw, i18n.T("i18n.input.players", "Players"), i18n.T("i18n.input.dead_zone", "Dead Zone"), i18n.T("i18n.input.start_stack", "Start Stack"), i18n.T("i18n.input.actions", "Actions"), i18n.T("i18n.input.bindings", "Bindings"), i18n.T("i18n.input.contexts", "Contexts")); err != nil {
|
|
return err
|
|
}
|
|
world := func() *engine.World {
|
|
if ed == nil {
|
|
return nil
|
|
}
|
|
return ed.PlayWorld()
|
|
}
|
|
rawInput := func() *raw.State {
|
|
if ed == nil || ed.Engine == nil {
|
|
return nil
|
|
}
|
|
return ed.Engine.Input()
|
|
}
|
|
if err := e.Panel(workspace.Desc{Panel: NewDevices(world, rawInput), Near: workspace.Console, Icon: "panel.input_devices"}); err != nil {
|
|
return err
|
|
}
|
|
return e.Panel(workspace.Desc{Panel: NewFocus(world), Near: workspace.Console, Icon: "panel.input_focus"})
|
|
}
|