Remove or uncomment commented code

Former-commit-id: 32ac76b649012a0a2756f796b26d48318faad11c
This commit is contained in:
Imbris 2019-05-07 21:59:35 -04:00
parent 7132cfdf5b
commit 470e63a691
3 changed files with 7 additions and 29 deletions

View File

@ -11,7 +11,7 @@ use std::{
#[derive(Debug, Clone)]
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,
/// Asset does not exist
NotFound(String),
@ -114,25 +114,3 @@ pub fn load_from_path(name: &str) -> Result<Vec<u8>, Error> {
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})
}
}
*/

View File

@ -76,10 +76,10 @@ impl<'a> Widget for CharacterWindow<'a> {
.set(state.charwindow_frame, ui);
// Icon
//Image::new(self.imgs.charwindow_icon)
//.w_h(224.0 / 3.0, 224.0 / 3.0)
//.top_left_with_margins_on(state.charwindow_frame, -10.0, -10.0)
//.set(state.charwindow_icon, ui);
Image::new(self.imgs.charwindow_icon)
.w_h(40.0, 40.0)
.top_left_with_margins_on(state.charwindow_frame, 4.0, 4.0)
.set(state.charwindow_icon, ui);
// X-Button
if Button::image(self.imgs.close_button)

View File

@ -103,7 +103,7 @@ impl<'a> Widget for EscMenu<'a> {
.set(state.ids.menu_button_2, ui)
.was_clicked()
{
//self.menu_open = false;
// TODO: Show controls window
};
// Servers
if Button::image(self.imgs.button)
@ -118,7 +118,7 @@ impl<'a> Widget for EscMenu<'a> {
.set(state.ids.menu_button_3, ui)
.was_clicked()
{
//self.menu_open = false;
// TODO: Show servers window (is needed in-game?)
};
// Logout
if Button::image(self.imgs.button)