mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 10:20:48 +00:00
Add 1x1 background grid
From: https://community.aseprite.org/t/change-background-checkerboard-grid-size/390/2
This commit is contained in:
parent
f223d157fd
commit
86e14fa2ff
@ -32,6 +32,7 @@
|
||||
<value id="CHECKED_8x8" value="1" />
|
||||
<value id="CHECKED_4x4" value="2" />
|
||||
<value id="CHECKED_2x2" value="3" />
|
||||
<value id="CHECKED_1x1" value="4" />
|
||||
</enum>
|
||||
<enum id="StopAtGrid">
|
||||
<value id="NEVER" value="0" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2001-2015 David Capello
|
||||
// Copyright (C) 2001-2017 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
@ -48,6 +48,10 @@ void AppRender::setupBackground(app::Document* doc, doc::PixelFormat pixelFormat
|
||||
bgType = render::BgType::CHECKED;
|
||||
tile = gfx::Size(2, 2);
|
||||
break;
|
||||
case app::gen::BgType::CHECKED_1x1:
|
||||
bgType = render::BgType::CHECKED;
|
||||
tile = gfx::Size(1, 1);
|
||||
break;
|
||||
default:
|
||||
bgType = render::BgType::TRANSPARENT;
|
||||
break;
|
||||
|
@ -289,10 +289,13 @@ public:
|
||||
#endif
|
||||
|
||||
// Checked background size
|
||||
static_assert(int(app::gen::BgType::CHECKED_16x16) == 0, "");
|
||||
static_assert(int(app::gen::BgType::CHECKED_1x1) == 4, "");
|
||||
checkedBgSize()->addItem("16x16");
|
||||
checkedBgSize()->addItem("8x8");
|
||||
checkedBgSize()->addItem("4x4");
|
||||
checkedBgSize()->addItem("2x2");
|
||||
checkedBgSize()->addItem("1x1");
|
||||
|
||||
// Reset buttons
|
||||
resetBg()->Click.connect(base::Bind<void>(&OptionsWindow::onResetBg, this));
|
||||
|
Loading…
x
Reference in New Issue
Block a user