This commit is contained in:
@ -22,7 +22,7 @@ namespace jasper::world {
|
||||
|
||||
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 {
|
||||
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();
|
||||
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();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -302,8 +302,8 @@ void WorldEditorImGui::drawWorldView() noexcept {
|
||||
ImGui::Image(
|
||||
ig::toImTextureID(fb.color.id),
|
||||
paneSize,
|
||||
ImVec2(0, 1),
|
||||
ImVec2(xScale, 1 - yScale));
|
||||
{0, 1},
|
||||
{xScale, 1 - yScale});
|
||||
std::ignore = ig::dragDropTarget([this, fbPaneScale] {
|
||||
return handleDrop(fbPaneScale);
|
||||
});
|
||||
|
Reference in New Issue
Block a user