mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove or uncomment commented code
Former-commit-id: 32ac76b649012a0a2756f796b26d48318faad11c
This commit is contained in:
parent
7132cfdf5b
commit
470e63a691
@ -11,7 +11,7 @@ use std::{
|
|||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// An asset has already been loaded with this specifier but anot type
|
/// An asset of a different type has already been loaded with this specifier
|
||||||
InvalidType,
|
InvalidType,
|
||||||
/// Asset does not exist
|
/// Asset does not exist
|
||||||
NotFound(String),
|
NotFound(String),
|
||||||
@ -114,25 +114,3 @@ pub fn load_from_path(name: &str) -> Result<Vec<u8>, Error> {
|
|||||||
None => Err(Error::NotFound(name.to_owned())),
|
None => Err(Error::NotFound(name.to_owned())),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
/// Translation Asset
|
|
||||||
pub struct Translations {
|
|
||||||
pub translations: Value
|
|
||||||
}
|
|
||||||
impl Translations {
|
|
||||||
pub fn get_lang(&self, lang: &str) -> &str {
|
|
||||||
self.translations[lang].as_str().unwrap()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl Asset for Translations {
|
|
||||||
type T=Self;
|
|
||||||
fn load(path: &str) -> Result<Self, ()>{
|
|
||||||
let file_out = read_from_path(path).unwrap();
|
|
||||||
let content = from_utf8(file_out.as_slice()).unwrap();
|
|
||||||
let value = content.parse::<Value>().unwrap();
|
|
||||||
|
|
||||||
Ok(Translations{translations: value})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -76,10 +76,10 @@ impl<'a> Widget for CharacterWindow<'a> {
|
|||||||
.set(state.charwindow_frame, ui);
|
.set(state.charwindow_frame, ui);
|
||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
//Image::new(self.imgs.charwindow_icon)
|
Image::new(self.imgs.charwindow_icon)
|
||||||
//.w_h(224.0 / 3.0, 224.0 / 3.0)
|
.w_h(40.0, 40.0)
|
||||||
//.top_left_with_margins_on(state.charwindow_frame, -10.0, -10.0)
|
.top_left_with_margins_on(state.charwindow_frame, 4.0, 4.0)
|
||||||
//.set(state.charwindow_icon, ui);
|
.set(state.charwindow_icon, ui);
|
||||||
|
|
||||||
// X-Button
|
// X-Button
|
||||||
if Button::image(self.imgs.close_button)
|
if Button::image(self.imgs.close_button)
|
||||||
|
@ -103,7 +103,7 @@ impl<'a> Widget for EscMenu<'a> {
|
|||||||
.set(state.ids.menu_button_2, ui)
|
.set(state.ids.menu_button_2, ui)
|
||||||
.was_clicked()
|
.was_clicked()
|
||||||
{
|
{
|
||||||
//self.menu_open = false;
|
// TODO: Show controls window
|
||||||
};
|
};
|
||||||
// Servers
|
// Servers
|
||||||
if Button::image(self.imgs.button)
|
if Button::image(self.imgs.button)
|
||||||
@ -118,7 +118,7 @@ impl<'a> Widget for EscMenu<'a> {
|
|||||||
.set(state.ids.menu_button_3, ui)
|
.set(state.ids.menu_button_3, ui)
|
||||||
.was_clicked()
|
.was_clicked()
|
||||||
{
|
{
|
||||||
//self.menu_open = false;
|
// TODO: Show servers window (is needed in-game?)
|
||||||
};
|
};
|
||||||
// Logout
|
// Logout
|
||||||
if Button::image(self.imgs.button)
|
if Button::image(self.imgs.button)
|
||||||
|
Loading…
Reference in New Issue
Block a user