Fixed Button texture swapping. Fixed Button scripts on scene change. Added buttons to scenes. Added SHEDITOR define for Managed #341
|
@ -1,4 +1,4 @@
|
||||||
Start Maximized: true
|
Start Maximized: true
|
||||||
Working Scene ID: 97086054
|
Working Scene ID: 97158628
|
||||||
Window Size: {x: 1920, y: 1013}
|
Window Size: {x: 1920, y: 1013}
|
||||||
Style: 0
|
Style: 0
|
|
@ -1,16 +1,16 @@
|
||||||
[Window][MainStatusBar]
|
[Window][MainStatusBar]
|
||||||
Pos=0,989
|
Pos=0,981
|
||||||
Size=1920,20
|
Size=1920,20
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][SHEditorMenuBar]
|
[Window][SHEditorMenuBar]
|
||||||
Pos=0,48
|
Pos=0,48
|
||||||
Size=1920,941
|
Size=1920,933
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Hierarchy Panel]
|
[Window][Hierarchy Panel]
|
||||||
Pos=0,187
|
Pos=0,186
|
||||||
Size=300,802
|
Size=300,795
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000004,0
|
DockId=0x00000004,0
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@ Collapsed=0
|
||||||
|
|
||||||
[Window][Inspector]
|
[Window][Inspector]
|
||||||
Pos=1434,48
|
Pos=1434,48
|
||||||
Size=486,941
|
Size=486,933
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000006,0
|
DockId=0x00000006,0
|
||||||
|
|
||||||
[Window][Profiler]
|
[Window][Profiler]
|
||||||
Pos=0,48
|
Pos=0,48
|
||||||
Size=300,137
|
Size=300,136
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000003,0
|
DockId=0x00000003,0
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ DockId=0x0000000B,0
|
||||||
|
|
||||||
[Window][ Viewport]
|
[Window][ Viewport]
|
||||||
Pos=302,48
|
Pos=302,48
|
||||||
Size=1130,705
|
Size=1130,697
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000000B,0
|
DockId=0x0000000B,0
|
||||||
|
|
||||||
|
@ -93,14 +93,14 @@ Collapsed=0
|
||||||
DockId=0x0000000A,0
|
DockId=0x0000000A,0
|
||||||
|
|
||||||
[Window][ Asset Browser]
|
[Window][ Asset Browser]
|
||||||
Pos=302,755
|
Pos=302,747
|
||||||
Size=1130,234
|
Size=1130,234
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000000C,0
|
DockId=0x0000000C,0
|
||||||
|
|
||||||
[Window][Material Inspector]
|
[Window][Material Inspector]
|
||||||
Pos=1434,48
|
Pos=1434,48
|
||||||
Size=486,941
|
Size=486,933
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000006,1
|
DockId=0x00000006,1
|
||||||
|
|
||||||
|
@ -116,13 +116,13 @@ Collapsed=0
|
||||||
|
|
||||||
[Window][Collider Tag Panel]
|
[Window][Collider Tag Panel]
|
||||||
Pos=302,48
|
Pos=302,48
|
||||||
Size=1130,705
|
Size=1130,697
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000000B,1
|
DockId=0x0000000B,1
|
||||||
|
|
||||||
[Window][Input Bindings Panel]
|
[Window][Input Bindings Panel]
|
||||||
Pos=1434,48
|
Pos=1434,48
|
||||||
Size=486,941
|
Size=486,933
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000006,2
|
DockId=0x00000006,2
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ Column 15 Weight=1.2009
|
||||||
Column 16 Weight=1.0132
|
Column 16 Weight=1.0132
|
||||||
|
|
||||||
[Docking][Data]
|
[Docking][Data]
|
||||||
DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,71 Size=1920,941 Split=X
|
DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=0,77 Size=1920,933 Split=X
|
||||||
DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1432,1036 Split=X
|
DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1432,1036 Split=X
|
||||||
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=300,1036 Split=Y Selected=0x1E6EB881
|
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=300,1036 Split=Y Selected=0x1E6EB881
|
||||||
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,147 Selected=0x1E6EB881
|
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,147 Selected=0x1E6EB881
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- VertexShader: 46580970
|
- VertexShader: 46580970
|
||||||
FragmentShader: 35983630
|
FragmentShader: 35983630
|
||||||
SubPass: G-Buffer Write
|
SubPass: UI
|
||||||
Properties:
|
Properties:
|
||||||
data.color: {x: 1, y: 1, z: 1, w: 1}
|
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||||
data.textureIndex: 54429632
|
data.textureIndex: 51995224
|
||||||
data.alpha: 0
|
data.alpha: 0
|
||||||
data.beta: {x: 1, y: 1, z: 1}
|
data.beta: {x: 1, y: 1, z: 1}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: howToPlay_default
|
||||||
|
ID: 65084899
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: howToPlay_hover
|
||||||
|
ID: 58647112
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: howToPlay_pressed
|
||||||
|
ID: 55758383
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: mainMenu_default
|
||||||
|
ID: 65788519
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: mainMenu_hover
|
||||||
|
ID: 55999018
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: mainMenu_pressed
|
||||||
|
ID: 66382894
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: quit_default
|
||||||
|
ID: 66477839
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: quit_hover
|
||||||
|
ID: 65045286
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: quit_pressed
|
||||||
|
ID: 58607560
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: retry_default
|
||||||
|
ID: 55782622
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: retry_hover
|
||||||
|
ID: 58972174
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: retry_pressed
|
||||||
|
ID: 55224464
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: settings_default
|
||||||
|
ID: 58593104
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: settings_hover
|
||||||
|
ID: 64495732
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: settings_pressed
|
||||||
|
ID: 63138015
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: startGame_default
|
||||||
|
ID: 52901020
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: startGame_hover
|
||||||
|
ID: 62235279
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
||||||
|
Name: startGame_pressed
|
||||||
|
ID: 64722619
|
||||||
|
Type: 3
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -199,7 +199,7 @@ namespace SHADE
|
||||||
// Check material usage
|
// Check material usage
|
||||||
for (const auto& rendId : sb.Renderables)
|
for (const auto& rendId : sb.Renderables)
|
||||||
{
|
{
|
||||||
auto rend = SHComponentManager::GetComponent<SHRenderable>(rendId);
|
auto rend = SHComponentManager::GetComponent_s<SHRenderable>(rendId);
|
||||||
if (rend)
|
if (rend)
|
||||||
{
|
{
|
||||||
if (rend->GetMaterial() == matToCheck)
|
if (rend->GetMaterial() == matToCheck)
|
||||||
|
@ -328,7 +328,7 @@ namespace SHADE
|
||||||
for (auto rendId : subBatch.Renderables)
|
for (auto rendId : subBatch.Renderables)
|
||||||
{
|
{
|
||||||
// Transform
|
// Transform
|
||||||
auto transform = SHComponentManager::GetComponent<SHTransformComponent>(rendId);
|
auto transform = SHComponentManager::GetComponent_s<SHTransformComponent>(rendId);
|
||||||
if (transform)
|
if (transform)
|
||||||
{
|
{
|
||||||
if (SHSceneManager::CheckNodeAndComponentsActive<SHRenderable>(rendId))
|
if (SHSceneManager::CheckNodeAndComponentsActive<SHRenderable>(rendId))
|
||||||
|
@ -382,12 +382,15 @@ namespace SHADE
|
||||||
for (auto& subBatch : subBatches)
|
for (auto& subBatch : subBatches)
|
||||||
for (auto rendId : subBatch.Renderables)
|
for (auto rendId : subBatch.Renderables)
|
||||||
{
|
{
|
||||||
auto* renderable = SHComponentManager::GetComponent<SHRenderable>(rendId);
|
auto* renderable = SHComponentManager::GetComponent_s<SHRenderable>(rendId);
|
||||||
instancedIntegerData.emplace_back(SHInstancedIntegerData
|
if (renderable)
|
||||||
{
|
{
|
||||||
rendId,
|
instancedIntegerData.emplace_back(SHInstancedIntegerData
|
||||||
renderable->GetLightLayer()
|
{
|
||||||
});
|
rendId,
|
||||||
|
renderable->GetLightLayer()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transfer to GPU
|
// Transfer to GPU
|
||||||
|
@ -579,13 +582,17 @@ namespace SHADE
|
||||||
transformData.emplace_back();
|
transformData.emplace_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
const SHRenderable* renderable = SHComponentManager::GetComponent<SHRenderable>(rendId);
|
const SHRenderable* renderable = SHComponentManager::GetComponent_s<SHRenderable>(rendId);
|
||||||
instancedIntegerData.emplace_back(SHInstancedIntegerData
|
if (renderable)
|
||||||
{
|
{
|
||||||
rendId,
|
instancedIntegerData.emplace_back(SHInstancedIntegerData
|
||||||
renderable->GetLightLayer()
|
{
|
||||||
}
|
rendId,
|
||||||
);
|
renderable->GetLightLayer()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Material Properties
|
// Material Properties
|
||||||
if (!EMPTY_MAT_PROPS)
|
if (!EMPTY_MAT_PROPS)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "SHpch.h"
|
#include "SHpch.h"
|
||||||
#include "SHButtonComponent.h"
|
#include "SHButtonComponent.h"
|
||||||
|
#include "Resource/SHResourceManager.h"
|
||||||
|
#include "Graphics/MiddleEnd/Textures/SHTextureLibrary.h"
|
||||||
|
|
||||||
namespace SHADE
|
namespace SHADE
|
||||||
{
|
{
|
||||||
|
|
|
@ -237,17 +237,19 @@ namespace SHADE
|
||||||
//auto texture = SHResourceManager::Get<SHTexture>(comp.GetDefaultTexture());
|
//auto texture = SHResourceManager::Get<SHTexture>(comp.GetDefaultTexture());
|
||||||
|
|
||||||
auto material = renderable->GetModifiableMaterial();
|
auto material = renderable->GetModifiableMaterial();
|
||||||
if(!comp.isHovered && !comp.isClicked)
|
if (!comp.isHovered && !comp.isClicked)
|
||||||
if (comp.GetDefaultTexture() != 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE)
|
|
||||||
{
|
{
|
||||||
material->SetProperty("data.textureIndex", comp.GetDefaultTexture());
|
if (comp.GetDefaultTexture() != 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE)
|
||||||
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
{
|
||||||
}
|
material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet<SHTexture>(comp.GetDefaultTexture()));
|
||||||
|
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (comp.isClicked)
|
else if (comp.isClicked)
|
||||||
{
|
{
|
||||||
if (comp.GetClickedTexture() != 0 && SHAssetManager::GetType(comp.GetClickedTexture()) == AssetType::TEXTURE)
|
if (comp.GetClickedTexture() != 0 && SHAssetManager::GetType(comp.GetClickedTexture()) == AssetType::TEXTURE)
|
||||||
{
|
{
|
||||||
material->SetProperty("data.textureIndex", comp.GetClickedTexture());
|
material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet<SHTexture>(comp.GetClickedTexture()));
|
||||||
//SHLOG_INFO("SETTING CLICKED TEXTURE")
|
//SHLOG_INFO("SETTING CLICKED TEXTURE")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,7 +257,7 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
if (comp.GetHoveredTexture() != 0 && SHAssetManager::GetType(comp.GetHoveredTexture()) == AssetType::TEXTURE)
|
if (comp.GetHoveredTexture() != 0 && SHAssetManager::GetType(comp.GetHoveredTexture()) == AssetType::TEXTURE)
|
||||||
{
|
{
|
||||||
material->SetProperty("data.textureIndex", comp.GetHoveredTexture());
|
material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet<SHTexture>( comp.GetHoveredTexture()));
|
||||||
//SHLOG_INFO("SETTING HOVERED TEXTURE")
|
//SHLOG_INFO("SETTING HOVERED TEXTURE")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +363,7 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
if (comp.GetDefaultTexture()!= 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE)
|
if (comp.GetDefaultTexture()!= 0 && SHAssetManager::GetType(comp.GetDefaultTexture()) == AssetType::TEXTURE)
|
||||||
{
|
{
|
||||||
material->SetProperty("data.textureIndex", comp.GetDefaultTexture());
|
material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet<SHTexture>(comp.GetDefaultTexture()));
|
||||||
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +371,7 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
if (comp.GetToggledTexture() != 0 && SHAssetManager::GetType(comp.GetToggledTexture()) == AssetType::TEXTURE)
|
if (comp.GetToggledTexture() != 0 && SHAssetManager::GetType(comp.GetToggledTexture()) == AssetType::TEXTURE)
|
||||||
{
|
{
|
||||||
material->SetProperty("data.textureIndex", comp.GetToggledTexture());
|
material->SetProperty("data.textureIndex", SHResourceManager::LoadOrGet<SHTexture>(comp.GetToggledTexture()));
|
||||||
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
//SHLOG_INFO("SETTING DEFAULT TEXTURE")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue