This commit is contained in:
@ -22,7 +22,7 @@ namespace jasper::world {
|
|||||||
|
|
||||||
namespace ig = studio::ig;
|
namespace ig = studio::ig;
|
||||||
|
|
||||||
constexpr auto SqrBtnSize = ImVec2(ig::BtnSz.y, ig::BtnSz.y);
|
constexpr auto SqrBtnSize = ImVec2{ig::BtnSz.y, ig::BtnSz.y};
|
||||||
|
|
||||||
struct WorldEditorConfig {
|
struct WorldEditorConfig {
|
||||||
static constexpr auto TypeName = "net.drinkingtea.jasper.world.studio.WorldEditorConfig";
|
static constexpr auto TypeName = "net.drinkingtea.jasper.world.studio.WorldEditorConfig";
|
||||||
@ -91,7 +91,7 @@ void WorldEditorImGui::draw(studio::StudioContext&) noexcept {
|
|||||||
auto const paneSize = ImGui::GetContentRegionAvail();
|
auto const paneSize = ImGui::GetContentRegionAvail();
|
||||||
constexpr auto resourcesWidth = 300.f;
|
constexpr auto resourcesWidth = 300.f;
|
||||||
{
|
{
|
||||||
ig::ChildStackItem const worldView{"WorldView", ImVec2(paneSize.x - resourcesWidth, 0)};
|
ig::ChildStackItem const worldView{"WorldView", {paneSize.x - resourcesWidth, 0}};
|
||||||
drawWorldView();
|
drawWorldView();
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -302,8 +302,8 @@ void WorldEditorImGui::drawWorldView() noexcept {
|
|||||||
ImGui::Image(
|
ImGui::Image(
|
||||||
ig::toImTextureID(fb.color.id),
|
ig::toImTextureID(fb.color.id),
|
||||||
paneSize,
|
paneSize,
|
||||||
ImVec2(0, 1),
|
{0, 1},
|
||||||
ImVec2(xScale, 1 - yScale));
|
{xScale, 1 - yScale});
|
||||||
std::ignore = ig::dragDropTarget([this, fbPaneScale] {
|
std::ignore = ig::dragDropTarget([this, fbPaneScale] {
|
||||||
return handleDrop(fbPaneScale);
|
return handleDrop(fbPaneScale);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user