@@ -1220,28 +1220,9 @@ Currently this cannot be reliably estimated automatically. The correct value sho
12201220 pub button_mapping_config : AutomaticButtonMappingConfig ,
12211221}
12221222
1223- #[ derive( SettingsSchema , Serialize , Deserialize , Clone ) ]
1224- pub struct MarkerColocationConfig {
1225- #[ schema( strings( display_string = "QR Code string" ) ) ]
1226- pub qr_code_string : String ,
1227-
1228- #[ schema( strings(
1229- help = r"Offset coordinate on the floor between the marker and the playspace origin.
1230- The height doesn't need to be measured"
1231- ) ) ]
1232- #[ schema( suffix = "m" ) ]
1233- pub floor_offset : [ f32 ; 2 ] ,
1234- }
1235-
12361223#[ derive( SettingsSchema , Serialize , Deserialize , Clone ) ]
12371224pub enum RecenteringMode {
1238- Stage {
1239- #[ schema( strings(
1240- help = "Use a QR code to synchronize the playspace origin between players." ,
1241- notice = "Print at https://www.qr-code-generator.com"
1242- ) ) ]
1243- marker_based_colocation : Switch < MarkerColocationConfig > ,
1244- } ,
1225+ Stage ,
12451226 LocalFloor ,
12461227 Local {
12471228 #[ schema( gui( slider( min = 0.0 , max = 3.0 ) ) , suffix = "m" ) ]
@@ -1253,6 +1234,20 @@ pub enum RecenteringMode {
12531234 } ,
12541235}
12551236
1237+ #[ derive( SettingsSchema , Serialize , Deserialize , Clone ) ]
1238+ pub struct MarkerColocationConfig {
1239+ #[ schema( strings( display_string = "QR Code string" ) ) ]
1240+ pub qr_code_string : String ,
1241+
1242+ #[ schema( flag = "real-time" ) ]
1243+ #[ schema( strings(
1244+ help = r"Offset coordinate on the floor between the marker and the playspace origin.
1245+ The height of the marker doesn't need to be measured"
1246+ ) ) ]
1247+ #[ schema( suffix = "m" ) ]
1248+ pub floor_offset : [ f32 ; 2 ] ,
1249+ }
1250+
12561251#[ derive( SettingsSchema , Serialize , Deserialize , Clone , Copy ) ]
12571252pub struct MultimodalTracking {
12581253 pub enabled : bool ,
@@ -1277,6 +1272,13 @@ Tilted: the world gets tilted when long pressing the recentering button. This is
12771272 #[ schema( flag = "real-time" ) ]
12781273 pub recentering_mode : RecenteringMode ,
12791274
1275+ #[ schema( strings(
1276+ string = "Marker-based co-location" ,
1277+ help = "Use a QR code to synchronize the playspace origin between players." ,
1278+ notice = "Print at https://www.qr-code-generator.com"
1279+ ) ) ]
1280+ pub marker_colocation : Switch < MarkerColocationConfig > ,
1281+
12801282 #[ schema( flag = "steamvr-restart" ) ]
12811283 pub controllers : Switch < ControllersConfig > ,
12821284
@@ -2105,22 +2107,20 @@ pub fn session_settings_default() -> SettingsDefault {
21052107 } ,
21062108 } ,
21072109 recentering_mode : RecenteringModeDefault {
2108- Stage : RecenteringModeStageDefault {
2109- marker_based_colocation : SwitchDefault {
2110- enabled : false ,
2111- content : MarkerColocationConfigDefault {
2112- qr_code_string : String :: new ( ) ,
2113- floor_offset : ArrayDefault {
2114- gui_collapsed : false ,
2115- content : [ 0.0 , 0.0 ] ,
2116- } ,
2117- } ,
2118- } ,
2119- } ,
21202110 Local : RecenteringModeLocalDefault { view_height : 1.5 } ,
21212111 Tilted : RecenteringModeTiltedDefault { view_height : 1.5 } ,
21222112 variant : RecenteringModeDefaultVariant :: LocalFloor ,
21232113 } ,
2114+ marker_colocation : SwitchDefault {
2115+ enabled : false ,
2116+ content : MarkerColocationConfigDefault {
2117+ qr_code_string : String :: new ( ) ,
2118+ floor_offset : ArrayDefault {
2119+ gui_collapsed : false ,
2120+ content : [ 0.0 , 0.0 ] ,
2121+ } ,
2122+ } ,
2123+ } ,
21242124 max_prediction_ms : 100 ,
21252125 } ,
21262126 connection : ConnectionConfigDefault {
0 commit comments