Former-commit-id: 9c50e08fc7c4e8afa06f1f995ea1aebd386764c2
This commit is contained in:
Pfauenauge 2019-05-02 14:44:51 +02:00
parent c312a8cece
commit c188affb4e
3 changed files with 83 additions and 1906 deletions

View File

@ -102,6 +102,8 @@ widget_ids! {
settings_title, settings_title,
settings_r, settings_r,
settings_l, settings_l,
settings_scrollbar,
controls_text,
//Contents //Contents
button_help, button_help,
button_help2, button_help2,
@ -549,12 +551,12 @@ impl Hud {
ids, ids,
chat, chat,
settings_tab: SettingsTab::Interface, settings_tab: SettingsTab::Interface,
show_help: true, show_help: false,
show_debug: false, show_debug: true,
bag_open: false, bag_open: false,
menu_open: false, menu_open: false,
map_open: false, map_open: false,
mmap_open: true, mmap_open: false,
show_ui: true, show_ui: true,
inventorytest_button: false, inventorytest_button: false,
inventory_space: 0, inventory_space: 0,
@ -996,10 +998,10 @@ impl Hud {
// X-button // X-button
if Button::image(self.imgs.close_button) if Button::image(self.imgs.close_button)
.w_h(4.0 * 4.0, 4.0 * 4.0) .w_h(28.0, 28.0)
.hover_image(self.imgs.close_button_hover) .hover_image(self.imgs.close_button_hover)
.press_image(self.imgs.close_button_press) .press_image(self.imgs.close_button_press)
.top_right_with_margins_on(self.ids.bag_contents, 4.5, 4.5) .top_right_with_margins_on(self.ids.bag_contents, 0.0, 0.0)
.set(self.ids.bag_close, ui_widgets) .set(self.ids.bag_close, ui_widgets)
.was_clicked() .was_clicked()
{ {
@ -1069,6 +1071,10 @@ impl Hud {
.scroll_kids() .scroll_kids()
.scroll_kids_vertically() .scroll_kids_vertically()
.set(self.ids.settings_content, ui_widgets); .set(self.ids.settings_content, ui_widgets);
Scrollbar::y_axis(self.ids.settings_content)
.thickness(5.0)
.rgba(0.33, 0.33, 0.33, 1.0)
.set(self.ids.settings_scrollbar, ui_widgets);
// X-Button // X-Button
if Button::image(self.imgs.close_button) if Button::image(self.imgs.close_button)
.w_h(28.0, 28.0) .w_h(28.0, 28.0)
@ -1227,7 +1233,75 @@ impl Hud {
{ {
self.settings_tab = SettingsTab::Controls; self.settings_tab = SettingsTab::Controls;
} }
if let SettingsTab::Controls = self.settings_tab {
Text::new(
"Free Cursor: TAB \n\
Toggle Help Window: F1 \n\
Toggle Interface: F2 \n\
Toggle FPS and Debug Info: F3 \n\
\n\
\n\
Move Forward: W \n\
Move Left : A \n\
Move Right: S \n\
Move Backwards: D \n\
\n\
Jump: Space \n\
\n\
Dodge: ?? \n\
\n\
Auto Walk: ?? \n\
\n\
Sheathe/Draw Weapons: Y \n\
\n\
Put on/Remove Helmet: ?? [Has a Cast time of 0,5s] \n\
\n\
\n\
Basic Attack: L-Click \n\
Secondary Attack/Block/Aim: R-Click \n\
\n\
\n\
Skillbar Slot 1: 1 \n\
Skillbar Slot 2: 2 \n\
Skillbar Slot 3: 3 \n\
Skillbar Slot 4: 4 \n\
Skillbar Slot 5: 5 \n\
Skillbar Slot 6: 6 \n\
Skillbar Slot 7: 7 \n\
Skillbar Slot 8: 8 \n\
Skillbar Slot 9: 9 \n\
Skillbar Slot 10: 0 \n\
\n\
\n\
Pause Menu: ESC \n\
Settings: N \n\
Social: O \n\
Map: M \n\
Spellbook: P \n\
Character: C \n\
Questlog L \n\
Bag: B \n\
\n\
\n\
\n\
Activate Chat & Input/Send Message: Enter \n\
Scroll Chat: Mousewheel on Chat-Window \n\
\n\
\n\
Chat commands: \n\
\n\
/alias [Name] - Change your Chat Name \n\
/tp [Name] - Teleports you to another player
")
.color(TEXT_COLOR)
.top_left_with_margins_on(self.ids.settings_content, 5.0, 5.0)
.font_id(self.font_opensans)
.font_size(18)
.set(self.ids.controls_text, ui_widgets);
}
// 4 Video//////////////////////////////// // 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 self.imgs.settings_button_pressed
@ -1658,7 +1732,9 @@ impl Hud {
.set(self.ids.menu_button_2, ui_widgets) .set(self.ids.menu_button_2, ui_widgets)
.was_clicked() .was_clicked()
{ {
//self.menu_open = false; self.menu_open = false;
self.settings_tab = SettingsTab::Controls;
self.open_windows = Windows::Settings;
}; };
// Servers // Servers
if Button::image(self.imgs.button_dark) if Button::image(self.imgs.button_dark)

File diff suppressed because it is too large Load Diff

View File

@ -116,7 +116,7 @@ impl FigureCache {
match head { match head {
Head::DefaultHead => "head.vox", Head::DefaultHead => "head.vox",
}, },
Vec3::new(-5.5, -7.0, -6.0), Vec3::new(-7.5, -8.0, 0.0),
) )
} }