- [NEW] draw::setZoom() i getZoom()

- [NEW] Ara amb F1 i F2 se pot fer zoom del contingut de la finestra
- [NEW] Ja es pot editar els camps de text (pero encara no es guarda a arxiu)
This commit is contained in:
2025-11-19 22:46:44 +01:00
parent 546ab9aa55
commit 19441c5289
6 changed files with 92 additions and 18 deletions

View File

@@ -127,7 +127,7 @@ bool loop()
if (treeview::getSelected(0) > -1) {
if (treeview::getSelected(2) == -1) {
propertygrid::sectionProperty("ROOM:");
propertygrid::stringProperty("NAME", room["room"]["name"].get_value<std::string>());
if (propertygrid::stringProperty("NAME", room["room"]["name"].get_value<std::string>())) room["room"]["name"] = propertygrid::getStringPropertyResult();
propertygrid::stringProperty("BGCOLOR", room["room"]["bgColor"].get_value<std::string>());
propertygrid::stringProperty("BORDER", room["room"]["border"].get_value<std::string>());
propertygrid::stringProperty("TILESET", room["room"]["tileSetFile"].get_value<std::string>());
@@ -170,5 +170,8 @@ bool loop()
font::print("SELECTION", x, 5); x+= font::len("SELECTION")+12;
font::print("VIEW", x, 5); x+= font::len("VIEW")+12;*/
draw::render();
if (input::keyPressed(SDL_SCANCODE_F1)) draw::setZoom(draw::getZoom()-0.1f);
if (input::keyPressed(SDL_SCANCODE_F2)) draw::setZoom(draw::getZoom()+0.1f);
return true;
}