FreeTrainの進化系を目指す
建物建設ツール、fromとcatalogモデル作成中
| @@ -1,4 +1,9 @@ | ||
| 1 | -・凹型(interior)/凸型(exterior)に分かれた3Dオブジェクト(線路など用) | |
| 1 | +●検討事項 | |
| 2 | + KVS,キャッシュサービス(メモリ⇔ファイル) ※utilにcacheクラスがあるが、WeakRefferenceのみ | |
| 3 | + 1.WeakRefferenceの解放タイミングをキャッチできるか? | |
| 4 | + 2.CustomAttributeを付与したメソッドのコールをフックできるか? | |
| 5 | + | |
| 6 | +・凹型(interior)/凸型(exterior)に分かれた3Dオブジェクト(線路など用) | |
| 2 | 7 | ・選択UIの基本、ステータス表示の基本 IInputHandler-ITargetSelector<-*SitePicker 見た目=skin |
| 3 | 8 | ・[済]MRT昼夜同時描画/HitTest用マップ |
| 4 | 9 |
| @@ -5,11 +5,21 @@ | ||
| 5 | 5 | using System.Data; |
| 6 | 6 | using System.Text; |
| 7 | 7 | using System.Windows.Forms; |
| 8 | +using nft.contributions.graphics; | |
| 9 | +using nft.framework.plugin; | |
| 10 | +using nft.core.structure; | |
| 8 | 11 | |
| 9 | 12 | namespace nft.ui.core { |
| 10 | 13 | public partial class BuildTool : UserControl { |
| 11 | 14 | public BuildTool() { |
| 12 | 15 | InitializeComponent(); |
| 16 | + LoadCatalog(); | |
| 13 | 17 | } |
| 18 | + | |
| 19 | + protected void LoadCatalog(){ | |
| 20 | + CtbStructureSkinCatalog ctb = PluginManager.theInstance.GetContribution(@"system\C_StructureSkinCatalog") as CtbStructureSkinCatalog; | |
| 21 | + | |
| 22 | + SkinCatalog catalog = ctb.Catalog; | |
| 23 | + } | |
| 14 | 24 | } |
| 15 | 25 | } |
| @@ -280,7 +280,7 @@ | ||
| 280 | 280 | |
| 281 | 281 | <contribution type="Anonymous" id="Test_CtbAnonymous"> |
| 282 | 282 | <name>匿名コントリビューション</name> |
| 283 | - <description>ファクトリ宣言を必要としない、孤立したコントリビューションのサンプル</description> | |
| 283 | + <description>ファクトリ宣言を必要としない、孤立したコントリビューションのサンプル(CtbAnonymousを継承すべし)</description> | |
| 284 | 284 | <class name="nft.debug.TestAnonymousCtb" codebase=".Core"/> |
| 285 | 285 | </contribution> |
| 286 | 286 |
| @@ -290,6 +290,12 @@ | ||
| 290 | 290 | <command type="ModalForm" menupath="FILE\GAME|NEWMAP" /> |
| 291 | 291 | </contribution> |
| 292 | 292 | |
| 293 | + <contribution type="Anonymous" id="C_StructureSkinCatalog"> | |
| 294 | + <name>[カタログ]建造物スキン</name> | |
| 295 | + <description>建造物外観スキンのカタログ</description> | |
| 296 | + <class name="nft.contributions.graphics.CtbStructureSkinCatalog" codebase=".Core"/> | |
| 297 | + </contribution> | |
| 298 | + | |
| 293 | 299 | <!--<contribution type="SubForm" id="InspectorTool"> |
| 294 | 300 | <name>調査ツール</name> |
| 295 | 301 | <class name="nft.ui.core.InspectorTool" codebase=".UI"/> |
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | <contribution type="Command" id="C_BuildTool"> |
| 18 | 18 | <name>建造物設置フォーム</name> |
| 19 | 19 | <class name="nft.ui.core.BuildTool" codebase=".UI"/> |
| 20 | - <command type="ModelessForm" menupath="BUILD\STRUCTURES" /> | |
| 20 | + <command type="SubForm" menupath="BUILD\STRUCTURES" /> | |
| 21 | 21 | </contribution> |
| 22 | 22 | <contribution type="GameTool" id="BuildTool"> |
| 23 | 23 | <name>建造物設置ツール</name> |
| @@ -0,0 +1,32 @@ | ||
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using System.Text; | |
| 4 | +using nft.framework.plugin; | |
| 5 | +using nft.framework; | |
| 6 | +using nft.core.structure; | |
| 7 | +using nft.framework.drawing; | |
| 8 | +using nft.core.view; | |
| 9 | +using nft.core.geometry; | |
| 10 | +using nft.util; | |
| 11 | +using System.Diagnostics; | |
| 12 | +using nft.core; | |
| 13 | +using System.Drawing; | |
| 14 | +using nft.core.graphics; | |
| 15 | +using ConditionedTextureSrc = nft.core.view.ConditionedResource<nft.core.graphics.TextureSrc>; | |
| 16 | + | |
| 17 | +namespace nft.contributions.graphics { | |
| 18 | + public class CtbStructureSkinCatalog : CtbAnonymous { | |
| 19 | + protected SkinCatalog catalog; | |
| 20 | + | |
| 21 | + | |
| 22 | + public CtbStructureSkinCatalog(Plugin owenr, ParamsReader reader) | |
| 23 | + : base(owenr, reader) { | |
| 24 | + } | |
| 25 | + | |
| 26 | + public SkinCatalog Catalog { | |
| 27 | + get { | |
| 28 | + return SkinCatalog.Get(); | |
| 29 | + } | |
| 30 | + } | |
| 31 | + } | |
| 32 | +} |
| @@ -21,6 +21,7 @@ | ||
| 21 | 21 | protected CatalogVarCollectionElement varElement; |
| 22 | 22 | |
| 23 | 23 | protected SkinCatalog() { |
| 24 | + init(); | |
| 24 | 25 | } |
| 25 | 26 | protected void init(){ |
| 26 | 27 | varCollection = new CatalogVariableCollection(); |