- [FIX] No es podia colocar actors en l'ultima fila o columna en floating mode

- Més habitacions, actors i gràfics
This commit is contained in:
2024-09-22 22:08:19 +02:00
parent 11da5b033c
commit edc8e0b51d
5 changed files with 647 additions and 14 deletions

View File

@@ -312,7 +312,7 @@ namespace modules
//draw::print2(x, -3, 1, 6, PURPLE, FONT_ZOOM_NONE);
//draw::print2(y, -3, 1, 7, PURPLE, FONT_ZOOM_NONE);
if (x>=room::getTMin().x && y>=room::getTMin().y && x<room::getTMax().x && y<room::getTMax().y)
if (x>=room::getTMin().x && y>=room::getTMin().y && x<=room::getTMax().x && y<=room::getTMax().y)
{
floating_position = {x, y};
selected->pos.x = floating_position.x*8;
@@ -838,13 +838,14 @@ namespace modules
draw::color(PAPER);
draw::rect(2, 0, 96, 204);
if (ui::button("DUPLICATE", 2, line, 48, 11) || (input::keyDown(SDL_SCANCODE_LCTRL) && input::keyPressed(SDL_SCANCODE_D)))
if (ui::button("DUPLICATE", 2, line, 48, 11) || input::keyPressed(SDL_SCANCODE_D))
{
actor::actor_t *new_act = actor::duplicate(act);
actor::setUniqueName(new_act);
//new_act->pos.x++; new_act->pos.y++;
actor::setDirty(new_act, true);
actor::select(new_act);
actor::setFloatingEditing(true);
changed = true;
}
if (ui::button("DELETE", 48, line, 48, 11) || input::keyPressed(SDL_SCANCODE_DELETE))