2020-04-24 16:47:14 +00:00
|
|
|
#![allow(clippy::new_without_default)]
|
2019-02-10 14:30:48 +00:00
|
|
|
|
2019-01-10 09:55:38 +00:00
|
|
|
use crate::{
|
2020-04-17 21:44:14 +00:00
|
|
|
layout::{Direction, GuiResponse},
|
2020-04-17 13:29:48 +00:00
|
|
|
*,
|
2019-01-10 09:55:38 +00:00
|
|
|
};
|
|
|
|
|
2020-05-01 17:24:52 +00:00
|
|
|
mod slider;
|
2020-04-29 19:25:49 +00:00
|
|
|
mod text_edit;
|
2020-05-01 17:24:52 +00:00
|
|
|
|
|
|
|
pub use {slider::*, text_edit::*};
|
2020-04-29 19:25:49 +00:00
|
|
|
|
2019-01-10 09:55:38 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2020-05-07 08:47:03 +00:00
|
|
|
/// Anything implementing Widget can be added to a Region with `Region::add`
|
2019-01-10 09:55:38 +00:00
|
|
|
pub trait Widget {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse;
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
pub struct Label {
|
|
|
|
text: String,
|
2020-05-01 00:08:01 +00:00
|
|
|
multiline: bool,
|
2020-04-12 10:07:51 +00:00
|
|
|
text_style: TextStyle, // TODO: Option<TextStyle>, where None means "use the default for the region"
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: Option<Color>,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Label {
|
2020-04-24 16:47:14 +00:00
|
|
|
pub fn new(text: impl Into<String>) -> Self {
|
2020-05-07 08:47:03 +00:00
|
|
|
Self {
|
2019-01-12 23:55:56 +00:00
|
|
|
text: text.into(),
|
2020-05-01 00:08:01 +00:00
|
|
|
multiline: true,
|
2019-01-12 23:55:56 +00:00
|
|
|
text_style: TextStyle::Body,
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: None,
|
2019-01-12 23:55:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-01 00:08:01 +00:00
|
|
|
pub fn multiline(mut self, multiline: bool) -> Self {
|
|
|
|
self.multiline = multiline;
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
2019-01-12 23:55:56 +00:00
|
|
|
pub fn text_style(mut self, text_style: TextStyle) -> Self {
|
|
|
|
self.text_style = text_style;
|
|
|
|
self
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
2019-01-16 15:28:43 +00:00
|
|
|
|
|
|
|
pub fn text_color(mut self, text_color: Color) -> Self {
|
|
|
|
self.text_color = Some(text_color);
|
|
|
|
self
|
|
|
|
}
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
2019-01-21 07:48:32 +00:00
|
|
|
/// Usage: label!("Foo: {}", bar)
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! label {
|
2020-05-03 11:28:47 +00:00
|
|
|
($fmt:expr) => ($crate::widgets::Label::new($fmt));
|
|
|
|
($fmt:expr, $($arg:tt)*) => ($crate::widgets::Label::new(format!($fmt, $($arg)*)));
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget for Label {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2019-01-12 23:55:56 +00:00
|
|
|
let font = ®ion.fonts()[self.text_style];
|
2020-05-01 00:08:01 +00:00
|
|
|
let (text, text_size) = if self.multiline {
|
|
|
|
font.layout_multiline(&self.text, region.available_width())
|
|
|
|
} else {
|
|
|
|
font.layout_single_line(&self.text)
|
|
|
|
};
|
2019-01-14 13:26:02 +00:00
|
|
|
let interact = region.reserve_space(text_size, None);
|
2020-04-25 13:45:38 +00:00
|
|
|
region.add_text(interact.rect.min, self.text_style, text, self.text_color);
|
2019-01-10 09:55:38 +00:00
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2020-04-23 17:15:17 +00:00
|
|
|
pub struct Hyperlink {
|
|
|
|
url: String,
|
|
|
|
text: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Hyperlink {
|
|
|
|
pub fn new(url: impl Into<String>) -> Self {
|
|
|
|
let url = url.into();
|
|
|
|
Self {
|
|
|
|
text: url.clone(),
|
|
|
|
url,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget for Hyperlink {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2020-04-23 17:15:17 +00:00
|
|
|
let color = color::LIGHT_BLUE;
|
|
|
|
let text_style = TextStyle::Body;
|
|
|
|
let id = region.make_child_id(&self.url);
|
|
|
|
let font = ®ion.fonts()[text_style];
|
|
|
|
let line_spacing = font.line_spacing();
|
|
|
|
// TODO: underline
|
|
|
|
let (text, text_size) = font.layout_multiline(&self.text, region.available_width());
|
|
|
|
let interact = region.reserve_space(text_size, Some(id));
|
|
|
|
if interact.hovered {
|
2020-05-02 09:37:12 +00:00
|
|
|
region.ctx().output().cursor_icon = CursorIcon::PointingHand;
|
2020-04-23 17:15:17 +00:00
|
|
|
}
|
|
|
|
if interact.clicked {
|
2020-05-02 09:37:12 +00:00
|
|
|
region.ctx().output().open_url = Some(self.url);
|
2020-04-23 17:15:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if interact.hovered {
|
|
|
|
// Underline:
|
|
|
|
for fragment in &text {
|
2020-04-25 13:45:38 +00:00
|
|
|
let pos = interact.rect.min;
|
2020-04-23 17:15:17 +00:00
|
|
|
let y = pos.y + fragment.y_offset + line_spacing;
|
|
|
|
let y = region.round_to_pixel(y);
|
|
|
|
let min_x = pos.x + fragment.min_x();
|
|
|
|
let max_x = pos.x + fragment.max_x();
|
|
|
|
region.add_paint_cmd(PaintCmd::Line {
|
|
|
|
points: vec![pos2(min_x, y), pos2(max_x, y)],
|
|
|
|
color,
|
|
|
|
width: region.style().line_width,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-25 13:45:38 +00:00
|
|
|
region.add_text(interact.rect.min, text_style, text, Some(color));
|
2020-04-23 17:15:17 +00:00
|
|
|
|
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2019-01-10 09:55:38 +00:00
|
|
|
pub struct Button {
|
|
|
|
text: String,
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: Option<Color>,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Button {
|
2020-04-24 16:47:14 +00:00
|
|
|
pub fn new(text: impl Into<String>) -> Self {
|
2020-05-07 08:47:03 +00:00
|
|
|
Self {
|
2019-01-16 15:28:43 +00:00
|
|
|
text: text.into(),
|
|
|
|
text_color: None,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn text_color(mut self, text_color: Color) -> Self {
|
|
|
|
self.text_color = Some(text_color);
|
|
|
|
self
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget for Button {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2020-04-19 09:13:24 +00:00
|
|
|
let id = region.make_position_id();
|
2019-01-12 23:55:56 +00:00
|
|
|
let text_style = TextStyle::Button;
|
|
|
|
let font = ®ion.fonts()[text_style];
|
2020-04-19 22:48:54 +00:00
|
|
|
let (text, text_size) = font.layout_multiline(&self.text, region.available_width());
|
2019-03-11 14:39:54 +00:00
|
|
|
let padding = region.style().button_padding;
|
2019-01-19 16:09:00 +00:00
|
|
|
let mut size = text_size + 2.0 * padding;
|
2019-03-11 14:39:54 +00:00
|
|
|
size.y = size.y.max(region.style().clickable_diameter);
|
2019-01-19 16:09:00 +00:00
|
|
|
let interact = region.reserve_space(size, Some(id));
|
2020-04-21 14:50:56 +00:00
|
|
|
let mut text_cursor = interact.rect.left_center() + vec2(padding.x, -0.5 * text_size.y);
|
|
|
|
text_cursor.y += 2.0; // TODO: why is this needed?
|
2019-03-11 14:59:49 +00:00
|
|
|
region.add_paint_cmd(PaintCmd::Rect {
|
2020-04-22 16:16:06 +00:00
|
|
|
corner_radius: region.style().interact_corner_radius(&interact),
|
2020-04-19 21:34:34 +00:00
|
|
|
fill_color: region.style().interact_fill_color(&interact),
|
2020-04-22 16:16:06 +00:00
|
|
|
outline: region.style().interact_outline(&interact),
|
2019-03-11 14:59:49 +00:00
|
|
|
rect: interact.rect,
|
|
|
|
});
|
2020-04-21 14:50:56 +00:00
|
|
|
let stroke_color = region.style().interact_stroke_color(&interact);
|
|
|
|
let text_color = self.text_color.unwrap_or(stroke_color);
|
|
|
|
region.add_text(text_cursor, text_style, text, Some(text_color));
|
2019-01-10 09:55:38 +00:00
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct Checkbox<'a> {
|
|
|
|
checked: &'a mut bool,
|
|
|
|
text: String,
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: Option<Color>,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Checkbox<'a> {
|
2020-04-24 16:47:14 +00:00
|
|
|
pub fn new(checked: &'a mut bool, text: impl Into<String>) -> Self {
|
2019-01-10 09:55:38 +00:00
|
|
|
Checkbox {
|
|
|
|
checked,
|
|
|
|
text: text.into(),
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: None,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-16 15:28:43 +00:00
|
|
|
|
|
|
|
pub fn text_color(mut self, text_color: Color) -> Self {
|
|
|
|
self.text_color = Some(text_color);
|
|
|
|
self
|
|
|
|
}
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Widget for Checkbox<'a> {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2020-04-19 09:13:24 +00:00
|
|
|
let id = region.make_position_id();
|
2019-01-12 23:55:56 +00:00
|
|
|
let text_style = TextStyle::Button;
|
|
|
|
let font = ®ion.fonts()[text_style];
|
2020-04-19 22:48:54 +00:00
|
|
|
let (text, text_size) = font.layout_multiline(&self.text, region.available_width());
|
2019-01-14 13:26:02 +00:00
|
|
|
let interact = region.reserve_space(
|
2019-03-11 14:39:54 +00:00
|
|
|
region.style().button_padding
|
|
|
|
+ vec2(region.style().start_icon_width, 0.0)
|
2019-01-10 09:55:38 +00:00
|
|
|
+ text_size
|
2019-03-11 14:39:54 +00:00
|
|
|
+ region.style().button_padding,
|
2019-01-10 09:55:38 +00:00
|
|
|
Some(id),
|
|
|
|
);
|
2020-04-25 13:45:38 +00:00
|
|
|
let text_cursor = interact.rect.min
|
2019-03-11 14:39:54 +00:00
|
|
|
+ region.style().button_padding
|
|
|
|
+ vec2(region.style().start_icon_width, 0.0);
|
2019-01-10 09:55:38 +00:00
|
|
|
if interact.clicked {
|
|
|
|
*self.checked = !*self.checked;
|
|
|
|
}
|
2020-05-05 17:12:00 +00:00
|
|
|
let (small_icon_rect, big_icon_rect) = region.style().icon_rectangles(interact.rect);
|
2019-03-11 14:59:49 +00:00
|
|
|
region.add_paint_cmd(PaintCmd::Rect {
|
|
|
|
corner_radius: 3.0,
|
2020-04-19 21:34:34 +00:00
|
|
|
fill_color: region.style().interact_fill_color(&interact),
|
2019-03-11 14:59:49 +00:00
|
|
|
outline: None,
|
|
|
|
rect: big_icon_rect,
|
2019-01-10 09:55:38 +00:00
|
|
|
});
|
2019-03-11 14:59:49 +00:00
|
|
|
|
|
|
|
let stroke_color = region.style().interact_stroke_color(&interact);
|
|
|
|
|
|
|
|
if *self.checked {
|
|
|
|
region.add_paint_cmd(PaintCmd::Line {
|
|
|
|
points: vec![
|
2020-04-22 17:38:38 +00:00
|
|
|
pos2(small_icon_rect.left(), small_icon_rect.center().y),
|
|
|
|
pos2(small_icon_rect.center().x, small_icon_rect.bottom()),
|
|
|
|
pos2(small_icon_rect.right(), small_icon_rect.top()),
|
2019-03-11 14:59:49 +00:00
|
|
|
],
|
|
|
|
color: stroke_color,
|
|
|
|
width: region.style().line_width,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-04-21 14:50:56 +00:00
|
|
|
let text_color = self.text_color.unwrap_or(stroke_color);
|
|
|
|
region.add_text(text_cursor, text_style, text, Some(text_color));
|
2019-01-10 09:55:38 +00:00
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct RadioButton {
|
|
|
|
checked: bool,
|
|
|
|
text: String,
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: Option<Color>,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl RadioButton {
|
2020-04-24 16:47:14 +00:00
|
|
|
pub fn new(checked: bool, text: impl Into<String>) -> Self {
|
2020-05-07 08:47:03 +00:00
|
|
|
Self {
|
2019-01-10 09:55:38 +00:00
|
|
|
checked,
|
|
|
|
text: text.into(),
|
2019-01-16 15:28:43 +00:00
|
|
|
text_color: None,
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-16 15:28:43 +00:00
|
|
|
|
|
|
|
pub fn text_color(mut self, text_color: Color) -> Self {
|
|
|
|
self.text_color = Some(text_color);
|
|
|
|
self
|
|
|
|
}
|
2019-01-10 09:55:38 +00:00
|
|
|
}
|
|
|
|
|
2020-04-24 16:47:14 +00:00
|
|
|
pub fn radio(checked: bool, text: impl Into<String>) -> RadioButton {
|
2019-01-10 09:55:38 +00:00
|
|
|
RadioButton::new(checked, text)
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget for RadioButton {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2020-04-19 09:13:24 +00:00
|
|
|
let id = region.make_position_id();
|
2019-01-12 23:55:56 +00:00
|
|
|
let text_style = TextStyle::Button;
|
|
|
|
let font = ®ion.fonts()[text_style];
|
2020-04-19 22:48:54 +00:00
|
|
|
let (text, text_size) = font.layout_multiline(&self.text, region.available_width());
|
2019-01-14 13:26:02 +00:00
|
|
|
let interact = region.reserve_space(
|
2019-03-11 14:39:54 +00:00
|
|
|
region.style().button_padding
|
|
|
|
+ vec2(region.style().start_icon_width, 0.0)
|
2019-01-10 09:55:38 +00:00
|
|
|
+ text_size
|
2019-03-11 14:39:54 +00:00
|
|
|
+ region.style().button_padding,
|
2019-01-10 09:55:38 +00:00
|
|
|
Some(id),
|
|
|
|
);
|
2020-04-25 13:45:38 +00:00
|
|
|
let text_cursor = interact.rect.min
|
2019-03-11 14:39:54 +00:00
|
|
|
+ region.style().button_padding
|
|
|
|
+ vec2(region.style().start_icon_width, 0.0);
|
2019-03-11 14:59:49 +00:00
|
|
|
|
|
|
|
let fill_color = region.style().interact_fill_color(&interact);
|
|
|
|
let stroke_color = region.style().interact_stroke_color(&interact);
|
|
|
|
|
2020-05-05 17:12:00 +00:00
|
|
|
let (small_icon_rect, big_icon_rect) = region.style().icon_rectangles(interact.rect);
|
2019-03-11 14:59:49 +00:00
|
|
|
|
|
|
|
region.add_paint_cmd(PaintCmd::Circle {
|
|
|
|
center: big_icon_rect.center(),
|
2020-04-19 21:34:34 +00:00
|
|
|
fill_color,
|
2019-03-11 14:59:49 +00:00
|
|
|
outline: None,
|
2020-04-22 22:17:37 +00:00
|
|
|
radius: big_icon_rect.width() / 2.0,
|
2019-01-10 09:55:38 +00:00
|
|
|
});
|
2019-03-11 14:59:49 +00:00
|
|
|
|
|
|
|
if self.checked {
|
|
|
|
region.add_paint_cmd(PaintCmd::Circle {
|
|
|
|
center: small_icon_rect.center(),
|
|
|
|
fill_color: Some(stroke_color),
|
|
|
|
outline: None,
|
2020-04-22 22:17:37 +00:00
|
|
|
radius: small_icon_rect.width() / 2.0,
|
2019-03-11 14:59:49 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-04-21 14:50:56 +00:00
|
|
|
let text_color = self.text_color.unwrap_or(stroke_color);
|
|
|
|
region.add_text(text_cursor, text_style, text, Some(text_color));
|
2019-01-10 09:55:38 +00:00
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2019-01-13 18:15:11 +00:00
|
|
|
pub struct Separator {
|
|
|
|
line_width: f32,
|
2020-04-19 21:51:38 +00:00
|
|
|
min_length: f32,
|
|
|
|
extra: f32,
|
|
|
|
color: Color,
|
2019-01-13 18:15:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Separator {
|
2020-05-07 08:47:03 +00:00
|
|
|
pub fn new() -> Self {
|
|
|
|
Self {
|
2019-01-13 18:15:11 +00:00
|
|
|
line_width: 2.0,
|
2020-04-19 21:51:38 +00:00
|
|
|
min_length: 6.0,
|
|
|
|
extra: 0.0,
|
|
|
|
color: color::WHITE,
|
2019-01-13 18:15:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-19 21:51:38 +00:00
|
|
|
pub fn line_width(mut self, line_width: f32) -> Self {
|
2019-01-13 18:15:11 +00:00
|
|
|
self.line_width = line_width;
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
2020-04-19 21:51:38 +00:00
|
|
|
pub fn min_length(mut self, min_length: f32) -> Self {
|
|
|
|
self.min_length = min_length;
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Draw this much longer on each side
|
|
|
|
pub fn extra(mut self, extra: f32) -> Self {
|
|
|
|
self.extra = extra;
|
|
|
|
self
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn color(mut self, color: Color) -> Self {
|
|
|
|
self.color = color;
|
2019-01-13 18:15:11 +00:00
|
|
|
self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget for Separator {
|
2020-04-29 20:01:39 +00:00
|
|
|
fn ui(self, region: &mut Region) -> GuiResponse {
|
2020-04-19 22:48:54 +00:00
|
|
|
let available_space = region.available_space();
|
2020-04-22 17:38:38 +00:00
|
|
|
let extra = self.extra;
|
2019-01-13 18:15:11 +00:00
|
|
|
let (points, interact) = match region.direction() {
|
|
|
|
Direction::Horizontal => {
|
2020-04-19 21:51:38 +00:00
|
|
|
let interact = region.reserve_space(vec2(self.min_length, available_space.y), None);
|
2019-01-13 18:15:11 +00:00
|
|
|
(
|
|
|
|
vec![
|
2020-04-22 17:38:38 +00:00
|
|
|
pos2(interact.rect.center().x, interact.rect.top() - extra),
|
|
|
|
pos2(interact.rect.center().x, interact.rect.bottom() + extra),
|
2019-01-13 18:15:11 +00:00
|
|
|
],
|
|
|
|
interact,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
Direction::Vertical => {
|
2020-04-19 21:51:38 +00:00
|
|
|
let interact = region.reserve_space(vec2(available_space.x, self.min_length), None);
|
2019-01-13 18:15:11 +00:00
|
|
|
(
|
|
|
|
vec![
|
2020-04-22 17:38:38 +00:00
|
|
|
pos2(interact.rect.left() - extra, interact.rect.center().y),
|
|
|
|
pos2(interact.rect.right() + extra, interact.rect.center().y),
|
2019-01-13 18:15:11 +00:00
|
|
|
],
|
|
|
|
interact,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
};
|
2019-03-11 14:59:49 +00:00
|
|
|
region.add_paint_cmd(PaintCmd::Line {
|
2019-01-13 18:15:11 +00:00
|
|
|
points,
|
2020-04-19 21:51:38 +00:00
|
|
|
color: self.color,
|
2019-01-13 18:15:11 +00:00
|
|
|
width: self.line_width,
|
2019-03-11 14:59:49 +00:00
|
|
|
});
|
2019-01-13 18:15:11 +00:00
|
|
|
region.response(interact)
|
|
|
|
}
|
|
|
|
}
|