/*
 * Pedestrian.fx
 *
 * Created on Mar 23, 2010, 9:54:57 PM
 */
package vismobile;

import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.scene.Group;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.control.CheckBox;
import javafx.scene.layout.HBox;

/**
 * @author Student
 */
public class Configuration extends Scene {

    var myRect: Rectangle;
    override var content = [
                Group {
                    var title: Text = Text {
                                font: Font {
                                    size: 24
                                }
                                fill: Color.WHITE
                                content: "Configuration"
                            };

                var checkbox = CheckBox{
                allowTriState: false
               /*
                override var selected on replace {
                    if(selected){
                        Main.getMe().setObjectAsString(structures.Constants.HASH_TRACKING, "Yes");}
                    else{
                        Main.getMe().removeObject(structures.Constants.HASH_TRACKING);}
                }*/
                }

                var cbText = Text {

                    font : Font {size: 16}
                    fill: Color.WHITE
                    content: "Track Vehicle"
                }
                    var homeButton: HomeButton =
                            HomeButton {
                                desc: "HOME"
                            }
                    content: [
                        Group {
                            translateX: Main.stage.width / 2 - title.boundsInLocal.width / 2;
                            translateY: (Main.stage.height / 7)
                            content: [
                                title
                            ]
                        }
                        Group {
                            translateX: Main.stage.width / 2 - checkbox.layoutBounds.width / 2 - cbText.layoutBounds.width/2;
                            translateY: (Main.stage.height / 3)
                            content: [
                                
                                HBox{
                                
                                spacing:10
                                content: [checkbox, cbText]

                                }
                            ]
                        }

                        Group {
                            translateX: 1//Main.stage.width/2 - toggle.boundsInLocal.width/2;
                            translateY: Main.stage.height - homeButton.boundsInLocal.height;
                            content: [
                                homeButton
                            ]
                        }
                    ]
                }
            ]
}
