pub trait InteractionMode: InteractionModeAsAny {
Show 16 methods
// Required methods
fn on_left_mouse_button_down(
&mut self,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
mouse_pos: Vector2<f32>,
frame_size: Vector2<f32>,
settings: &Settings,
);
fn on_left_mouse_button_up(
&mut self,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
mouse_pos: Vector2<f32>,
frame_size: Vector2<f32>,
settings: &Settings,
);
fn on_mouse_move(
&mut self,
mouse_offset: Vector2<f32>,
mouse_position: Vector2<f32>,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
frame_size: Vector2<f32>,
settings: &Settings,
);
fn make_button(
&mut self,
ctx: &mut BuildContext<'_>,
selected: bool,
) -> Handle<Button>;
fn uuid(&self) -> Uuid;
// Provided methods
fn on_mouse_enter(
&mut self,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
frame_size: Vector2<f32>,
settings: &Settings,
) { ... }
fn on_mouse_leave(
&mut self,
mouse_position: Vector2<f32>,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
frame_size: Vector2<f32>,
settings: &Settings,
) { ... }
fn update(
&mut self,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
settings: &Settings,
) { ... }
fn activate(
&mut self,
controller: &dyn SceneController,
engine: &mut Engine,
) { ... }
fn deactivate(
&mut self,
controller: &dyn SceneController,
engine: &mut Engine,
) { ... }
fn on_key_down(
&mut self,
key: KeyCode,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
) -> bool { ... }
fn on_key_up(
&mut self,
key: KeyCode,
controller: &mut dyn SceneController,
engine: &mut Engine,
) -> bool { ... }
fn handle_ui_message(
&mut self,
message: &UiMessage,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
) { ... }
fn on_drop(&mut self, _engine: &mut Engine) { ... }
fn on_hot_key_pressed(
&mut self,
hotkey: &HotKey,
controller: &mut dyn SceneController,
engine: &mut Engine,
settings: &Settings,
) -> bool { ... }
fn on_hot_key_released(
&mut self,
hotkey: &HotKey,
controller: &mut dyn SceneController,
engine: &mut Engine,
settings: &Settings,
) -> bool { ... }
}Required Methods§
fn on_mouse_move( &mut self, mouse_offset: Vector2<f32>, mouse_position: Vector2<f32>, editor_selection: &Selection, controller: &mut dyn SceneController, engine: &mut Engine, frame_size: Vector2<f32>, settings: &Settings, )
fn uuid(&self) -> Uuid
Provided Methods§
Sourcefn on_mouse_enter(
&mut self,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
frame_size: Vector2<f32>,
settings: &Settings,
)
fn on_mouse_enter( &mut self, editor_selection: &Selection, controller: &mut dyn SceneController, engine: &mut Engine, frame_size: Vector2<f32>, settings: &Settings, )
Called when the mouse enters the scene viewer while this interaction mode is active.
Sourcefn on_mouse_leave(
&mut self,
mouse_position: Vector2<f32>,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
frame_size: Vector2<f32>,
settings: &Settings,
)
fn on_mouse_leave( &mut self, mouse_position: Vector2<f32>, editor_selection: &Selection, controller: &mut dyn SceneController, engine: &mut Engine, frame_size: Vector2<f32>, settings: &Settings, )
Called when the mouse leaves the scene viewer while this interaction mode is active.
mouse_position: The position of the mouse relative to the scene viewer, with (0,0) being the left-top corner.editor_selection: The currently selected object in the editor.
fn update( &mut self, editor_selection: &Selection, controller: &mut dyn SceneController, engine: &mut Engine, settings: &Settings, )
fn activate(&mut self, controller: &dyn SceneController, engine: &mut Engine)
fn deactivate(&mut self, controller: &dyn SceneController, engine: &mut Engine)
Sourcefn on_key_down(
&mut self,
key: KeyCode,
editor_selection: &Selection,
controller: &mut dyn SceneController,
engine: &mut Engine,
) -> bool
fn on_key_down( &mut self, key: KeyCode, editor_selection: &Selection, controller: &mut dyn SceneController, engine: &mut Engine, ) -> bool
Should return true if the key was handled in any way, otherwise you may mess up
keyboard message routing. Return false if the key is unhandled.
Sourcefn on_key_up(
&mut self,
key: KeyCode,
controller: &mut dyn SceneController,
engine: &mut Engine,
) -> bool
fn on_key_up( &mut self, key: KeyCode, controller: &mut dyn SceneController, engine: &mut Engine, ) -> bool
Should return true if the key was handled in any way, otherwise you may mess up
keyboard message routing. Return false if the key is unhandled.