core: Fix failing builds without avm_debug feature
This commit is contained in:
parent
1d6820c55b
commit
2bb4e2e549
|
@ -1336,6 +1336,9 @@ pub trait TDisplayObject<'gc>:
|
|||
render_base((*self).into(), context)
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "avm_debug"))]
|
||||
fn display_render_tree(&self, _depth: usize) {}
|
||||
|
||||
#[cfg(feature = "avm_debug")]
|
||||
fn display_render_tree(&self, depth: usize) {
|
||||
let self_str = format!("{:?}", self);
|
||||
|
|
|
@ -444,6 +444,9 @@ pub trait TDisplayObjectContainer<'gc>:
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "avm_debug"))]
|
||||
fn recurse_render_tree(&self, _depth: usize) {}
|
||||
|
||||
#[cfg(feature = "avm_debug")]
|
||||
fn recurse_render_tree(&self, depth: usize) {
|
||||
for child in self.iter_render_list() {
|
||||
|
|
|
@ -799,23 +799,23 @@ impl Player {
|
|||
/// Event handling is a complicated affair, involving several different
|
||||
/// concerns that need to resolve with specific priority.
|
||||
///
|
||||
/// 1. (In `avm_debug` builds) If Ctrl-Alt-V is pressed, dump all AVM1
|
||||
/// variables in the player.
|
||||
/// 2. (In `avm_debug` builds) If Ctrl-Alt-D is pressed, toggle debug
|
||||
/// output for AVM1 and AVM2.
|
||||
/// 3. If the incoming event is text input or key input that could be
|
||||
/// 1. (In `avm_debug` builds)
|
||||
/// If Ctrl-Alt-V is pressed, dump all AVM1 variables in the player.
|
||||
/// If Ctrl-Alt-D is pressed, toggle debug output for AVM1 and AVM2.
|
||||
/// If Ctrl-Alt-F is pressed, dump the display object tree.
|
||||
/// 2. If the incoming event is text input or key input that could be
|
||||
/// related to text input (e.g. pressing a letter key), we dispatch a
|
||||
/// key press event onto the stage.
|
||||
/// 4. If the event from step 3 was not handled, we check if an `EditText`
|
||||
/// 3. If the event from step 3 was not handled, we check if an `EditText`
|
||||
/// object is in focus and dispatch a text-control event to said object.
|
||||
/// 5. If the incoming event is text input, and neither step 3 nor step 4
|
||||
/// 4. If the incoming event is text input, and neither step 3 nor step 4
|
||||
/// resulted in an event being handled, we dispatch a text input event
|
||||
/// to the currently focused `EditText` (if present).
|
||||
/// 6. Regardless of all prior event handling, we dispatch the event
|
||||
/// 5. Regardless of all prior event handling, we dispatch the event
|
||||
/// through the stage normally.
|
||||
/// 7. Then, we dispatch the event through AVM1 global listener objects.
|
||||
/// 8. The AVM1 action queue is drained.
|
||||
/// 9. Mouse state is updated. This triggers button rollovers, which are a
|
||||
/// 6. Then, we dispatch the event through AVM1 global listener objects.
|
||||
/// 7. The AVM1 action queue is drained.
|
||||
/// 8. Mouse state is updated. This triggers button rollovers, which are a
|
||||
/// second wave of event processing.
|
||||
pub fn handle_event(&mut self, event: PlayerEvent) {
|
||||
let prev_is_mouse_down = self.input.is_mouse_down();
|
||||
|
|
Loading…
Reference in New Issue