kitgit

tirbofish/dropbear · commit

08baee624542182e73816136b014d729178c656c

feature: animation scripting works. jarvis, run github actions

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-02-19 02:08

view full diff

diff --git a/crates/eucalyptus-core/src/animation/mod.rs b/crates/eucalyptus-core/src/animation/mod.rs
index 6fa3b19..07f2a19 100644
--- a/crates/eucalyptus-core/src/animation/mod.rs
+++ b/crates/eucalyptus-core/src/animation/mod.rs
@@ -5,7 +5,13 @@ use dropbear_engine::animation::{AnimationComponent, AnimationSettings};
 use dropbear_engine::asset::ASSET_REGISTRY;
 use dropbear_engine::entity::MeshRenderer;
 use dropbear_engine::graphics::SharedGraphicsContext;
+use jni::objects::JObject;
+use jni::JNIEnv;
 use crate::component::{Component, ComponentDescriptor, InspectableComponent, SerializedComponent};
+use crate::ptr::WorldPtr;
+use crate::scripting::jni::utils::ToJObject;
+use crate::scripting::native::DropbearNativeError;
+use crate::scripting::result::DropbearNativeResult;
 
 #[typetag::serde]
 impl SerializedComponent for AnimationComponent {}
@@ -75,14 +81,22 @@ impl InspectableComponent for AnimationComponent {
                 "No Animations"
             };
 
+            let mut selection_changed = false;
             ComboBox::from_label("Animation")
                 .selected_text(selected_label)
                 .show_ui(ui, |ui| {
                     for (index, name) in self.available_animations.iter().enumerate() {
-                        ui.selectable_value(&mut selected_index, index, name);
+                        if ui.selectable_value(&mut selected_index, index, name).changed() {
+                            selection_changed = true;
+                        }
                     }
                 });
 
+            if selection_changed && has_animations {
+                self.active_animation_index = Some(selected_index);
+                enabled = true;
+            }
+
             ui.horizontal(|ui| {
                 ui.label("Active");
 
@@ -138,4 +152,395 @@ impl InspectableComponent for AnimationComponent {
             }
         });
     }
+}
+
+fn collect_available_animations(
+    world: &World,

Large diffs are not rendered by default. Showing the first 50 of 930 lines. Show full diff