com.koiusa.actor.widget
v0.2.2
Published
Reusable UI Toolkit controls and quick-menu presenters for Actor Runtime.
Readme
Koiusa Actor Widget
Reusable UI Toolkit controls bound to com.koiusa.actor.runtime. Applications provide
catalog navigation, localization and lifecycle composition; the controls never reference
MMD, VRM or another format runtime.
Common presenters
FadingElementPresenter, QuickMenuVisibilityController, and
TabbedActionMenuPresenter provide format-neutral overlay behavior for application-owned
menus. They are available from the Koiusa.ActorRuntime.UI namespace and do not require an
Actor session.
Profiles before an actor is loaded
Configure shared dependencies once with ActorQuickMenuContext, then pass the same context to
the navigation and motion controllers:
var context = new ActorQuickMenuContext
{
Session = session,
ActorCatalog = actorCatalog,
MotionCatalog = motionCatalog,
AppearanceModeNames = appearanceModeNames,
AppearanceModeIndex = () => appearanceModeIndex,
AppearanceModeSelected = SelectAppearanceMode,
PhysicsBackendNames = physicsBackendNames,
PhysicsBackendIndex = () => physicsBackendIndex,
PhysicsBackendSelected = SelectPhysicsBackend,
ExtendVisibility = ExtendVisibility,
LoadingChanged = RefreshLoadingState
};
var navigation = new ActorNavigationQuickMenuController(root, context);
var motion = new ActorMotionQuickMenuController(root, context);Session is required. Configure the context before constructing controllers; controllers copy
the dependencies they use and do not treat the context as mutable runtime state.
Application-owned mode lists are displayed and selectable even while the session has no current actor. The index getters must return the current selection synchronously after their corresponding selection callback runs. Applications own localization and pass the resolved display labels they want the quick menu to show.
AppearanceFallback and PhysicsFallback remain available for Actor Runtime clients that expose
profiles through IAppearanceFeature and IPhysicsFeature before an actor is loaded. Those clients
can persist fallback selection through AppearanceSelected and PhysicsSelected; an active
actor's feature takes precedence. Do not configure both a mode-list callback set and a fallback
for the same responsibility unless reset behavior still requires the fallback physics feature.
The controllers bind only to Actor Runtime contracts. They use IActorSession.IsBusy
and operation/change notifications to disable commands and refresh after asynchronous
feature completion, failure, or cancellation; no MMD or VRM type is referenced.
