Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vE5li committed May 3, 2024
1 parent 0b5ecb4 commit 2d648d5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
8 changes: 3 additions & 5 deletions korangar/src/interface/elements/containers/friends.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
use std::cell::{RefCell, UnsafeCell};
use std::cell::RefCell;
use std::rc::{Rc, Weak};

use korangar_interface::elements::{
ButtonBuilder, ContainerState, Element, ElementCell, ElementState, ElementWrap, Expandable, Focus, WeakElementCell,
};
use korangar_interface::elements::{ButtonBuilder, ContainerState, Element, ElementCell, ElementState, ElementWrap, Expandable, Focus};
use korangar_interface::event::{ChangeEvent, HoverInformation};
use korangar_interface::layout::PlacementResolver;
use korangar_interface::size_bound;
use korangar_interface::state::{PlainRemote, Remote};
use ragnarok_packets::Friend;

use crate::current_element::CurrentElement;
use crate::graphics::{InterfaceRenderer, Renderer};
use crate::input::{MouseInputMode, UserEvent};
use crate::interface::application::InterfaceSettings;
use crate::interface::layout::{ScreenClip, ScreenPosition, ScreenSize};
use crate::interface::theme::InterfaceTheme;
use crate::packet_recorder::CurrentElement;

pub struct FriendView {
friends: PlainRemote<Vec<(Friend, CurrentElement)>>,
Expand Down
6 changes: 2 additions & 4 deletions korangar/src/interface/windows/friends/list.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
use std::cell::UnsafeCell;

use derive_new::new;
use korangar_interface::elements::{ButtonBuilder, ElementWrap, InputFieldBuilder, WeakElementCell};
use korangar_interface::elements::{ButtonBuilder, ElementWrap, InputFieldBuilder};
use korangar_interface::event::ClickAction;
use korangar_interface::state::{PlainRemote, PlainTrackedState, TrackedStateTake};
use korangar_interface::windows::{PrototypeWindow, Window, WindowBuilder};
use korangar_interface::{dimension_bound, size_bound};
use ragnarok_packets::Friend;

use crate::current_element::CurrentElement;
use crate::input::UserEvent;
use crate::interface::application::InterfaceSettings;
use crate::interface::elements::FriendView;
use crate::interface::layout::ScreenSize;
use crate::interface::windows::WindowCache;
use crate::packet_recorder::CurrentElement;

#[derive(new)]
pub struct FriendsWindow {
Expand Down
25 changes: 15 additions & 10 deletions korangar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod inventory;
mod loaders;
mod world;

use std::cell::{RefCell, UnsafeCell};
use std::cell::RefCell;
use std::io::Cursor;
use std::net::{IpAddr, SocketAddr};
use std::rc::Rc;
Expand All @@ -43,7 +43,6 @@ use korangar_debug::profile_block;
#[cfg(feature = "debug")]
use korangar_debug::profiling::Profiler;
use korangar_interface::application::{Application, FocusState, FontSizeTrait, FontSizeTraitExt, PositionTraitExt};
use korangar_interface::elements::WeakElementCell;
use korangar_interface::state::{PlainTrackedState, Remote, RemoteClone, TrackedState, TrackedStateExt, TrackedStateTake, TrackedStateVec};
use korangar_interface::Interface;
use korangar_networking::{DisconnectReason, LoginServerLoginData, MessageColor, NetworkEvent, NetworkingSystem};
Expand All @@ -61,6 +60,7 @@ use winit::event::{Event, WindowEvent};
use winit::event_loop::{ControlFlow, EventLoop};
use winit::window::{Icon, WindowBuilder};

use crate::current_element::CurrentElement;
use crate::graphics::*;
use crate::input::{InputSystem, UserEvent};
use crate::interface::application::InterfaceSettings;
Expand All @@ -77,7 +77,6 @@ use crate::interface::windows::{
use crate::interface::windows::{CommandsWindow, MapsWindow, ProfilerWindow, RenderSettingsWindow, TimeWindow};
use crate::inventory::{Hotbar, Inventory, SkillTree};
use crate::loaders::*;
use crate::packet_recorder::CurrentElement;
#[cfg(feature = "debug")]
use crate::system::vulkan_message_callback;
use crate::system::{choose_physical_device, get_device_extensions, get_layers, GameTimer};
Expand All @@ -94,18 +93,12 @@ korangar_debug::create_profiler_threads!(threads, {
Deferred,
});

#[cfg(feature = "debug")]
mod packet_recorder {
mod current_element {
use std::cell::UnsafeCell;
use std::sync::Mutex;

use korangar_debug::profiling::RingBuffer;
use korangar_interface::elements::ElementCell;
use ragnarok_packets::handler::{PacketCallback, UnknownPacket};
use ragnarok_packets::{IncomingPacket, OutgoingPacket, PacketHeader};

use crate::interface::application::InterfaceSettings;
use crate::interface::elements::PacketEntry;

#[derive(Debug, Clone, Copy)]
enum CurrentElementInner {
Expand Down Expand Up @@ -143,6 +136,18 @@ mod packet_recorder {
}
}
}
}

#[cfg(feature = "debug")]
mod packet_recorder {
use std::sync::Mutex;

use korangar_debug::profiling::RingBuffer;
use ragnarok_packets::handler::{PacketCallback, UnknownPacket};
use ragnarok_packets::{IncomingPacket, OutgoingPacket, PacketHeader};

use crate::current_element::CurrentElement;
use crate::interface::elements::PacketEntry;

#[derive(Clone)]
pub struct PacketRecorder {
Expand Down
2 changes: 1 addition & 1 deletion korangar_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ where

#[cfg(test)]
mod packet_handlers {
use ragnarok_packets::NoPacketCallback;
use ragnarok_packets::handler::NoPacketCallback;

use crate::NetworkingSystem;

Expand Down

0 comments on commit 2d648d5

Please sign in to comment.