Skip to content

Commit

Permalink
Atlas support in vfx.
Browse files Browse the repository at this point in the history
Spine updates first in update, so bones are transformed correctly and sync is in the same frame.
Project splash show path of project to make it easier to see previous projects that are same anme.
  • Loading branch information
Tom-Ski committed Oct 3, 2024
1 parent e0466d3 commit 1dd8dbc
Show file tree
Hide file tree
Showing 8 changed files with 496 additions and 353 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.talosvfx.talos.editor.addons.scene.logic.componentwrappers;

import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.utils.Array;
import com.talosvfx.talos.editor.addons.scene.apps.spriteeditor.SpriteEditorApp;
import com.talosvfx.talos.editor.addons.scene.assets.AssetRepository;
Expand Down Expand Up @@ -33,6 +35,12 @@ public Array<PropertyWidget> getListOfProperties () {
// }

PropertyWidget descriptorWidget = WidgetFactory.generateForGameAsset(component, "gameAsset", null, "Effect", GameAssetType.VFX);
descriptorWidget.addListener(new ChangeListener() {
@Override
public void changed (ChangeEvent event, Actor actor) {
component.setEffectRef(null);
}
});

ButtonPropertyWidget<String> linkedToWidget = new ButtonPropertyWidget<String>("Effect Project", "Edit", new ButtonPropertyWidget.ButtonListener<String>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@ private void buildOpenTable (Table table) {
if(iter++ > 5) break;

FileHandle handle = Gdx.files.absolute(recentProject.getProjectPath());
ButtonLabel recentProjectLabel = new ButtonLabel(SharedResources.skin.getDrawable("ic-file-blank"), handle.name());
String pathEnd = handle.path();
//Show maximum of 40 characters of path end
if(pathEnd.length() > 40) {
pathEnd = "..." + pathEnd.substring(pathEnd.length() - 40);
}
ButtonLabel recentProjectLabel = new ButtonLabel(SharedResources.skin.getDrawable("ic-file-blank"), handle.name() + " (" + pathEnd + ")");
recentProjectLabel.addListener(new ClickListener() {
@Override
public void clicked (InputEvent event, float x, float y) {
Expand Down
Loading

0 comments on commit 1dd8dbc

Please sign in to comment.