require( "scripts/style.lua" );
require( "scripts/tome_footer.lua" );

-- If the collection object is visible, return sObjectImageName, else return "" 
function F_GetCollectionObjectImage( sObjectName, sObjectImageName )
  return IsCollectionObjectVisible( sObjectName, sObjectImageName )
end

MakeDialog
{
	name = "collection",
	
	KnowledgeTomeWindow
	{
		x = 0,
		y = 0,
		w = GetScreenWidth(),
		h = GetScreenHeight(),
		
		Bitmap
		{
			image="backgrounds/options",
			x = kCenter,
			y = kCenter - 84,
			
			
			Bitmap
			{
				image ="backgrounds/collection/forme_fee",
				name = "fee_base",
				x = kCenter + 202,
				y = kCenter - 110,
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_01", "backgrounds/collection/pierrefee001" ),
					name= "LD_Collection_Circle_01",
					x = kCenter - 119,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_02", "backgrounds/collection/pierrefee002" ),
					name= "LD_Collection_Circle_02",
					x = kCenter - 60,
					y = kCenter - 37,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_03",  "backgrounds/collection/pierrefee003" ),
					name= "LD_Collection_Circle_03",
					x = kCenter - 3,
					y = kCenter - 37,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_04",  "backgrounds/collection/pierrefee004" ),
					name= "LD_Collection_Circle_04",
					x = kCenter + 56,
					y = kCenter - 37,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_05",  "backgrounds/collection/pierrefee005" ),
					name= "LD_Collection_Circle_05",
					x = kCenter  + 120,
					y = kCenter - 37,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_06",  "backgrounds/collection/pierrefee006" ),
					name= "LD_Collection_Circle_06",
					x = kCenter - 119,
					y = kCenter + 41,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_07",  "backgrounds/collection/pierrefee007" ),
					name= "LD_Collection_Circle_07",
					x = kCenter - 60,
					y = kCenter + 41,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_08",  "backgrounds/collection/pierrefee008" ),
					name= "LD_Collection_Circle_08",
					x = kCenter - 3,
					y = kCenter + 41,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_09", "backgrounds/collection/pierrefee009" ),
					name= "LD_Collection_Circle_09",
					x = kCenter + 56,
					y = kCenter + 41,
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Circle_10",  "backgrounds/collection/pierrefee010" ),
					name= "LD_Collection_Circle_10",
					x = kCenter + 120,
					y = kCenter + 41,
				},	
			},
			
		--------------------------------------------------------------------
			Bitmap
			{
				image = "backgrounds/collection/forme_lune",
				name = "lune_base",
				x = kCenter - 198,
				y = kCenter - 110,
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_01",  "backgrounds/collection/pierrelune001" ),
					name= "LD_Collection_Lune_01",
					x = kCenter - 121,
					y = kCenter - 37,
				
				},

				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_02",  "backgrounds/collection/pierrelune002" ),
					name= "LD_Collection_Lune_02",
					x = kCenter - 58,
					y = kCenter - 37,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_03",  "backgrounds/collection/pierrelune003" ),
					name= "LD_Collection_Lune_03",
					x = kCenter + 6,
					y = kCenter - 37,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_04", "backgrounds/collection/pierrelune004" ),
					name= "LD_Collection_Lune_04",
					x = kCenter + 70,
					y = kCenter - 37,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_05", "backgrounds/collection/pierrelune005" ),
					name= "LD_Collection_Lune_05",
					x = kCenter + 122,
					y = kCenter - 37,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_06", "backgrounds/collection/pierrelune006" ),
					name= "LD_Collection_Lune_06",
					x = kCenter - 121,
					y = kCenter + 41,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_07", "backgrounds/collection/pierrelune007" ),
					name= "LD_Collection_Lune_07",
					x = kCenter - 58,
					y = kCenter + 41,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_08", "backgrounds/collection/pierrelune008" ),
					name= "LD_Collection_Lune_08",
					x = kCenter + 3,
					y = kCenter + 41,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_09", "backgrounds/collection/pierrelune009" ),
					name= "LD_Collection_Lune_09",
					x = kCenter + 64,
					y = kCenter + 41,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Lune_10",  "backgrounds/collection/pierrelune010" ),
					name= "LD_Collection_Lune_10",
					x = kCenter + 121,
					y = kCenter + 41,
				},	
				
				
				
			},
	-------------------------------------------------------------------Image ents ---------		
			Bitmap
			{
				image ="backgrounds/collection/forme_ents",
				name = "ents_base",
				x = kCenter - 198,
				y = kCenter + 118,
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_01",  "backgrounds/collection/boisents001" ),
					name= "LD_Collection_Rents_01",
					x = kCenter - 120,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_02", "backgrounds/collection/boisents002" ),
					name= "LD_Collection_Rents_02",
					x = kCenter - 59,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_03", "backgrounds/collection/boisents003" ),
					name= "LD_Collection_Rents_03",
					x = kCenter  + 3 ,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_04", "backgrounds/collection/boisents004" ),
					name= "LD_Collection_Rents_04",
					x = kCenter + 59,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_05", "backgrounds/collection/boisents005" ),
					name= "LD_Collection_Rents_05",
					x = kCenter + 117 ,
					y = kCenter - 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_06", "backgrounds/collection/boisents006" ),
					name= "LD_Collection_Rents_06",
					x = kCenter - 120,
					y = kCenter + 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_07", "backgrounds/collection/boisents007" ),
					name= "LD_Collection_Rents_07",
					x = kCenter - 59,
					y = kCenter + 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_08", "backgrounds/collection/boisents008" ),
					name= "LD_Collection_Rents_08",
					x = kCenter + 3,
					y = kCenter + 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_09", "backgrounds/collection/boisents009" ),
					name= "LD_Collection_Rents_09",
					x = kCenter + 67,
					y = kCenter + 37,
				
				},
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Rents_10", "backgrounds/collection/boisents010" ),
					name= "LD_Collection_Rents_10",
					x = kCenter + 125,
					y = kCenter + 37,
				
				},

			},

			-----------------------------------------------------Image souffle ----------

			Bitmap
			{
				image ="backgrounds/collection/forme_souffle",
				name = "souffle_base",
				x = kCenter + 202,
				y = kCenter + 118,
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_01", "backgrounds/collection/souffle001" ),
					name= "LD_Collection_Vent_01",
					x = kCenter - 116,
					y = kCenter - 33,
				
				},		

				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_02", "backgrounds/collection/souffle002" ),
					name= "LD_Collection_Vent_02",
					x = kCenter - 56,
					y = kCenter - 33,
				
				},	
				
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_03", "backgrounds/collection/souffle003" ),
					name= "LD_Collection_Vent_03",
					x = kCenter,
					y = kCenter - 33,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_04", "backgrounds/collection/souffle004" ),
					name= "LD_Collection_Vent_04",
					x = kCenter + 60,
					y = kCenter - 33,
				
				},

				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_05", "backgrounds/collection/souffle005" ),
					name= "LD_Collection_Vent_05",
					x = kCenter + 118,
					y = kCenter - 33,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_06", "backgrounds/collection/souffle006" ),
					name= "LD_Collection_Vent_06",
					x = kCenter - 116,
					y = kCenter + 42,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_07", "backgrounds/collection/souffle007" ),
					name= "LD_Collection_Vent_07",
					x = kCenter - 56,
					y = kCenter + 42,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_08", "backgrounds/collection/souffle008" ),
					name= "LD_Collection_Vent_08",
					x = kCenter ,
					y = kCenter + 42,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_09", "backgrounds/collection/souffle009" ),
					name= "LD_Collection_Vent_09",
					x = kCenter + 60,
					y = kCenter + 42,
				
				},	
				
				Bitmap
				{
					image = F_GetCollectionObjectImage( "LD_Collection_Vent_10", "backgrounds/collection/souffle010" ),
					name= "LD_Collection_Vent_10",
					x = kCenter + 118,
					y = kCenter + 42,
				
				},	
				
				
			},
			---------------------- Changement de chapitre ------------
            
	
            Text
            {
    			font = PapyrusLegendFont,
    			name = "moon_stone_title",
    			x=kCenter - 195,
    			y=kCenter - 210,
    			flags = kHAlignLeft + kVAlignCenter,
    			w=300,
    			h=70,
    			label="moonstone",
            },
           
            Button
            {
                x=kCenter  - 60,
    			y=kCenter  - 212,
    			graphics = HelpToLButtonGraphics,
    			name="moonstonehelp",
    			command=
    				function()
    					DisplayDialog { "scripts/okbox.lua", body = "tooltip_collection_lune", title = "moonstone" };
    				end
            },
		   
            Text
            {
    			font = PapyrusLegendFont,
    			name = "ent_root_title",
    			x=kCenter - 195,
    			y=kCenter  + 16,
    			flags = kHAlignLeft + kVAlignCenter,
    			w=300,
    			h=70,
    			label="entsroot",
            },
            
            Button
            {
                x=kCenter  - 60,
    			y=kCenter  + 11,
    			graphics = HelpToLButtonGraphics,
    			name="entsroothelp",
    			command=
    				function()
    					DisplayDialog { "scripts/okbox.lua", body = "tooltip_collection_ents", title = "entsroot" };
    				end
            },
		   
            Text
            {
    			font = PapyrusLegendFont,
    			name = "Faeries_rune_title",
    			x=kCenter + 200,
    			y=kCenter - 210,
    			flags = kHAlignLeft + kVAlignCenter,
    			w=300,
    			h=70,
    			label="Faeriesrune",
            },
            
            Button
            {
                x=kCenter  + 335,
    			y=kCenter  - 212,
    			graphics = HelpToLButtonGraphics,
    			name="Faeriesrunehelp",
    			command=
    				function()
    					DisplayDialog { "scripts/okbox.lua", body = "tooltip_collection_fee", title = "Faeriesrune" };
    				end
            },
		   
            Text
            {
    			font = PapyrusLegendFont,
    			name = "Sylphes_blow_title",
    			x=kCenter + 200,
    			y=kCenter  + 16,
    			flags = kHAlignLeft + kVAlignCenter,
    			w=300,
    			h=70,
    			label="Sylphesblow",
            },
            
            Button
            {
                x=kCenter  + 335,
    			y=kCenter  + 11,
    			graphics = HelpToLButtonGraphics,
    			name="Sylphesblowhelp",
    			command=
    				function()
    					DisplayDialog { "scripts/okbox.lua", body = "tooltip_collection_vent", title = "Sylphesblow" };
    				end
            },
			
			tab_placement( 5 ),
			tome_footer(),
		},
	},
}
