@@ -230,84 +230,6 @@ private static void ConstructToolbar(GameObject topRowObj)
230
230
invisGroup . padding . right = 2 ;
231
231
invisGroup . spacing = 10 ;
232
232
233
- // // time scale group
234
-
235
- // var timeGroupObj = UIFactory.CreateHorizontalGroup(invisObj, new Color(1, 1, 1, 0));
236
- // var timeGroup = timeGroupObj.GetComponent<HorizontalLayoutGroup>();
237
- // timeGroup.childForceExpandWidth = false;
238
- // timeGroup.childControlWidth = true;
239
- // timeGroup.childForceExpandHeight = false;
240
- // timeGroup.childControlHeight = true;
241
- // timeGroup.padding.top = 2;
242
- // timeGroup.padding.left = 5;
243
- // timeGroup.padding.right = 2;
244
- // timeGroup.padding.bottom = 2;
245
- // timeGroup.spacing = 5;
246
- // timeGroup.childAlignment = TextAnchor.MiddleCenter;
247
- // var timeGroupLayout = timeGroupObj.AddComponent<LayoutElement>();
248
- // timeGroupLayout.minWidth = 100;
249
- // timeGroupLayout.flexibleWidth = 300;
250
- // timeGroupLayout.minHeight = 25;
251
- // timeGroupLayout.flexibleHeight = 0;
252
-
253
- // // time scale title
254
-
255
- // var timeTitleObj = UIFactory.CreateLabel(timeGroupObj, TextAnchor.MiddleLeft);
256
- // var timeTitle = timeTitleObj.GetComponent<Text>();
257
- // timeTitle.text = "Time Scale:";
258
- // timeTitle.color = new Color(21f / 255f, 192f / 255f, 235f / 255f);
259
- // var titleLayout = timeTitleObj.AddComponent<LayoutElement>();
260
- // titleLayout.minHeight = 25;
261
- // titleLayout.minWidth = 80;
262
- // titleLayout.flexibleHeight = 0;
263
- // timeTitle.horizontalOverflow = HorizontalWrapMode.Overflow;
264
-
265
- // // actual active time label
266
-
267
- // var timeLabelObj = UIFactory.CreateLabel(timeGroupObj, TextAnchor.MiddleLeft);
268
- // var timeLabelLayout = timeLabelObj.AddComponent<LayoutElement>();
269
- // timeLabelLayout.minWidth = 40;
270
- // timeLabelLayout.minHeight = 25;
271
- // timeLabelLayout.flexibleHeight = 0;
272
-
273
- // // todo make static and update
274
- // var s_timeText = timeLabelObj.GetComponent<Text>();
275
- // s_timeText.text = Time.timeScale.ToString("F1");
276
-
277
- // // time scale input
278
-
279
- // var timeInputObj = UIFactory.CreateInputField(timeGroupObj);
280
- // var timeInput = timeInputObj.GetComponent<InputField>();
281
- // timeInput.characterValidation = InputField.CharacterValidation.Decimal;
282
- // var timeInputLayout = timeInputObj.AddComponent<LayoutElement>();
283
- // timeInputLayout.minWidth = 90;
284
- // timeInputLayout.flexibleWidth = 0;
285
- // timeInputLayout.minHeight = 25;
286
- // timeInputLayout.flexibleHeight = 0;
287
-
288
- // // time scale apply button
289
-
290
- // var applyBtnObj = UIFactory.CreateButton(timeGroupObj);
291
- // var applyBtn = applyBtnObj.GetComponent<Button>();
292
-
293
- // applyBtn.onClick.AddListener(SetTimeScale);
294
-
295
- // var applyText = applyBtnObj.GetComponentInChildren<Text>();
296
- // applyText.text = "Apply";
297
- // applyText.fontSize = 14;
298
- // var applyLayout = applyBtnObj.AddComponent<LayoutElement>();
299
- // applyLayout.minWidth = 50;
300
- // applyLayout.minHeight = 25;
301
- // applyLayout.flexibleHeight = 0;
302
-
303
- // void SetTimeScale()
304
- // {
305
- // var scale = float.Parse(timeInput.text);
306
- // Time.timeScale = scale;
307
- // s_timeText.text = Time.timeScale.ToString("F1");
308
- // }
309
-
310
-
311
233
// inspect under mouse button
312
234
313
235
var inspectObj = UIFactory . CreateButton ( topRowObj ) ;
0 commit comments