From fcb2ca61a64401331b5ac9512258ab7f34205367 Mon Sep 17 00:00:00 2001 From: mkp Date: Thu, 27 Feb 2025 14:45:27 +0100 Subject: [PATCH] Add instructions for custom device widths --- .../m4l-production-guidelines.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/m4l-production-guidelines/m4l-production-guidelines.md b/m4l-production-guidelines/m4l-production-guidelines.md index 40427c2..2d74177 100644 --- a/m4l-production-guidelines/m4l-production-guidelines.md +++ b/m4l-production-guidelines/m4l-production-guidelines.md @@ -274,6 +274,59 @@ If you find that your device takes up too much horizontal space to your liking, For each of these cited example devices, you can open the Max for Live Editor to see how this has been implemented. +### Custom Device Width + +There are two ways to set a device to load with a custom width: + +* Using **Fixed Initial Window Location** + * Open the device for editing. + * In Max, go to the [Patcher Inspector](https://docs.cycling74.com/userguide/inspector/#the-patcher-inspector) + * Find the Fixed Initial Window Location (openrect) property, for which the value is an array of four numbers. + * For the third number, add the custom width of your device in pixels. + * Save the device. + +* Using **Set Device Width** + * Open the device for editing. + * Make the patcher window width the same as the device's initial width. + * In the menu go to View and choose [Set Device Width](https://docs.cycling74.com/userguide/m4l/live_userinterfaces/#defining-a-fixed-device-width). + * Save the device. + + The patch below can help you set a device's patcher window to an exact width: + + ``` +

+	----------begin_max5_patcher----------
+	1082.3ocyXssiaaCD8Y6uhAJOztntFhT2aep.IEn.EEHHAoOTrXgrDqMSsHE
+	jnVamf7uGdSar2U1VxVNn6BHYRQxgmyYlQC0mmNwYAeKo1A9E3efIS97zISz
+	co5Xhs8DmhzsYqSq0CyIiWTPXBmYlmIHaE598tC9CFHVQ.4ialAK4ffCefR1
+	.orbHaEmWSf2QDvqIORyHveSyEqlolACpSejnmat9YyaW80TFIi2vzl.a6rr
+	hTK2AoBJm8vAiv2NBVSAuQrlHzaY214kJxVQYKenhjILP1Kbt6L.izWwwpaA
+	34tv81ornYwh0D0XQ1dn4ZzxW7weFgb9l8nrVygNXt0zb87cUc9koSUWlckT
+	86IEk7pzJ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RqjEuHjUtzTo2YNaCMepBmBtjOYMTKkJwmzj5xlXoxhCkGXyLAU0US+x
+	zuxyeimO
+	-----------end_max5_patcher-----------
+	
+ ``` + +When your device has a dynamic width, for example when using a fold-out view, make sure that the initial device width matches the initial state of the device, to prevent a quick size flash upon loading the device. + ### `[live.*]` Objects There are several settings in the Object Inspector that we recommend for best use of the **`[live.*]` UI objects**. @@ -448,6 +501,7 @@ Here is a checklist to recap the topics of this guide that can be tested, which - [ ] Font consistency: All UI fonts are set to Live's font. - [ ] Tab stops: Comments don't include any tab stops. The result will look different per OS. - [ ] Device width: The device does not take up too much of the horizontal space in the Device view. +- [ ] Device width: If the device can dynamically change its size, make sure the device's custom width setting matches its initial width. **Parameters**