|
@@ -97,9 +97,9 @@ bool TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get(const StringN
|
|
|
void TileSetAtlasSourceEditor::TileSetAtlasSourceProxyObject::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
|
p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, ""));
|
|
|
p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"));
|
|
|
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, ""));
|
|
|
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, ""));
|
|
|
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, ""));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "suffix:px"));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "suffix:px"));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "suffix:px"));
|
|
|
p_list->push_back(PropertyInfo(Variant::BOOL, "use_texture_padding", PROPERTY_HINT_NONE, ""));
|
|
|
}
|
|
|
|
|
@@ -401,15 +401,15 @@ void TileSetAtlasSourceEditor::AtlasTileProxyObject::_get_property_list(List<Pro
|
|
|
if (all_alternatve_id_zero) {
|
|
|
p_list->push_back(PropertyInfo(Variant::NIL, "Animation", PROPERTY_HINT_NONE, "animation_", PROPERTY_USAGE_GROUP));
|
|
|
p_list->push_back(PropertyInfo(Variant::INT, "animation_columns", PROPERTY_HINT_NONE, ""));
|
|
|
- p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, ""));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::VECTOR2I, "animation_separation", PROPERTY_HINT_NONE, "suffix:px"));
|
|
|
p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_speed", PROPERTY_HINT_NONE, ""));
|
|
|
p_list->push_back(PropertyInfo(Variant::INT, "animation_frames_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_ARRAY, "Frames,animation_frame_"));
|
|
|
// Not optimal, but returns value for the first tile. This is similar to what MultiNodeEdit does.
|
|
|
if (tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile) == 1) {
|
|
|
- p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::FLOAT, "animation_frame_0/duration", PROPERTY_HINT_NONE, "suffix:s", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_READ_ONLY));
|
|
|
} else {
|
|
|
for (int i = 0; i < tile_set_atlas_source->get_tile_animation_frames_count(tiles.front()->get().tile); i++) {
|
|
|
- p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, ""));
|
|
|
+ p_list->push_back(PropertyInfo(Variant::FLOAT, vformat("animation_frame_%d/duration", i), PROPERTY_HINT_NONE, "suffix:s"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2335,6 +2335,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|
|
// Tile inspector.
|
|
|
tile_inspector_label = memnew(Label);
|
|
|
tile_inspector_label->set_text(TTR("Tile Properties:"));
|
|
|
+ tile_inspector_label->set_theme_type_variation("HeaderSmall");
|
|
|
middle_vbox_container->add_child(tile_inspector_label);
|
|
|
|
|
|
tile_proxy_object = memnew(AtlasTileProxyObject(this));
|
|
@@ -2350,7 +2351,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|
|
|
|
|
tile_inspector_no_tile_selected_label = memnew(Label);
|
|
|
tile_inspector_no_tile_selected_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
|
|
- tile_inspector_no_tile_selected_label->set_text(TTR("No tile selected."));
|
|
|
+ tile_inspector_no_tile_selected_label->set_text(TTR("No tiles selected."));
|
|
|
middle_vbox_container->add_child(tile_inspector_no_tile_selected_label);
|
|
|
|
|
|
// Property values palette.
|
|
@@ -2358,6 +2359,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|
|
|
|
|
tile_data_editors_label = memnew(Label);
|
|
|
tile_data_editors_label->set_text(TTR("Paint Properties:"));
|
|
|
+ tile_data_editors_label->set_theme_type_variation("HeaderSmall");
|
|
|
middle_vbox_container->add_child(tile_data_editors_label);
|
|
|
|
|
|
tile_data_editor_dropdown_button = memnew(Button);
|
|
@@ -2381,6 +2383,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
|
|
// Atlas source inspector.
|
|
|
atlas_source_inspector_label = memnew(Label);
|
|
|
atlas_source_inspector_label->set_text(TTR("Atlas Properties:"));
|
|
|
+ atlas_source_inspector_label->set_theme_type_variation("HeaderSmall");
|
|
|
middle_vbox_container->add_child(atlas_source_inspector_label);
|
|
|
|
|
|
atlas_source_proxy_object = memnew(TileSetAtlasSourceProxyObject());
|