mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Controls Window
Former-commit-id: e6e83aaa0eb5606b59581c3005b30e969123bb56
This commit is contained in:
parent
f1c9d619db
commit
0dbe9c7846
@ -157,10 +157,10 @@ impl Chat {
|
|||||||
// Chat Arrow
|
// Chat Arrow
|
||||||
if !self.scrolled_to_bottom(ui_widgets) {
|
if !self.scrolled_to_bottom(ui_widgets) {
|
||||||
if Button::image(imgs.chat_arrow)
|
if Button::image(imgs.chat_arrow)
|
||||||
.w_h(22.0, 22.0)
|
.w_h(20.0, 20.0)
|
||||||
.hover_image(imgs.chat_arrow_mo)
|
.hover_image(imgs.chat_arrow_mo)
|
||||||
.press_image(imgs.chat_arrow_press)
|
.press_image(imgs.chat_arrow_press)
|
||||||
.bottom_right_with_margins_on(self.ids.message_box_bg, 2.0, 2.0)
|
.bottom_right_with_margins_on(self.ids.message_box_bg, 0.0, -22.0)
|
||||||
.set(self.ids.chat_arrow, ui_widgets)
|
.set(self.ids.chat_arrow, ui_widgets)
|
||||||
.was_clicked()
|
.was_clicked()
|
||||||
{
|
{
|
||||||
|
@ -104,6 +104,7 @@ widget_ids! {
|
|||||||
settings_l,
|
settings_l,
|
||||||
settings_scrollbar,
|
settings_scrollbar,
|
||||||
controls_text,
|
controls_text,
|
||||||
|
controls_controls,
|
||||||
//Contents
|
//Contents
|
||||||
button_help,
|
button_help,
|
||||||
button_help2,
|
button_help2,
|
||||||
@ -411,13 +412,13 @@ impl Imgs {
|
|||||||
settings_bg: load_img("element/frames/settings.png", ui),
|
settings_bg: load_img("element/frames/settings.png", ui),
|
||||||
settings_icon: load_img("element/icons/settings.png", ui),
|
settings_icon: load_img("element/icons/settings.png", ui),
|
||||||
settings_button_mo: load_img("element/buttons/blue_mo.png", ui),
|
settings_button_mo: load_img("element/buttons/blue_mo.png", ui),
|
||||||
check: load_img("element/buttons/check/no.png", ui),
|
check: load_vox("element/buttons/check/no.vox", ui),
|
||||||
check_mo: load_img("element/buttons/check/no_mo.png", ui),
|
check_mo: load_vox("element/buttons/check/no_mo.vox", ui),
|
||||||
check_press: load_img("element/buttons/check/press.png", ui),
|
check_press: load_vox("element/buttons/check/press.vox", ui),
|
||||||
check_checked: load_img("element/buttons/check/yes.png", ui),
|
check_checked: load_vox("element/buttons/check/yes.vox", ui),
|
||||||
check_checked_mo: load_img("element/buttons/check/yes_mo.png", ui),
|
check_checked_mo: load_vox("element/buttons/check/yes_mo.vox", ui),
|
||||||
slider: load_img("element/slider/track.png", ui),
|
slider: load_vox("element/slider/track.vox", ui),
|
||||||
slider_indicator: load_img("element/slider/indicator.png", ui),
|
slider_indicator: load_vox("element/slider/indicator.vox", ui),
|
||||||
button_blank: ui.new_graphic(ui::Graphic::Blank),
|
button_blank: ui.new_graphic(ui::Graphic::Blank),
|
||||||
button_blue_mo: load_img("element/buttons/blue_mo.png", ui),
|
button_blue_mo: load_img("element/buttons/blue_mo.png", ui),
|
||||||
button_blue_press: load_img("element/buttons/blue_press.png", ui),
|
button_blue_press: load_img("element/buttons/blue_press.png", ui),
|
||||||
@ -455,9 +456,9 @@ impl Imgs {
|
|||||||
questlog_icon: load_img("element/icons/questlog.png", ui),
|
questlog_icon: load_img("element/icons/questlog.png", ui),
|
||||||
|
|
||||||
// Chat-Arrows
|
// Chat-Arrows
|
||||||
chat_arrow: load_img("element/buttons/arrow/chat_arrow.png", ui),
|
chat_arrow: load_vox("element/buttons/arrow_down.vox", ui),
|
||||||
chat_arrow_mo: load_img("element/buttons/arrow/chat_arrow_mo.png", ui),
|
chat_arrow_mo: load_vox("element/buttons/arrow_down_hover.vox", ui),
|
||||||
chat_arrow_press: load_img("element/buttons/arrow/chat_arrow_press.png", ui),
|
chat_arrow_press: load_vox("element/buttons/arrow_down_press.vox", ui),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1083,7 +1084,7 @@ impl Hud {
|
|||||||
.set(self.ids.settings_content, ui_widgets);
|
.set(self.ids.settings_content, ui_widgets);
|
||||||
Scrollbar::y_axis(self.ids.settings_content)
|
Scrollbar::y_axis(self.ids.settings_content)
|
||||||
.thickness(5.0)
|
.thickness(5.0)
|
||||||
.rgba(0.33, 0.33, 0.33, 1.0)
|
.rgba(0.33, 0.33, 0.33, 1.0)
|
||||||
.set(self.ids.settings_scrollbar, ui_widgets);
|
.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)
|
||||||
@ -1244,73 +1245,137 @@ impl Hud {
|
|||||||
self.settings_tab = SettingsTab::Controls;
|
self.settings_tab = SettingsTab::Controls;
|
||||||
}
|
}
|
||||||
if let SettingsTab::Controls = self.settings_tab {
|
if let SettingsTab::Controls = self.settings_tab {
|
||||||
|
Text::new(
|
||||||
Text::new(
|
"Free Cursor\n\
|
||||||
"Free Cursor: TAB \n\
|
Toggle Help Window\n\
|
||||||
Toggle Help Window: F1 \n\
|
Toggle Interface\n\
|
||||||
Toggle Interface: F2 \n\
|
Toggle FPS and Debug Info\n\
|
||||||
Toggle FPS and Debug Info: F3 \n\
|
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Move Forward: W \n\
|
Move Forward\n\
|
||||||
Move Left : A \n\
|
Move Left\n\
|
||||||
Move Right: S \n\
|
Move Right\n\
|
||||||
Move Backwards: D \n\
|
Move Backwards\n\
|
||||||
\n\
|
\n\
|
||||||
Jump: Space \n\
|
Jump\n\
|
||||||
\n\
|
\n\
|
||||||
Dodge: ?? \n\
|
Dodge\n\
|
||||||
\n\
|
\n\
|
||||||
Auto Walk: ?? \n\
|
Auto Walk\n\
|
||||||
\n\
|
\n\
|
||||||
Sheathe/Draw Weapons: Y \n\
|
Sheathe/Draw Weapons\n\
|
||||||
\n\
|
\n\
|
||||||
Put on/Remove Helmet: ?? [Has a Cast time of 0,5s] \n\
|
Put on/Remove Helmet\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Basic Attack: L-Click \n\
|
Basic Attack\n\
|
||||||
Secondary Attack/Block/Aim: R-Click \n\
|
Secondary Attack/Block/Aim\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Skillbar Slot 1: 1 \n\
|
Skillbar Slot 1\n\
|
||||||
Skillbar Slot 2: 2 \n\
|
Skillbar Slot 2\n\
|
||||||
Skillbar Slot 3: 3 \n\
|
Skillbar Slot 3\n\
|
||||||
Skillbar Slot 4: 4 \n\
|
Skillbar Slot 4\n\
|
||||||
Skillbar Slot 5: 5 \n\
|
Skillbar Slot 5\n\
|
||||||
Skillbar Slot 6: 6 \n\
|
Skillbar Slot 6\n\
|
||||||
Skillbar Slot 7: 7 \n\
|
Skillbar Slot 7\n\
|
||||||
Skillbar Slot 8: 8 \n\
|
Skillbar Slot 8\n\
|
||||||
Skillbar Slot 9: 9 \n\
|
Skillbar Slot 9\n\
|
||||||
Skillbar Slot 10: 0 \n\
|
Skillbar Slot 10\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Pause Menu: ESC \n\
|
Pause Menu\n\
|
||||||
Settings: N \n\
|
Settings\n\
|
||||||
Social: O \n\
|
Social\n\
|
||||||
Map: M \n\
|
Map\n\
|
||||||
Spellbook: P \n\
|
Spellbook\n\
|
||||||
Character: C \n\
|
Character\n\
|
||||||
Questlog L \n\
|
Questlog\n\
|
||||||
Bag: B \n\
|
Bag\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Activate Chat & Input/Send Message: Enter \n\
|
Send Chat Message\n\
|
||||||
Scroll Chat: Mousewheel on Chat-Window \n\
|
Scroll Chat\n\
|
||||||
\n\
|
\n\
|
||||||
\n\
|
\n\
|
||||||
Chat commands: \n\
|
Chat commands: \n\
|
||||||
\n\
|
\n\
|
||||||
/alias [Name] - Change your Chat Name \n\
|
/alias [Name] - Change your Chat Name \n\
|
||||||
/tp [Name] - Teleports you to another player
|
/tp [Name] - Teleports you to another player
|
||||||
")
|
",
|
||||||
.color(TEXT_COLOR)
|
)
|
||||||
.top_left_with_margins_on(self.ids.settings_content, 5.0, 5.0)
|
.color(TEXT_COLOR)
|
||||||
.font_id(self.font_opensans)
|
.top_left_with_margins_on(self.ids.settings_content, 5.0, 5.0)
|
||||||
.font_size(18)
|
.font_id(self.font_opensans)
|
||||||
.set(self.ids.controls_text, ui_widgets);
|
.font_size(18)
|
||||||
|
.set(self.ids.controls_text, ui_widgets);
|
||||||
|
// TODO
|
||||||
|
Text::new(
|
||||||
|
"TAB\n\
|
||||||
|
F1\n\
|
||||||
|
F2\n\
|
||||||
|
F3\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
W\n\
|
||||||
|
A\n\
|
||||||
|
S\n\
|
||||||
|
D\n\
|
||||||
|
\n\
|
||||||
|
SPACE\n\
|
||||||
|
\n\
|
||||||
|
??\n\
|
||||||
|
\n\
|
||||||
|
??\n\
|
||||||
|
\n\
|
||||||
|
??\n\
|
||||||
|
\n\
|
||||||
|
??\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
L-Click\n\
|
||||||
|
R-Click\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
1\n\
|
||||||
|
2\n\
|
||||||
|
3\n\
|
||||||
|
4\n\
|
||||||
|
5\n\
|
||||||
|
6\n\
|
||||||
|
7\n\
|
||||||
|
8\n\
|
||||||
|
9\n\
|
||||||
|
0\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
ESC\n\
|
||||||
|
N\n\
|
||||||
|
O\n\
|
||||||
|
M\n\
|
||||||
|
P\n\
|
||||||
|
C\n\
|
||||||
|
L\n\
|
||||||
|
B\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
ENTER\n\
|
||||||
|
Mousewheel\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
\n\
|
||||||
|
",
|
||||||
|
)
|
||||||
|
.color(TEXT_COLOR)
|
||||||
|
.right_from(self.ids.controls_text, 0.0)
|
||||||
|
.font_id(self.font_opensans)
|
||||||
|
.font_size(18)
|
||||||
|
.set(self.ids.controls_controls, 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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user