Skip to content

Commit dc30e2a

Browse files
committed
Add offset to tilemaps in order to have space for displaying toolbar at the top
1 parent aa1f2c1 commit dc30e2a

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed
-17 Bytes
Loading
-451 Bytes
Loading

data/images/engine/editor/redo.png

-712 Bytes
Loading

data/images/engine/editor/undo.png

-692 Bytes
Loading

src/editor/editor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Editor::Editor() :
146146
m_widgets.push_back(std::move(overlay_widget));
147147

148148
auto grid_size_widget = std::make_unique<ButtonWidget>("images/engine/editor/grid_button.png",
149-
Vector(110, 10),
149+
Vector(64, 0),
150150
[this] {
151151
auto& snap_grid_size = g_config->editor_selected_snap_grid_size;
152152
if (snap_grid_size == 0)
@@ -160,7 +160,7 @@ Editor::Editor() :
160160
m_widgets.insert(m_widgets.begin() + 2, std::move(grid_size_widget));
161161

162162
auto play_button = std::make_unique<ButtonWidget>("images/engine/editor/play_button.png",
163-
Vector(160, 10), [this] { m_test_request = true; });
163+
Vector(96, 0), [this] { m_test_request = true; });
164164

165165
m_play_widget = play_button.get();
166166

@@ -1085,9 +1085,9 @@ Editor::retoggle_undo_tracking()
10851085
{
10861086
// Add undo/redo button widgets.
10871087
auto undo_button_widget = std::make_unique<ButtonWidget>("images/engine/editor/undo.png",
1088-
Vector(10, 10), [this]{ undo(); });
1088+
Vector(0, 0), [this]{ undo(); });
10891089
auto redo_button_widget = std::make_unique<ButtonWidget>("images/engine/editor/redo.png",
1090-
Vector(60, 10), [this]{ redo(); });
1090+
Vector(32, 0), [this]{ redo(); });
10911091

10921092
m_undo_widget = undo_button_widget.get();
10931093
m_redo_widget = redo_button_widget.get();

src/object/tilemap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TileMap::TileMap(const TileSet *new_tileset) :
5353
m_width(0),
5454
m_height(0),
5555
m_z_pos(0),
56-
m_offset(Vector(0,0)),
56+
m_offset(Vector(0, 32)),
5757
m_movement(0, 0),
5858
m_objects_hit_bottom(),
5959
m_ground_movement_manager(nullptr),
@@ -87,7 +87,7 @@ TileMap::TileMap(const TileSet *tileset_, const ReaderMapping& reader) :
8787
m_width(-1),
8888
m_height(-1),
8989
m_z_pos(0),
90-
m_offset(Vector(0, 0)),
90+
m_offset(Vector(0, 32)),
9191
m_movement(Vector(0, 0)),
9292
m_objects_hit_bottom(),
9393
m_ground_movement_manager(nullptr),

0 commit comments

Comments
 (0)