mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
changed char head and offset
Former-commit-id: 6e9ca7249a33504bc0b7cf8f5b5591ead0399151
This commit is contained in:
parent
25932ad02b
commit
777f4066d4
@ -1 +1 @@
|
||||
Subproject commit cff10b010db25ce9af5edbdfb5ef0af889dd741a
|
||||
Subproject commit 2cd23530f89408da75fbbc016cdac6ac0de54328
|
5
voxygen/.gitignore
vendored
Normal file
5
voxygen/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
/target
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
settings.toml
|
||||
voxygen.log
|
@ -176,7 +176,6 @@ pub(self) struct Imgs {
|
||||
inv_slot: ImgId,
|
||||
|
||||
// Buttons
|
||||
|
||||
mmap_closed: ImgId,
|
||||
mmap_closed_hover: ImgId,
|
||||
mmap_closed_press: ImgId,
|
||||
@ -221,7 +220,7 @@ pub(self) struct Imgs {
|
||||
button_dark_press: ImgId,
|
||||
|
||||
// MiniMap
|
||||
mmap_frame: ImgId,
|
||||
mmap_frame: ImgId,
|
||||
mmap_frame_closed: ImgId,
|
||||
|
||||
// SkillBar Module
|
||||
@ -341,7 +340,7 @@ impl Imgs {
|
||||
mmap_open: load_vox("element/buttons/button_mmap_open.vox", ui),
|
||||
mmap_open_hover: load_vox("element/buttons/button_mmap_open_hover.vox", ui),
|
||||
mmap_open_press: load_vox("element/buttons/button_mmap_open_press.vox", ui),
|
||||
|
||||
|
||||
settings: load_vox("element/buttons/settings.vox", ui),
|
||||
settings_hover: load_vox("element/buttons/settings_hover.vox", ui),
|
||||
settings_press: load_vox("element/buttons/settings_press.vox", ui),
|
||||
@ -384,7 +383,7 @@ impl Imgs {
|
||||
button_dark_press: load_img("element/buttons/button_dark_press.png", ui),
|
||||
|
||||
// MiniMap
|
||||
mmap_frame: load_vox("element/frames/mmap.vox", ui),
|
||||
mmap_frame: load_vox("element/frames/mmap.vox", ui),
|
||||
mmap_frame_closed: load_vox("element/frames/mmap_closed.vox", ui),
|
||||
|
||||
// Skillbar Module
|
||||
@ -549,12 +548,12 @@ impl Hud {
|
||||
ids,
|
||||
chat,
|
||||
settings_tab: SettingsTab::Interface,
|
||||
show_help: true,
|
||||
show_debug: false,
|
||||
show_help: false,
|
||||
show_debug: true,
|
||||
bag_open: false,
|
||||
menu_open: false,
|
||||
map_open: false,
|
||||
mmap_open: true,
|
||||
mmap_open: false,
|
||||
show_ui: true,
|
||||
inventorytest_button: false,
|
||||
inventory_space: 0,
|
||||
@ -659,35 +658,46 @@ impl Hud {
|
||||
};
|
||||
}
|
||||
|
||||
// Minimap
|
||||
// Minimap
|
||||
|
||||
if self.mmap_open {
|
||||
if self.mmap_open {
|
||||
Image::new(self.imgs.mmap_frame)
|
||||
.w_h(100.0 * 2.0, 100.0 * 2.0)
|
||||
.top_right_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||
.set(self.ids.mmap_frame, ui_widgets);
|
||||
.w_h(100.0 * 2.0, 100.0 * 2.0)
|
||||
.top_right_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||
.set(self.ids.mmap_frame, ui_widgets);
|
||||
|
||||
Rectangle::fill_with([92.0 * 2.0, 82.0 * 2.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(self.ids.mmap_frame, 13.0 * 2.0 + 2.0)
|
||||
.set(self.ids.mmap_frame_bg, ui_widgets);
|
||||
}
|
||||
else {
|
||||
Image::new(self.imgs.mmap_frame_closed)
|
||||
Rectangle::fill_with([92.0 * 2.0, 82.0 * 2.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(self.ids.mmap_frame, 13.0 * 2.0 + 2.0)
|
||||
.set(self.ids.mmap_frame_bg, ui_widgets);
|
||||
} else {
|
||||
Image::new(self.imgs.mmap_frame_closed)
|
||||
.w_h(100.0 * 2.0, 11.0 * 2.0)
|
||||
.top_right_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||
.set(self.ids.mmap_frame, ui_widgets);
|
||||
};
|
||||
|
||||
if Button::image(if self.mmap_open {self.imgs.mmap_open} else {self.imgs.mmap_closed})
|
||||
.w_h(100.0 * 0.2, 100.0 * 0.2)
|
||||
.hover_image(if self.mmap_open {self.imgs.mmap_open_hover} else {self.imgs.mmap_closed_hover})
|
||||
.press_image(if self.mmap_open {self.imgs.mmap_open_press} else {self.imgs.mmap_closed_press})
|
||||
.top_right_with_margins_on(self.ids.mmap_frame, 0.0, 0.0)
|
||||
.set(self.ids.mmap_button, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
self.mmap_open = !self.mmap_open;
|
||||
};
|
||||
.set(self.ids.mmap_frame, ui_widgets);
|
||||
};
|
||||
|
||||
if Button::image(if self.mmap_open {
|
||||
self.imgs.mmap_open
|
||||
} else {
|
||||
self.imgs.mmap_closed
|
||||
})
|
||||
.w_h(100.0 * 0.2, 100.0 * 0.2)
|
||||
.hover_image(if self.mmap_open {
|
||||
self.imgs.mmap_open_hover
|
||||
} else {
|
||||
self.imgs.mmap_closed_hover
|
||||
})
|
||||
.press_image(if self.mmap_open {
|
||||
self.imgs.mmap_open_press
|
||||
} else {
|
||||
self.imgs.mmap_closed_press
|
||||
})
|
||||
.top_right_with_margins_on(self.ids.mmap_frame, 0.0, 0.0)
|
||||
.set(self.ids.mmap_button, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
self.mmap_open = !self.mmap_open;
|
||||
};
|
||||
|
||||
// Title
|
||||
// Make it display the actual location
|
||||
@ -1049,23 +1059,23 @@ impl Hud {
|
||||
// 0 Settings
|
||||
|
||||
if let Windows::Settings = self.open_windows {
|
||||
// Frame Alignment
|
||||
// Frame Alignment
|
||||
Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT)
|
||||
.middle_of(ui_widgets.window)
|
||||
.middle_of(ui_widgets.window)
|
||||
.set(self.ids.settings_bg, ui_widgets);
|
||||
// Frame
|
||||
Image::new(self.imgs.settings_frame_l)
|
||||
.top_left_with_margins_on(self.ids.settings_bg, 0.0, 0.0)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.settings_l, ui_widgets);
|
||||
Image::new(self.imgs.settings_frame_r)
|
||||
Image::new(self.imgs.settings_frame_r)
|
||||
.right_from(self.ids.settings_l, 0.0)
|
||||
.parent(self.ids.settings_bg)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.settings_r, ui_widgets);
|
||||
// Content Alignment
|
||||
Rectangle::fill_with([198.0*4.0, 97.0*4.0], color::TRANSPARENT)
|
||||
.top_right_with_margins_on(self.ids.settings_r, 21.0*4.0, 4.0*4.0)
|
||||
Rectangle::fill_with([198.0 * 4.0, 97.0 * 4.0], color::TRANSPARENT)
|
||||
.top_right_with_margins_on(self.ids.settings_r, 21.0 * 4.0, 4.0 * 4.0)
|
||||
.scroll_kids()
|
||||
.scroll_kids_vertically()
|
||||
.set(self.ids.settings_content, ui_widgets);
|
||||
@ -1090,10 +1100,10 @@ impl Hud {
|
||||
.set(self.ids.settings_title, ui_widgets);
|
||||
// Icon
|
||||
//Image::new(self.imgs.settings_icon)
|
||||
//.w_h(224.0 / 3.0, 224.0 / 3.0)
|
||||
//.top_left_with_margins_on(self.ids.settings_bg, -10.0, -10.0)
|
||||
//.set(self.ids.settings_icon, ui_widgets);
|
||||
// TODO: Find out if we can remove this
|
||||
//.w_h(224.0 / 3.0, 224.0 / 3.0)
|
||||
//.top_left_with_margins_on(self.ids.settings_bg, -10.0, -10.0)
|
||||
//.set(self.ids.settings_icon, ui_widgets);
|
||||
// TODO: Find out if we can remove this
|
||||
|
||||
// 1 Interface////////////////////////////
|
||||
if Button::image(if let SettingsTab::Interface = self.settings_tab {
|
||||
@ -1101,7 +1111,7 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Interface = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1112,7 +1122,7 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
.top_left_with_margins_on(self.ids.settings_l, 8.0*4.0, 2.0*4.0)
|
||||
.top_left_with_margins_on(self.ids.settings_l, 8.0 * 4.0, 2.0 * 4.0)
|
||||
.label("Interface")
|
||||
.label_font_size(14)
|
||||
.label_color(TEXT_COLOR)
|
||||
@ -1175,12 +1185,12 @@ impl Hud {
|
||||
}
|
||||
|
||||
// 2 Gameplay////////////////
|
||||
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
if Button::image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Gameplay = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1207,7 +1217,7 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Controls = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1229,12 +1239,12 @@ impl Hud {
|
||||
}
|
||||
|
||||
// 4 Video////////////////////////////////
|
||||
if Button::image(if let SettingsTab::Video = self.settings_tab {
|
||||
if Button::image(if let SettingsTab::Video = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Video = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1244,7 +1254,7 @@ impl Hud {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
self.imgs.settings_button_press
|
||||
})
|
||||
})
|
||||
.right_from(self.ids.controls, 0.0)
|
||||
.label("Video")
|
||||
.parent(self.ids.settings_r)
|
||||
@ -1262,7 +1272,7 @@ impl Hud {
|
||||
} else {
|
||||
self.imgs.settings_button
|
||||
})
|
||||
.w_h(31.0*4.0, 12.0*4.0)
|
||||
.w_h(31.0 * 4.0, 12.0 * 4.0)
|
||||
.hover_image(if let SettingsTab::Sound = self.settings_tab {
|
||||
self.imgs.settings_button_pressed
|
||||
} else {
|
||||
@ -1566,7 +1576,7 @@ impl Hud {
|
||||
|
||||
// 2 Map
|
||||
if self.map_open {
|
||||
// BG
|
||||
// BG
|
||||
Rectangle::fill_with([824.0, 976.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(ui_widgets.window, 15.0)
|
||||
.scroll_kids()
|
||||
@ -1588,8 +1598,7 @@ impl Hud {
|
||||
Image::new(self.imgs.map_frame_bl)
|
||||
.down_from(self.ids.map_frame_l, 0.0)
|
||||
.w_h(412.0, 488.0)
|
||||
.set(self.ids.map_frame_bl, ui_widgets);
|
||||
|
||||
.set(self.ids.map_frame_bl, ui_widgets);
|
||||
|
||||
// Icon
|
||||
Image::new(self.imgs.map_icon)
|
||||
@ -1610,10 +1619,10 @@ impl Hud {
|
||||
}
|
||||
// Title
|
||||
//Text::new("Map")
|
||||
//.mid_top_with_margin_on(self.ids.map_bg, -7.0)
|
||||
//.font_size(14)
|
||||
//.color(TEXT_COLOR)
|
||||
//.set(self.ids.map_title, ui_widgets);
|
||||
//.mid_top_with_margin_on(self.ids.map_bg, -7.0)
|
||||
//.font_size(14)
|
||||
//.color(TEXT_COLOR)
|
||||
//.set(self.ids.map_title, ui_widgets);
|
||||
}
|
||||
|
||||
// ESC-MENU
|
||||
|
@ -116,7 +116,7 @@ impl FigureCache {
|
||||
match head {
|
||||
Head::DefaultHead => "head.vox",
|
||||
},
|
||||
Vec3::new(-5.5, -7.0, -6.0),
|
||||
Vec3::new(-7.5, -8.0, 0.0),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user