pub struct ClientConfig {
pub game_host: Option<String>,
pub api_port: Option<u16>,
pub game_port: Option<u16>,
pub gfx_window: GfxWindowPrefs,
pub floating_chat: FloatingChatPrefs,
pub hud_view: Option<String>,
pub hud_log_hidden: Option<bool>,
pub workers_menu_compact: Option<bool>,
pub worker_route_panel_collapsed: Option<bool>,
pub check_updates: Option<bool>,
pub update_dismissed_version: Option<String>,
}Fields§
§game_host: Option<String>Gateway host (IPv4, IPv6, or DNS name). Port defaults to 7373.
api_port: Option<u16>Control plane HTTP port when game_host is set. Defaults to 7380.
game_port: Option<u16>Gateway TCP port when game_host is set. Defaults to 7373.
gfx_window: GfxWindowPrefsGfx play window geometry (flatland3-gfx).
floating_chat: FloatingChatPrefsMap-mode floating chat panel (flatland3-gfx).
hud_view: Option<String>Last HUD view mode from . cycle: normal | compact | map.
Bottom system LOG dock hidden (' toggle).
Hired workers (h) menu compact vs detail (c toggle).
worker_route_panel_collapsed: Option<bool>Worker route editor sheet collapsed to the corner chip (z toggle).
check_updates: Option<bool>When false, skip automatic client binary update checks (default true).
update_dismissed_version: Option<String>Last remote version the player dismissed with “Remind later”.
Implementations§
Source§impl ClientConfig
impl ClientConfig
pub fn path() -> Result<PathBuf>
pub fn load() -> Self
pub fn save(&self) -> Result<()>
pub fn save_gfx_window(&mut self, prefs: GfxWindowPrefs) -> Result<()>
Sourcepub fn save_floating_chat(&mut self, prefs: FloatingChatPrefs) -> Result<()>
pub fn save_floating_chat(&mut self, prefs: FloatingChatPrefs) -> Result<()>
Persist map-mode floating chat position + collapse.
Sourcepub fn save_hud_view(&mut self, label: &str) -> Result<()>
pub fn save_hud_view(&mut self, label: &str) -> Result<()>
Persist the . HUD view mode (normal / compact / map).
pub fn save_worker_route_panel_collapsed( &mut self, collapsed: bool, ) -> Result<()>
pub fn save_update_dismissed_version(&mut self, version: &str) -> Result<()>
pub fn set_game_host(&mut self, host: impl Into<String>) -> Result<()>
Sourcepub fn display_game_host(&self) -> String
pub fn display_game_host(&self) -> String
Host string for UI (never empty — falls back to localhost).
Sourcepub fn resolve_game_server_addr(&self) -> Result<SocketAddr>
pub fn resolve_game_server_addr(&self) -> Result<SocketAddr>
Resolve gateway TCP address (supports DNS names like server1.flatland3.com).
pub fn game_server_addr(&self) -> SocketAddr
pub fn api_base_url(&self) -> String
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more