Refactor AIImages mod to replace ArtStyle enum with ArtStyleDef name for improved flexibility in prompt generation. Update UI components to reflect changes in art style selection and enhance scrolling functionality in the right column. Update AIImages.dll to incorporate the latest modifications.
This commit is contained in:
46
Source/AIImages/Defs/ArtStyleDef.cs
Normal file
46
Source/AIImages/Defs/ArtStyleDef.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Verse;
|
||||
|
||||
namespace AIImages
|
||||
{
|
||||
/// <summary>
|
||||
/// Определение художественного стиля для генерации изображений
|
||||
/// </summary>
|
||||
[SuppressMessage(
|
||||
"Major Code Smell",
|
||||
"S1104:Fields should not have public accessibility",
|
||||
Justification = "Required for RimWorld's Def system XML serialization"
|
||||
)]
|
||||
public class ArtStyleDef : Def
|
||||
{
|
||||
/// <summary>
|
||||
/// Промпт для позитивного описания стиля
|
||||
/// </summary>
|
||||
public string positivePrompt = "";
|
||||
|
||||
/// <summary>
|
||||
/// Промпт для негативного описания (что исключить)
|
||||
/// </summary>
|
||||
public string negativePrompt = "";
|
||||
|
||||
/// <summary>
|
||||
/// Теги качества специфичные для этого стиля
|
||||
/// </summary>
|
||||
public string qualityTags = "";
|
||||
|
||||
/// <summary>
|
||||
/// Добавлять ли базовые теги качества (highly detailed, professional, masterpiece, best quality)
|
||||
/// </summary>
|
||||
public bool addBaseQualityTags = true;
|
||||
|
||||
/// <summary>
|
||||
/// Добавлять ли базовые негативные промпты (ugly, deformed, low quality, etc.)
|
||||
/// </summary>
|
||||
public bool addBaseNegativePrompts = true;
|
||||
|
||||
/// <summary>
|
||||
/// Порядок сортировки в UI
|
||||
/// </summary>
|
||||
public int sortOrder = 100;
|
||||
}
|
||||
}
|
||||
36
Source/AIImages/Defs/ImageSizePresetDef.cs
Normal file
36
Source/AIImages/Defs/ImageSizePresetDef.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Verse;
|
||||
|
||||
namespace AIImages
|
||||
{
|
||||
/// <summary>
|
||||
/// Предустановка размера изображения
|
||||
/// </summary>
|
||||
[SuppressMessage(
|
||||
"Major Code Smell",
|
||||
"S1104:Fields should not have public accessibility",
|
||||
Justification = "Required for RimWorld's Def system XML serialization"
|
||||
)]
|
||||
public class ImageSizePresetDef : Def
|
||||
{
|
||||
/// <summary>
|
||||
/// Ширина изображения в пикселях
|
||||
/// </summary>
|
||||
public int width = 512;
|
||||
|
||||
/// <summary>
|
||||
/// Высота изображения в пикселях
|
||||
/// </summary>
|
||||
public int height = 512;
|
||||
|
||||
/// <summary>
|
||||
/// Категория размера (Square, Portrait, Landscape)
|
||||
/// </summary>
|
||||
public string category = "Square";
|
||||
|
||||
/// <summary>
|
||||
/// Порядок сортировки в UI
|
||||
/// </summary>
|
||||
public int sortOrder = 100;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user