Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/level_editor/property_grid.vala
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,13 @@ public class PropertyGridSet : Gtk.Box
return ((PropertyGrid)e._child)._visible;
}

public Expander add_property_grid(PropertyGrid cv, string label)
public Expander add_property_grid(PropertyGrid cv, string label, string? tooltip = null)
{
Gtk.Label l = new Gtk.Label(null);
l.set_markup("<b>%s</b>".printf(label));
l.xalign = 0.0f;
l.yalign = 0.5f;
l.set_tooltip_text(label);

Expander e = new Expander();
e.custom_header = l;
Expand All @@ -569,12 +570,13 @@ public class PropertyGridSet : Gtk.Box
return e;
}

public Expander add_property_grid_optional(PropertyGrid cv, string label, InputBool InputBool)
public Expander add_property_grid_optional(PropertyGrid cv, string label, InputBool InputBool, string? tooltip = null)
{
Gtk.Label l = new Gtk.Label(null);
l.set_markup("<b>%s</b>".printf(label));
l.xalign = 0.0f;
l.yalign = 0.5f;
l.set_tooltip_text(tooltip);

Gtk.Box b = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
b.pack_start(InputBool, false, false);
Expand Down
16 changes: 8 additions & 8 deletions tools/level_editor/texture_settings_dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public class TextureSettingsDialog : Gtk.Window
PropertyGrid cv;
cv = new PropertyGrid();
cv.column_homogeneous = true;
cv.add_row("Name", _texture_name);
cv.add_row("Name", _texture_name, "Resource name.");
_texture_set.add_property_grid(cv, "Texture");

cv = new PropertyGrid();
cv.column_homogeneous = true;
cv.add_row("Source", _source);
cv.add_row("Source", _source, "Source image.");
_texture_set.add_property_grid(cv, "Input");

// Output grid.
Expand Down Expand Up @@ -125,12 +125,12 @@ public class TextureSettingsDialog : Gtk.Window

cv = new PropertyGrid();
cv.column_homogeneous = true;
cv.add_row("Format", _format);
cv.add_row("Generate Mips", _generate_mips);
cv.add_row("Skip Smallest Mips", _mip_skip_smallest);
cv.add_row("Normal Map", _normal_map);
cv.add_row("Linear", _linear);
cv.add_row("Premultiply Alpha", _premultiply_alpha);
cv.add_row("Format", _format, "Output format.");
cv.add_row("Generate Mips", _generate_mips, "Generate mip-maps.");
cv.add_row("Skip Smallest Mips", _mip_skip_smallest, "Skip generation of the N smallest mip-maps.");
cv.add_row("Normal Map", _normal_map, "Skip gamma correction and mark as normal map.");
cv.add_row("Linear", _linear, "Skip gamma correction.");
cv.add_row("Premultiply Alpha", _premultiply_alpha, "Premultiply alpha into RGB channels.");
_texture_set.add_property_grid(cv, "Output");

_stack = new Gtk.Stack();
Expand Down
24 changes: 12 additions & 12 deletions tools/resource/mesh_resource_fbx.vala
Original file line number Diff line number Diff line change
Expand Up @@ -259,21 +259,21 @@ public class FBXImportDialog : Gtk.Window
PropertyGrid cv;
cv = new PropertyGrid();
cv.column_homogeneous = true;
cv.add_row("Import Lights", _options.import_lights);
cv.add_row("Import Cameras", _options.import_cameras);
cv.add_row("Import Textures", _options.import_textures);
cv.add_row("Create Textures Folder", _options.create_textures_folder);
cv.add_row("Import Materials", _options.import_materials);
cv.add_row("Create Materials Folder", _options.create_materials_folder);
_general_set.add_property_grid_optional(cv, "Units", _options.import_units);
cv.add_row("Import Lights", _options.import_lights, "Import all light nodes.");
cv.add_row("Import Cameras", _options.import_cameras, "Import all camera nodes.");
cv.add_row("Import Textures", _options.import_textures, "Import all textures.");
cv.add_row("Create Textures Folder", _options.create_textures_folder, "Put imported textures in a sub-folder.");
cv.add_row("Import Materials", _options.import_materials, "Import all materials.");
cv.add_row("Create Materials Folder", _options.create_materials_folder, "Put imported materials in a sub-folder.");
_general_set.add_property_grid_optional(cv, "Units", _options.import_units, "Import nodes as units, materials and textures.");

cv = new PropertyGrid();
cv.column_homogeneous = true;
cv.add_row("New Skeleton", _options.new_skeleton);
cv.add_row("Target Skeleton", _options.target_skeleton);
cv.add_row("Import Animations", _options.import_clips);
cv.add_row("Create Animations Folder", _options.create_animations_folder);
_general_set.add_property_grid_optional(cv, "Animation", _options.import_animation);
cv.add_row("New Skeleton", _options.new_skeleton, "Create a new skeleton.");
cv.add_row("Target Skeleton", _options.target_skeleton, "Skeleton to use.");
cv.add_row("Import Animations", _options.import_clips, "Import all animation clips.");
cv.add_row("Create Animations Folder", _options.create_animations_folder, "Put imported animations in a sub-folder.");
_general_set.add_property_grid_optional(cv, "Animation", _options.import_animation, "Import animations and skeleton.");

_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
_box.pack_start(_general_set, false, false);
Expand Down