mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
Adjust default window size and ui.
This commit is contained in:
parent
a570730aa6
commit
fbb710b220
2 changed files with 20 additions and 14 deletions
|
@ -4,7 +4,11 @@ use bookkeeping::{
|
||||||
save_state::SaveState,
|
save_state::SaveState,
|
||||||
};
|
};
|
||||||
use clipboard::{ClipboardContext, ClipboardProvider};
|
use clipboard::{ClipboardContext, ClipboardProvider};
|
||||||
use eframe::egui::{self, Align2, Button, Color32, Context, DragValue, FontDefinitions, FontFamily, ImageButton, InnerResponse, Key, Margin, OpenUrl, Rect, RichText, ScrollArea, Slider, TextureOptions, ThemePreference, Ui, UiBuilder, Vec2, Visuals, Window};
|
use eframe::egui::{
|
||||||
|
self, Align2, Button, Color32, Context, DragValue, FontDefinitions, FontFamily, ImageButton,
|
||||||
|
InnerResponse, Key, Margin, OpenUrl, Rect, RichText, ScrollArea, Slider, TextureOptions,
|
||||||
|
ThemePreference, Ui, UiBuilder, Vec2, Visuals, Window,
|
||||||
|
};
|
||||||
use egui_plot::{Plot, PlotPoint, PlotUi, Text};
|
use egui_plot::{Plot, PlotPoint, PlotUi, Text};
|
||||||
use image::DynamicImage::ImageRgba8;
|
use image::DynamicImage::ImageRgba8;
|
||||||
use image::RgbaImage;
|
use image::RgbaImage;
|
||||||
|
@ -18,6 +22,8 @@ use net::{
|
||||||
use player_cosmetics::PlayerPngDesc;
|
use player_cosmetics::PlayerPngDesc;
|
||||||
use self_update::SelfUpdateManager;
|
use self_update::SelfUpdateManager;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io::{Read, Write};
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::{
|
use std::{
|
||||||
fmt::Display,
|
fmt::Display,
|
||||||
|
@ -29,8 +35,6 @@ use std::{
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
use std::{net::IpAddr, path::PathBuf};
|
use std::{net::IpAddr, path::PathBuf};
|
||||||
use std::fs::File;
|
|
||||||
use std::io::{Read, Write};
|
|
||||||
use steamworks::{LobbyId, SteamAPIInitError};
|
use steamworks::{LobbyId, SteamAPIInitError};
|
||||||
use tangled::Peer;
|
use tangled::Peer;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
|
@ -380,7 +384,11 @@ impl App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_settings(&self) {
|
fn set_settings(&self) {
|
||||||
settings_set(self.app_saved_state.clone(), self.appearance.clone(), self.modmanager_settings.clone())
|
settings_set(
|
||||||
|
self.app_saved_state.clone(),
|
||||||
|
self.appearance.clone(),
|
||||||
|
self.modmanager_settings.clone(),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_netman_init(&self) -> NetManagerInit {
|
fn get_netman_init(&self) -> NetManagerInit {
|
||||||
|
@ -717,7 +725,7 @@ impl App {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ui.add_space(20.0);
|
ui.add_space(10.0);
|
||||||
ui.label(tr("connect_settings_debug"));
|
ui.label(tr("connect_settings_debug"));
|
||||||
ui.checkbox(
|
ui.checkbox(
|
||||||
&mut game_settings.debug_mode,
|
&mut game_settings.debug_mode,
|
||||||
|
@ -753,18 +761,15 @@ impl App {
|
||||||
&mut game_settings.item_dedup,
|
&mut game_settings.item_dedup,
|
||||||
tr("connect_settings_item_dedup"),
|
tr("connect_settings_item_dedup"),
|
||||||
);
|
);
|
||||||
ui.add_space(20.0);
|
|
||||||
ui.checkbox(
|
ui.checkbox(
|
||||||
&mut game_settings.randomize_perks,
|
&mut game_settings.randomize_perks,
|
||||||
tr("Have-perk-pools-be-independent-of-each-other"),
|
tr("Have-perk-pools-be-independent-of-each-other"),
|
||||||
);
|
);
|
||||||
ui.add_space(20.0);
|
|
||||||
ui.add(
|
ui.add(
|
||||||
Slider::new(&mut game_settings.enemy_hp_mult, 1.0..=1000.0)
|
Slider::new(&mut game_settings.enemy_hp_mult, 1.0..=1000.0)
|
||||||
.logarithmic(true)
|
.logarithmic(true)
|
||||||
.text(tr("connect_settings_enemy_hp_scale")),
|
.text(tr("connect_settings_enemy_hp_scale")),
|
||||||
);
|
);
|
||||||
ui.add_space(20.0);
|
|
||||||
ui.checkbox(&mut game_settings.friendly_fire, tr("Enable-friendly-fire"));
|
ui.checkbox(&mut game_settings.friendly_fire, tr("Enable-friendly-fire"));
|
||||||
if show_local {
|
if show_local {
|
||||||
heading_with_underline(ui, tr("connect_settings_local"));
|
heading_with_underline(ui, tr("connect_settings_local"));
|
||||||
|
@ -1336,4 +1341,4 @@ pub fn host_cli(port: u16) {
|
||||||
let player_path = netmaninit.player_path.clone();
|
let player_path = netmaninit.player_path.clone();
|
||||||
let netman = net::NetManager::new(varient, netmaninit);
|
let netman = net::NetManager::new(varient, netmaninit);
|
||||||
netman.start_inner(player_path, true).unwrap();
|
netman.start_inner(player_path, true).unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ use eframe::{
|
||||||
egui::{IconData, ViewportBuilder},
|
egui::{IconData, ViewportBuilder},
|
||||||
NativeOptions,
|
NativeOptions,
|
||||||
};
|
};
|
||||||
use noita_proxy::{args::Args, recorder::replay_file, connect_cli, host_cli, App};
|
use noita_proxy::{args::Args, connect_cli, host_cli, recorder::replay_file, App};
|
||||||
use tracing::{info, level_filters::LevelFilter};
|
use tracing::{info, level_filters::LevelFilter};
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
|
|
||||||
|
@ -24,8 +24,7 @@ async fn main() {
|
||||||
|
|
||||||
if let Some(replay) = args.replay_folder {
|
if let Some(replay) = args.replay_folder {
|
||||||
replay_file(replay)
|
replay_file(replay)
|
||||||
}
|
} else if let Some(host) = args.host {
|
||||||
else if let Some(host) = args.host {
|
|
||||||
let port = if host.to_ascii_lowercase() == "steam" {
|
let port = if host.to_ascii_lowercase() == "steam" {
|
||||||
0
|
0
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,11 +47,13 @@ async fn main() {
|
||||||
NativeOptions {
|
NativeOptions {
|
||||||
viewport: ViewportBuilder::default()
|
viewport: ViewportBuilder::default()
|
||||||
.with_min_inner_size([800.0, 600.0])
|
.with_min_inner_size([800.0, 600.0])
|
||||||
|
.with_inner_size([1200.0, 800.0])
|
||||||
.with_icon(icon)
|
.with_icon(icon)
|
||||||
.with_title("Noita Entangled Worlds Proxy"),
|
.with_title("Noita Entangled Worlds Proxy"),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
Box::new(|cc| Ok(Box::new(App::new(cc, args)))),
|
Box::new(|cc| Ok(Box::new(App::new(cc, args)))),
|
||||||
).unwrap()
|
)
|
||||||
|
.unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue