Merge branch 'treeco/settings-defaults' into 'master'

Change a bunch of settings defaults, fix sprite looting key

See merge request veloren/veloren!1013
This commit is contained in:
Treeco 2020-05-25 16:20:39 +00:00
commit e759d9a1c4
5 changed files with 18 additions and 11 deletions

BIN
assets/voxygen/element/help.png (Stored with Git LFS)

Binary file not shown.

View File

@ -1192,7 +1192,7 @@ impl<'a> Widget for SettingsWindow<'a> {
if let Some(new_val) = ImageSlider::discrete( if let Some(new_val) = ImageSlider::discrete(
display_zoom, display_zoom,
1, 1,
800, 300,
self.imgs.slider_indicator, self.imgs.slider_indicator,
self.imgs.slider, self.imgs.slider,
) )

View File

@ -271,11 +271,6 @@ impl PlayState for SessionState {
} }
} else { } else {
self.inputs.secondary.set_state(state); self.inputs.secondary.set_state(state);
// Check for select_block that is highlighted
if let Some(select_pos) = self.scene.select_pos() {
client.collect_block(select_pos);
}
} }
}, },
@ -391,6 +386,12 @@ impl PlayState for SessionState {
Event::InputUpdate(GameInput::Interact, state) => { Event::InputUpdate(GameInput::Interact, state) => {
let mut client = self.client.borrow_mut(); let mut client = self.client.borrow_mut();
// Collect terrain sprites
if let Some(select_pos) = self.scene.select_pos() {
client.collect_block(select_pos);
}
// Collect lootable entities
let player_pos = client let player_pos = client
.state() .state()
.read_storage::<comp::Pos>() .read_storage::<comp::Pos>()

View File

@ -135,7 +135,7 @@ impl ControlSettings {
GameInput::ToggleIngameUi => KeyMouse::Key(VirtualKeyCode::F6), GameInput::ToggleIngameUi => KeyMouse::Key(VirtualKeyCode::F6),
GameInput::Roll => MIDDLE_CLICK_KEY, GameInput::Roll => MIDDLE_CLICK_KEY,
GameInput::Respawn => KeyMouse::Key(VirtualKeyCode::Space), GameInput::Respawn => KeyMouse::Key(VirtualKeyCode::Space),
GameInput::Interact => KeyMouse::Mouse(MouseButton::Right), GameInput::Interact => KeyMouse::Key(VirtualKeyCode::E),
GameInput::ToggleWield => KeyMouse::Key(VirtualKeyCode::T), GameInput::ToggleWield => KeyMouse::Key(VirtualKeyCode::T),
//GameInput::Charge => KeyMouse::Key(VirtualKeyCode::Key1), //GameInput::Charge => KeyMouse::Key(VirtualKeyCode::Key1),
GameInput::FreeLook => KeyMouse::Key(VirtualKeyCode::L), GameInput::FreeLook => KeyMouse::Key(VirtualKeyCode::L),
@ -568,7 +568,7 @@ impl Default for GraphicsSettings {
fn default() -> Self { fn default() -> Self {
Self { Self {
view_distance: 10, view_distance: 10,
sprite_render_distance: 250, sprite_render_distance: 150,
figure_lod_render_distance: 250, figure_lod_render_distance: 250,
max_fps: 60, max_fps: 60,
fov: 50, fov: 50,

View File

@ -620,6 +620,12 @@ impl Window {
}, },
glutin::DeviceEvent::MouseWheel { delta, .. } if cursor_grabbed && *focused => { glutin::DeviceEvent::MouseWheel { delta, .. } if cursor_grabbed && *focused => {
events.push(Event::Zoom({ events.push(Event::Zoom({
// Since scrolling apparently acts different depending on platform
#[cfg(target_os = "windows")]
const PLATFORM_FACTOR: f32 = -4.0;
#[cfg(not(target_os = "windows"))]
const PLATFORM_FACTOR: f32 = 1.0;
let y = match delta { let y = match delta {
glutin::MouseScrollDelta::LineDelta(_x, y) => y, glutin::MouseScrollDelta::LineDelta(_x, y) => y,
// TODO: Check to see if there is a better way to find the "line // TODO: Check to see if there is a better way to find the "line
@ -629,7 +635,7 @@ impl Window {
// across operating systems. // across operating systems.
glutin::MouseScrollDelta::PixelDelta(pos) => (pos.y / 16.0) as f32, glutin::MouseScrollDelta::PixelDelta(pos) => (pos.y / 16.0) as f32,
}; };
y * (zoom_sensitivity as f32 / 100.0) * zoom_inversion y * (zoom_sensitivity as f32 / 100.0) * zoom_inversion * PLATFORM_FACTOR
})) }))
}, },
_ => {}, _ => {},