コード例 #1
0
        private void InitGUIElement(GUIHost gui_host, Element2D parent)
        {
            scroll_frame = new ScrollFrame(1234);
            scroll_frame.Init(gui_host);
            scroll_frame.Width          = 450;
            scroll_frame.RelativeHeight = -1f;
            scroll_frame.Pane_Width     = 400;
            scroll_frame.Pane_Height    = 10;
            scroll_frame.X = -scroll_frame.Width;
            scroll_frame.Y = 64;
            ScrollFrame scrollFrame = scroll_frame;

            scrollFrame.OnControlMsgCallback = scrollFrame.OnControlMsgCallback + new OnControlMsgDelegate(OnControlMsg);
            layout = new VerticalLayout(12345);
            layout.SetSize(400, 10);
            layout.layoutMode = Layout.LayoutMode.ResizeLayoutToFitChildren;
            scroll_frame.AddChildElement(layout);
            scroll_frame.Visible = false;
            parent.ChildList    += scroll_frame;
        }