2021-01-19 15:30:00 +01:00
|
|
|
#include "InspectorView.h"
|
2021-11-14 20:36:53 +01:00
|
|
|
#include "Graphics/Graphics.h"
|
2022-11-17 16:47:42 +01:00
|
|
|
#include "Actor/Actor.h"
|
|
|
|
|
#include "Window/Window.h"
|
2022-04-15 11:19:30 +02:00
|
|
|
#include "Asset/AssetRegistry.h"
|
2023-02-01 22:13:04 +01:00
|
|
|
#include "Asset/FontLoader.h"
|
2022-04-18 18:08:38 +02:00
|
|
|
#include "UI/System.h"
|
2021-09-23 10:10:39 +02:00
|
|
|
|
2021-01-19 15:30:00 +01:00
|
|
|
using namespace Seele;
|
|
|
|
|
|
|
|
|
|
InspectorView::InspectorView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo &createInfo)
|
2021-11-13 19:28:18 +01:00
|
|
|
: View(graphics, window, createInfo, "InspectorView")
|
2022-11-17 16:47:42 +01:00
|
|
|
, renderGraph(RenderGraphBuilder::build(
|
|
|
|
|
UIPass(graphics),
|
|
|
|
|
TextPass(graphics)
|
|
|
|
|
))
|
2022-04-18 18:08:38 +02:00
|
|
|
, uiSystem(new UI::System())
|
2021-01-19 15:30:00 +01:00
|
|
|
{
|
2023-02-01 22:13:04 +01:00
|
|
|
AssetRegistry::importFont(FontImportArgs{
|
|
|
|
|
.filePath = "./fonts/Calibri.ttf",
|
|
|
|
|
});
|
2022-11-17 16:47:42 +01:00
|
|
|
renderGraph.updateViewport(viewport);
|
|
|
|
|
uiSystem->updateViewport(viewport);
|
2021-01-19 15:30:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InspectorView::~InspectorView()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-15 23:45:44 +02:00
|
|
|
void InspectorView::beginUpdate()
|
2021-01-19 15:30:00 +01:00
|
|
|
{
|
2022-04-15 23:45:44 +02:00
|
|
|
//co_return;
|
2021-01-19 15:30:00 +01:00
|
|
|
}
|
|
|
|
|
|
2022-04-15 23:45:44 +02:00
|
|
|
void InspectorView::update()
|
2021-01-19 15:30:00 +01:00
|
|
|
{
|
2022-04-15 23:45:44 +02:00
|
|
|
//co_return;
|
2021-01-19 15:30:00 +01:00
|
|
|
}
|
|
|
|
|
|
2021-10-15 23:12:29 +02:00
|
|
|
void InspectorView::commitUpdate()
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
2021-10-01 19:55:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void InspectorView::prepareRender()
|
|
|
|
|
{
|
2022-11-17 16:47:42 +01:00
|
|
|
renderGraph.updatePassData(
|
|
|
|
|
uiSystem->getUIPassData(),
|
|
|
|
|
uiSystem->getTextPassData()
|
|
|
|
|
);
|
2021-10-01 19:55:04 +02:00
|
|
|
}
|
|
|
|
|
|
2022-04-15 23:45:44 +02:00
|
|
|
void InspectorView::render()
|
2021-10-01 19:55:04 +02:00
|
|
|
{
|
2022-11-17 16:47:42 +01:00
|
|
|
renderGraph.render(uiSystem->getVirtualCamera());
|
2021-09-23 10:10:39 +02:00
|
|
|
}
|
|
|
|
|
|
2021-11-24 12:10:23 +01:00
|
|
|
void InspectorView::keyCallback(KeyCode, InputAction, KeyModifier)
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-24 12:10:23 +01:00
|
|
|
void InspectorView::mouseMoveCallback(double, double)
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-24 12:10:23 +01:00
|
|
|
void InspectorView::mouseButtonCallback(MouseButton, InputAction, KeyModifier)
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-24 12:10:23 +01:00
|
|
|
void InspectorView::scrollCallback(double, double)
|
2021-09-23 10:10:39 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-24 12:10:23 +01:00
|
|
|
void InspectorView::fileCallback(int, const char**)
|
2021-01-19 15:30:00 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|