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; }
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); }
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(); }