summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--blender/table/table.tpl.json23
-rw-r--r--editor/imgui.cpp3
-rw-r--r--scenery/table.json14
3 files changed, 36 insertions, 4 deletions
diff --git a/blender/table/table.tpl.json b/blender/table/table.tpl.json
new file mode 100644
index 00000000..af2fda55
--- /dev/null
+++ b/blender/table/table.tpl.json
@@ -0,0 +1,23 @@
+{
+ "actionframe": 0,
+ "anim_name": "",
+ "fps": 0,
+ "groups": [
+ {
+ "frames": [],
+ "ground": "959 x 712",
+ "offset": [-20, -20, 0],
+ "name": "n"
+ },
+ {
+ "name": "w",
+ "offset": [-20, -20, 0],
+ "mirror-from": "n"
+ }
+ ],
+ "height": 0,
+ "nframes": 1,
+ "object_name": "table",
+ "pixel_size": "0 x 0",
+ "scale": ["width", 180]
+}
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index 5a173da7..d4bb38e9 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -119,12 +119,11 @@ void app::draw_clickables()
for (const auto& x : M->clickable_scenery())
{
auto dest = Math::Range2D<float>(x.dest);
- auto min = dest.min(), max = dest.max(), center = dest.center();
+ auto min = dest.min(), max = dest.max();
draw.AddRect({ min.x(), min.y() }, { max.x(), max.y() },
color, 0, ImDrawFlags_None, thickness);
if (x.slope != 0.f)
{
- const auto& e = *x.e;
const auto bb_min = Vector2(min[0] + x.bb_min[0], min[1] + x.bb_min[1]);
const auto bb_max = Vector2(min[0] + x.bb_max[0], min[1] + x.bb_max[1]);
draw.AddLine({ bb_min[0], bb_min[1] }, { bb_max[0], bb_max[1] }, color, thickness);
diff --git a/scenery/table.json b/scenery/table.json
index 59b2d59b..3fa99f5a 100644
--- a/scenery/table.json
+++ b/scenery/table.json
@@ -8,11 +8,21 @@
}
],
"ground": "959 x 712",
- "name": "n"
+ "name": "n",
+ "offset": [
+ -20,
+ -20,
+ 0
+ ]
},
{
"mirror-from": "n",
- "name": "w"
+ "name": "w",
+ "offset": [
+ -20,
+ -20,
+ 0
+ ]
}
],
"nframes": 1,