Display behavior in the bottom bar

This commit is contained in:
GriffinR 2022-10-09 22:11:23 -04:00 committed by Marcus Huderle
parent a619670a5f
commit 85a5f07695
2 changed files with 7 additions and 5 deletions

View file

@ -32,6 +32,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- `object_event_graphics_info.h` can now be parsed correctly if it uses structs with attributes.
- The selection is no longer reset when pasting events. The newly pasted events are selected instead.
- Palette editor ui is updated a bit to allow hex and rgb value input.
- The metatile behavior is now displayed in the bottom bar mouseover text.
### Fixed
- Fix cursor tile outline not updating at the end of a dragged selection.

View file

@ -922,12 +922,13 @@ void Editor::onHoveredMovementPermissionCleared() {
QString Editor::getMetatileDisplayMessage(uint16_t metatileId) {
Metatile *metatile = Tileset::getMetatile(metatileId, map->layout->tileset_primary, map->layout->tileset_secondary);
QString message;
QString hexString = QString("%1").arg(metatileId, 3, 16, QChar('0')).toUpper();
if (metatile && metatile->label.size() != 0) {
message = QString("Metatile: 0x%1 \"%2\"").arg(hexString, metatile->label);
} else {
message = QString("Metatile: 0x%1").arg(hexString);
QString message = QString("Metatile: 0x%1").arg(hexString);
if (metatile) {
if (metatile->label.size())
message += QString(" \"%1\"").arg(metatile->label);
if (metatile->behavior) // Skip MB_NORMAL
message += QString(", Behavior: %1").arg(this->project->metatileBehaviorMapInverse.value(metatile->behavior, QString::number(metatile->behavior)));
}
return message;
}