update data structure for icon gen tool
This commit is contained in:
+13
-2
@@ -1,8 +1,8 @@
|
||||
use crate::agent::tools::context::EditorToolContext;
|
||||
use crate::agent::asset::ImageId;
|
||||
use crate::agent::tools::context::EditorToolContext;
|
||||
use crate::framework::tool::{Tool, ToolFailure, ToolFailureKind};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::{Value, json};
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
|
||||
@@ -56,6 +56,17 @@ pub struct EditorIconSpritesheetResult {
|
||||
pub spritesheet_resource: Option<Value>,
|
||||
pub spritesheet_asset: Option<Value>,
|
||||
pub project: Option<Value>,
|
||||
#[serde(default)]
|
||||
pub icon_image_srcs: Vec<EditorIconSpritesheetImage>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EditorIconSpritesheetImage {
|
||||
pub image_src: String,
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
pub resource: Option<Value>,
|
||||
}
|
||||
|
||||
impl Tool for GenerateIconSpritesheetTool {
|
||||
|
||||
Reference in New Issue
Block a user