Skip to content

Commit

Permalink
Fix saving of gradient direction (#2598)
Browse files Browse the repository at this point in the history
This bug prevented all gradients with a direction other than VERTICAL (i.e. HORIZONTAL, VERTICAL_SECTOR and HORIZONTAL_SECTOR) from saving, this fixes it.

note: I made this a separate PR since it's unrelated to SDL or rendering in general, it's a bug with the level editor.
  • Loading branch information
Narre authored Aug 22, 2023
1 parent ec4b486 commit e522c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/object/gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Gradient::get_settings()
result.add_enum(_("Direction"), reinterpret_cast<int*>(&m_gradient_direction),
{_("Vertical"), _("Horizontal"), _("Vertical (whole sector)"), _("Horizontal (whole sector)")},
{"vertical", "horizontal", "vertical_sector", "horizontal_sector"},
static_cast<int>(VERTICAL));
static_cast<int>(VERTICAL), "direction");

result.add_enum(_("Draw target"), reinterpret_cast<int*>(&m_target),
{_("Normal"), _("Lightmap")},
Expand Down

0 comments on commit e522c1f

Please sign in to comment.