示例#1
0
        public ImageTextWidget(int x, int y, int width, int height, string text)
            : base()
        {
            // left hand image
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            image_element.set_position(x, y);
            image_element.set_colours(BackgroundColor, BorderColor);
            image_element.set_image(kisi);
            elements.Add(image_element);

            // float left text
            text_element.set_position(x + 28, y);
            text_element.set_size(width - 28, height);
            text_element.set_colours(BackgroundColor, BorderColor);
            text_element.set_text(text, font, BorderColor);
            elements.Add(text_element);

            EventHandler event_handler = new EventHandler(OnClickDown);

            image_element.ClickDown += event_handler;
            text_element.ClickDown  += event_handler;

            EventHandler up_event_handler = new EventHandler(OnClickUp);

            image_element.ClickUp += up_event_handler;
            text_element.ClickUp  += up_event_handler;

            this.text = text;
            this.register_elements();
        }
 BaseElement create_line(string text)
 {
     BaseElement element = new BaseElement();
     element.set_size(UserInterface.Instance.screen_width-8, line_height);
     element.set_colours(BackgroundColor, BackgroundColor);
     element.set_text(text, log_font, BorderColor, 1);
     return element;
 }
示例#3
0
 public BlankWidget()
     : base()
 {
     background.set_position(0, 28);
     background.set_size(UserInterface.Instance.screen_width, UserInterface.Instance.screen_height - 28);
     background.set_colours(BackgroundColor, BorderColor);
     elements.Add(background);
 }
        BaseElement create_line(string text)
        {
            BaseElement element = new BaseElement();

            element.set_size(UserInterface.Instance.screen_width - 8, line_height);
            element.set_colours(BackgroundColor, BackgroundColor);
            element.set_text(text, log_font, BorderColor, 1);
            return(element);
        }
示例#5
0
 public TextWidget(int x, int y, int width, int height, string text) : base()
 {
     base_element = new BaseElement();
     base_element.set_position(x, y);
     base_element.set_size(width, height);
     base_element.set_colours(BackgroundColor, BorderColor);
     base_element.set_text(text, font, BorderColor);
     base_element.ClickDown += new EventHandler(OnClickDown);
     base_element.ClickUp   += new EventHandler(OnClickUp);
     elements.Add(base_element);
     this.register_elements();
 }
 public TextWidget(int x, int y, int width, int height, string text)
     : base()
 {
     base_element = new BaseElement();
     base_element.set_position(x, y);
     base_element.set_size(width, height);
     base_element.set_colours(BackgroundColor, BorderColor);
     base_element.set_text(text, font, BorderColor);
     base_element.ClickDown += new EventHandler(OnClickDown);
     base_element.ClickUp += new EventHandler(OnClickUp);
     elements.Add(base_element);
     this.register_elements();
 }
        public ImageWidget(int x, int y, int width, int height)
            : base()
        {
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            BaseElement element = new BaseElement();
            element.set_position(x, y);
            element.set_colours(BackgroundColor, BorderColor);
            element.set_image(kisi);
            element.ClickDown += new EventHandler(OnClickDown);
            element.ClickUp += new EventHandler(OnClickUp);
            elements.Add(element);
            this.register_elements();
        }
        public DropDownWidget(int x, int y, int width, int height, Image img) : base()
        {
            this.x              = x;
            this.y              = y;
            this.options_width  = width;
            this.options_height = height;

            start_image = new BaseElement();
            start_image.set_position(x, y);
            start_image.set_colours(BackgroundColor, BorderColor);
            start_image.set_image(img);
            start_image.ClickUp += new EventHandler(toggle_dropdown);
            elements.Add(start_image);
            this.register_elements();
        }
示例#9
0
        public ImageWidget(int x, int y, int width, int height)
            : base()
        {
            Image kisi = new Image(Resources.GetBitmap(Resources.BitmapResources.kisi));

            BaseElement element = new BaseElement();

            element.set_position(x, y);
            element.set_colours(BackgroundColor, BorderColor);
            element.set_image(kisi);
            element.ClickDown += new EventHandler(OnClickDown);
            element.ClickUp   += new EventHandler(OnClickUp);
            elements.Add(element);
            this.register_elements();
        }
        public DropDownWidget(int x, int y, int width, int height, Image img)
            : base()
        {
            this.x = x;
            this.y = y;
            this.options_width = width;
            this.options_height = height;

            start_image = new BaseElement();
            start_image.set_position(x, y);
            start_image.set_colours(BackgroundColor, BorderColor);
            start_image.set_image(img);
            start_image.ClickUp += new EventHandler(toggle_dropdown);
            elements.Add(start_image);
            this.register_elements();
        }