mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Skill-Tree UI
switchable tabs rework icons, fix cursor toggle auto slot placing Bow leap skill changed to bow glide skill.
This commit is contained in:
parent
0ccbdc3b8c
commit
3f436079e8
@ -46,7 +46,7 @@
|
||||
Bow(CSpeed): {Bow(CDamage): Some(1)},
|
||||
Bow(CMove): {Bow(CDamage): Some(1)},
|
||||
Bow(RDamage): {Bow(UnlockRepeater): None},
|
||||
Bow(RLeap): {Bow(UnlockRepeater): None},
|
||||
Bow(RGlide): {Bow(UnlockRepeater): None},
|
||||
Bow(RArrows): {Bow(UnlockRepeater): None},
|
||||
Bow(RCost): {Bow(UnlockRepeater): None},
|
||||
Staff(BDamage): {Staff(BExplosion): None},
|
||||
|
@ -70,7 +70,7 @@
|
||||
Bow(CMove),
|
||||
Bow(UnlockRepeater),
|
||||
Bow(RDamage),
|
||||
Bow(RLeap),
|
||||
Bow(RGlide),
|
||||
Bow(RArrows),
|
||||
Bow(RCost),
|
||||
],
|
||||
|
BIN
assets/voxygen/element/buttons/border.png
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/border.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/border_mo.png
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/border_mo.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/border_press.png
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/border_press.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/border_pressed.png
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/border_pressed.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/axe.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/axe.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/bow.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/bow.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/daggers.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/daggers.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/danari_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/danari_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/danari_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/danari_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/dwarf_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/dwarf_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/dwarf_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/dwarf_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/elf_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/elf_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/elf_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/elf_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/hammer.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/hammer.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/human_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/human_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/human_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/human_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/orc_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/orc_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/orc_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/orc_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/sceptre.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/sceptre.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/staff.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/staff.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/sword.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/sword.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/ud_f.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/ud_f.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/ud_m.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/ud_m.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/diary_bg.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/diary_bg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/diary_frame.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/diary_frame.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/sword_render.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/misc_bg/sword_render.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,668 @@
|
||||
/// Translation document instructions
|
||||
///
|
||||
/// In order to keep localization documents readible please follow the following
|
||||
/// rules:
|
||||
/// - separate the string map sections using a commentary describing the purpose
|
||||
/// of the next section
|
||||
/// - prepend multi-line strings with a commentary
|
||||
/// - append one blank lines after a multi-line strings and two after sections
|
||||
///
|
||||
/// To add a new language in Veloren, just write an additional `.ron` file in
|
||||
/// `assets/voxygen/i18n` and that's it!
|
||||
///
|
||||
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
|
||||
|
||||
/// Localization for "global" English
|
||||
(
|
||||
metadata: (
|
||||
language_name: "English",
|
||||
language_identifier: "en",
|
||||
),
|
||||
convert_utf8_to_ascii: false,
|
||||
fonts: {
|
||||
"opensans": Font (
|
||||
asset_key: "voxygen.font.OpenSans-Regular",
|
||||
scale_ratio: 1.0,
|
||||
),
|
||||
"metamorph": Font (
|
||||
asset_key: "voxygen.font.Metamorphous-Regular",
|
||||
scale_ratio: 1.0,
|
||||
),
|
||||
"alkhemi": Font (
|
||||
asset_key: "voxygen.font.Alkhemikal",
|
||||
scale_ratio: 1.0,
|
||||
),
|
||||
"wizard": Font (
|
||||
asset_key: "voxygen.font.wizard",
|
||||
scale_ratio: 1.0,
|
||||
),
|
||||
"cyri": Font (
|
||||
asset_key: "voxygen.font.haxrcorp_4089_cyrillic_altgr_extended",
|
||||
scale_ratio: 1.0,
|
||||
),
|
||||
},
|
||||
string_map: {
|
||||
/// Start Common section
|
||||
// Texts used in multiple locations with the same formatting
|
||||
"common.username": "username",
|
||||
"common.singleplayer": "Singleplayer",
|
||||
"common.multiplayer": "Multiplayer",
|
||||
"common.servers": "Servers",
|
||||
"common.quit": "Quit",
|
||||
"common.settings": "Settings",
|
||||
"common.languages": "Languages",
|
||||
"common.interface": "Interface",
|
||||
"common.gameplay": "Gameplay",
|
||||
"common.controls": "Controls",
|
||||
"common.video": "Graphics",
|
||||
"common.sound": "Sound",
|
||||
"common.languages": "Languages",
|
||||
"common.resume": "Resume",
|
||||
"common.characters": "Characters",
|
||||
"common.close": "Close",
|
||||
"common.yes": "Yes",
|
||||
"common.no": "No",
|
||||
"common.back": "Back",
|
||||
"common.create": "Create",
|
||||
"common.okay": "Okay",
|
||||
"common.add": "Add",
|
||||
"common.accept": "Accept",
|
||||
"common.decline": "Decline",
|
||||
"common.disclaimer": "Disclaimer",
|
||||
"common.cancel": "Cancel",
|
||||
"common.none": "None",
|
||||
"common.error": "Error",
|
||||
"common.fatal_error": "Fatal Error",
|
||||
"common.you": "You",
|
||||
"common.automatic": "Auto",
|
||||
"common.random": "Random",
|
||||
// Settings Window title
|
||||
"common.interface_settings": "Interface Settings",
|
||||
"common.gameplay_settings": "Gameplay Settings",
|
||||
"common.controls_settings": "Controls Settings",
|
||||
"common.video_settings": "Graphics Settings",
|
||||
"common.sound_settings": "Sound Settings",
|
||||
"common.language_settings": "Language Settings",
|
||||
|
||||
// Message when connection to the server is lost
|
||||
"common.connection_lost": r#"Connection lost!
|
||||
Did the server restart?
|
||||
Is the client up to date?"#,
|
||||
|
||||
|
||||
"common.species.orc": "Orc",
|
||||
"common.species.human": "Human",
|
||||
"common.species.dwarf": "Dwarf",
|
||||
"common.species.elf": "Elf",
|
||||
"common.species.undead": "Undead",
|
||||
"common.species.danari": "Danari",
|
||||
|
||||
"common.weapons.axe": "Axe",
|
||||
"common.weapons.sword": "Sword",
|
||||
"common.weapons.staff": "Staff",
|
||||
"common.weapons.bow": "Bow",
|
||||
"common.weapons.hammer": "Hammer",
|
||||
"common.weapons.sceptre": "Healing Sceptre",
|
||||
"common.rand_appearance": "Random appearance and name",
|
||||
/// End Common section
|
||||
|
||||
|
||||
/// Start Main screen section
|
||||
"main.username": "Username",
|
||||
"main.server": "Server",
|
||||
"main.password": "Password",
|
||||
"main.connecting": "Connecting",
|
||||
"main.creating_world": "Creating world",
|
||||
"main.tip": "Tip:",
|
||||
|
||||
// Welcome notice that appears the first time Veloren is started
|
||||
"main.notice": r#"Welcome to the alpha version of Veloren!
|
||||
|
||||
Before you dive into the fun, please keep a few things in mind:
|
||||
|
||||
- This is a very early alpha. Expect bugs, extremely unfinished gameplay, unpolished mechanics, and missing features.
|
||||
|
||||
- If you have constructive feedback or bug reports, you can contact us via Reddit, GitLab, or our community Discord server.
|
||||
|
||||
- Veloren is licensed under the GPL 3 open-source licence. That means you're free to play, modify, and redistribute the game however
|
||||
you wish (provided derived work is also under GPL 3).
|
||||
|
||||
- Veloren is a non-profit community project, and everybody working on it is a volunteer.
|
||||
If you like what you see, you're welcome to join the development or art teams!
|
||||
|
||||
Thanks for taking the time to read this notice, we hope you enjoy the game!
|
||||
|
||||
~ The Veloren Devs"#,
|
||||
|
||||
// Login process description
|
||||
"main.login_process": r#"Information on the Login Process:
|
||||
|
||||
Please note that you now need an account
|
||||
to play on auth-enabled servers.
|
||||
|
||||
You can create an account over at
|
||||
|
||||
https://veloren.net/account/."#,
|
||||
"main.login.server_not_found": "Server not found",
|
||||
"main.login.authentication_error": "Auth error on server",
|
||||
"main.login.server_full": "Server is full",
|
||||
"main.login.untrusted_auth_server": "Auth server not trusted",
|
||||
"main.login.outdated_client_or_server": "ServerWentMad: Probably versions are incompatible, check for updates.",
|
||||
"main.login.timeout": "Timeout: Server did not respond in time. (Overloaded or network issues).",
|
||||
"main.login.server_shut_down": "Server shut down",
|
||||
"main.login.already_logged_in": "You are already logged into the server.",
|
||||
"main.login.network_error": "Network error",
|
||||
"main.login.failed_sending_request": "Request to Auth server failed",
|
||||
"main.login.invalid_character": "The selected character is invalid",
|
||||
"main.login.client_crashed": "Client crashed",
|
||||
"main.login.not_on_whitelist": "You need a Whitelist entry by an Admin to join",
|
||||
"main.login.banned": "You have been banned with the following reason",
|
||||
"main.login.kicked": "You have been kicked with the following reason",
|
||||
"main.login.select_language": "Select a language",
|
||||
|
||||
"main.servers.select_server": "Select a server",
|
||||
|
||||
/// End Main screen section
|
||||
|
||||
|
||||
/// Start HUD Section
|
||||
"hud.do_not_show_on_startup": "Don't show this on Startup",
|
||||
"hud.show_tips": "Show Tips",
|
||||
"hud.quests": "Quests",
|
||||
"hud.you_died": "You Died",
|
||||
"hud.waypoint_saved": "Waypoint Saved",
|
||||
|
||||
"hud.press_key_to_show_keybindings_fmt": "[{key}] Keybindings",
|
||||
"hud.press_key_to_toggle_lantern_fmt": "[{key}] Lantern",
|
||||
"hud.press_key_to_show_debug_info_fmt": "Press {key} to show debug info",
|
||||
"hud.press_key_to_toggle_keybindings_fmt": "Press {key} to toggle keybindings",
|
||||
"hud.press_key_to_toggle_debug_info_fmt": "Press {key} to toggle debug info",
|
||||
|
||||
// Chat outputs
|
||||
"hud.chat.online_msg": "[{name}] is online now",
|
||||
"hud.chat.offline_msg": "{name} went offline",
|
||||
|
||||
"hud.chat.default_death_msg": "[{name}] died",
|
||||
"hud.chat.environmental_kill_msg": "[{name}] died in {environment}",
|
||||
"hud.chat.fall_kill_msg": "[{name}] died from fall damage",
|
||||
"hud.chat.suicide_msg": "[{name}] died from self-inflicted wounds",
|
||||
|
||||
"hud.chat.pvp_melee_kill_msg": "[{attacker}] defeated [{victim}]",
|
||||
"hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]",
|
||||
"hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]",
|
||||
"hud.chat.pvp_energy_kill_msg": "[{attacker}] killed [{victim}] with magic",
|
||||
"hud.chat.pvp_buff_kill_msg": "[{attacker}] killed [{victim}]",
|
||||
|
||||
|
||||
"hud.chat.npc_melee_kill_msg": "{attacker} killed [{victim}]",
|
||||
"hud.chat.npc_ranged_kill_msg": "{attacker} shot [{victim}]",
|
||||
"hud.chat.npc_explosion_kill_msg": "{attacker} blew up [{victim}]",
|
||||
"hud.chat.npc_energy_kill_msg": "[{attacker}] killed [{victim}] with magic",
|
||||
"hud.chat.npc_other_kill_msg": "[{attacker}] killed [{victim}]",
|
||||
|
||||
"hud.chat.loot_msg": "You picked up [{item}]",
|
||||
"hud.chat.loot_fail": "Your Inventory is full!",
|
||||
"hud.chat.goodbye": "Goodbye!",
|
||||
"hud.chat.connection_lost": "Connection lost. Kicking in {time} seconds.",
|
||||
|
||||
// SCT outputs
|
||||
"hud.sct.experience": "{amount} Exp",
|
||||
"hud.sct.block": "BLOCKED",
|
||||
|
||||
// Respawn message
|
||||
"hud.press_key_to_respawn": r#"Press {key} to respawn at the last campfire you visited."#,
|
||||
|
||||
// Welcome message
|
||||
"hud.welcome": r#"Welcome to the Veloren Alpha!
|
||||
|
||||
|
||||
Some tips before you start:
|
||||
|
||||
|
||||
Press F1 to see the available key commands.
|
||||
|
||||
Type /help into the chat to see chat commands
|
||||
|
||||
|
||||
There are chests and other objects randomly spawning in the World!
|
||||
|
||||
Right-Click to collect them.
|
||||
|
||||
To actually use whatever you loot from those chests open your inventory with 'B'.
|
||||
|
||||
Double click the items in your bag to use or equip them.
|
||||
|
||||
Throw them away by clicking them once and clicking outside of the bag
|
||||
|
||||
|
||||
Nights can get pretty dark in Veloren.
|
||||
|
||||
Light your lantern by pressing 'G'
|
||||
|
||||
|
||||
Want to free your cursor to close this window? Press TAB!
|
||||
|
||||
|
||||
Enjoy your stay in the World of Veloren."#,
|
||||
|
||||
"hud.temp_quest_headline": r#"Please, help us Traveller!"#,
|
||||
"hud.temp_quest_text": r#"Dungeons filled with evil cultists
|
||||
have emerged all around our peaceful towns!
|
||||
|
||||
|
||||
Gather some company, stack up on food
|
||||
and defeat their vile leaders and acolytes.
|
||||
|
||||
|
||||
Maybe you can even obtain one of their
|
||||
magically infused items?"#,
|
||||
|
||||
|
||||
|
||||
// Inventory
|
||||
"hud.bag.inventory": "{playername}'s Inventory",
|
||||
"hud.bag.stats_title": "{playername}'s Stats",
|
||||
"hud.bag.exp": "Exp",
|
||||
"hud.bag.armor": "Armor",
|
||||
"hud.bag.stats": "Stats",
|
||||
"hud.bag.head": "Head",
|
||||
"hud.bag.neck": "Neck",
|
||||
"hud.bag.tabard": "Tabard",
|
||||
"hud.bag.shoulders": "Shoulders",
|
||||
"hud.bag.chest": "Chest",
|
||||
"hud.bag.hands": "Hands",
|
||||
"hud.bag.lantern": "Lantern",
|
||||
"hud.bag.glider": "Glider",
|
||||
"hud.bag.belt": "Belt",
|
||||
"hud.bag.ring": "Ring",
|
||||
"hud.bag.back": "Back",
|
||||
"hud.bag.legs": "Legs",
|
||||
"hud.bag.feet": "Feet",
|
||||
"hud.bag.mainhand": "Mainhand",
|
||||
"hud.bag.offhand": "Offhand",
|
||||
|
||||
// Diary
|
||||
"hud.diary": "Diary",
|
||||
|
||||
|
||||
// Map and Questlog
|
||||
"hud.map.map_title": "Map",
|
||||
"hud.map.qlog_title": "Quests",
|
||||
|
||||
// Settings
|
||||
"hud.settings.general": "General",
|
||||
"hud.settings.none": "None",
|
||||
"hud.settings.press_behavior.toggle": "Toggle",
|
||||
"hud.settings.press_behavior.hold": "Hold",
|
||||
"hud.settings.help_window": "Help Window",
|
||||
"hud.settings.debug_info": "Debug Info",
|
||||
"hud.settings.tips_on_startup": "Tips-On-Startup",
|
||||
"hud.settings.ui_scale": "UI-Scale",
|
||||
"hud.settings.relative_scaling": "Relative Scaling",
|
||||
"hud.settings.custom_scaling": "Custom Scaling",
|
||||
"hud.settings.crosshair": "Crosshair",
|
||||
"hud.settings.transparency": "Transparency",
|
||||
"hud.settings.hotbar": "Hotbar",
|
||||
"hud.settings.toggle_shortcuts": "Toggle Shortcuts",
|
||||
"hud.settings.buffs_skillbar": "Buffs at Skillbar",
|
||||
"hud.settings.buffs_mmap": "Buffs at Minimap",
|
||||
"hud.settings.toggle_bar_experience": "Toggle Experience Bar",
|
||||
"hud.settings.scrolling_combat_text": "Scrolling Combat Text",
|
||||
"hud.settings.single_damage_number": "Single Damage Numbers",
|
||||
"hud.settings.cumulated_damage": "Cumulated Damage",
|
||||
"hud.settings.incoming_damage": "Incoming Damage",
|
||||
"hud.settings.cumulated_incoming_damage": "Cumulated Incoming Damage",
|
||||
"hud.settings.speech_bubble": "Speech Bubble",
|
||||
"hud.settings.speech_bubble_dark_mode": "Speech Bubble Dark Mode",
|
||||
"hud.settings.speech_bubble_icon": "Speech Bubble Icon",
|
||||
"hud.settings.energybar_numbers": "Energybar Numbers",
|
||||
"hud.settings.values": "Values",
|
||||
"hud.settings.percentages": "Percentages",
|
||||
"hud.settings.chat": "Chat",
|
||||
"hud.settings.background_transparency": "Background Transparency",
|
||||
"hud.settings.chat_character_name": "Character Names in chat",
|
||||
"hud.settings.loading_tips": "Loading Screen Tips",
|
||||
|
||||
"hud.settings.pan_sensitivity": "Pan Sensitivity",
|
||||
"hud.settings.zoom_sensitivity": "Zoom Sensitivity",
|
||||
"hud.settings.invert_scroll_zoom": "Invert Scroll Zoom",
|
||||
"hud.settings.invert_mouse_y_axis": "Invert Mouse Y Axis",
|
||||
"hud.settings.enable_mouse_smoothing": "Camera Smoothing",
|
||||
"hud.settings.free_look_behavior": "Free look behavior",
|
||||
"hud.settings.auto_walk_behavior": "Auto walk behavior",
|
||||
"hud.settings.stop_auto_walk_on_input": "Stop auto walk on movement",
|
||||
|
||||
"hud.settings.view_distance": "View Distance",
|
||||
"hud.settings.sprites_view_distance": "Sprites View Distance",
|
||||
"hud.settings.figures_view_distance": "Entities View Distance",
|
||||
"hud.settings.maximum_fps": "Maximum FPS",
|
||||
"hud.settings.fov": "Field of View (deg)",
|
||||
"hud.settings.gamma": "Gamma",
|
||||
"hud.settings.exposure": "Exposure",
|
||||
"hud.settings.ambiance": "Ambiance Brightness",
|
||||
"hud.settings.antialiasing_mode": "AntiAliasing Mode",
|
||||
"hud.settings.upscale_factor": "Upscale Factor",
|
||||
"hud.settings.cloud_rendering_mode": "Cloud Rendering Mode",
|
||||
"hud.settings.fluid_rendering_mode": "Fluid Rendering Mode",
|
||||
"hud.settings.fluid_rendering_mode.cheap": "Cheap",
|
||||
"hud.settings.fluid_rendering_mode.shiny": "Shiny",
|
||||
"hud.settings.cloud_rendering_mode.minimal": "Minimal",
|
||||
"hud.settings.cloud_rendering_mode.low": "Low",
|
||||
"hud.settings.cloud_rendering_mode.medium": "Medium",
|
||||
"hud.settings.cloud_rendering_mode.high": "High",
|
||||
"hud.settings.cloud_rendering_mode.ultra": "Ultra",
|
||||
"hud.settings.fullscreen": "Fullscreen",
|
||||
"hud.settings.fullscreen_mode": "Fullscreen Mode",
|
||||
"hud.settings.fullscreen_mode.exclusive": "Exclusive",
|
||||
"hud.settings.fullscreen_mode.borderless": "Borderless",
|
||||
"hud.settings.particles": "Particles",
|
||||
"hud.settings.resolution": "Resolution",
|
||||
"hud.settings.bit_depth": "Bit Depth",
|
||||
"hud.settings.refresh_rate": "Refresh Rate",
|
||||
"hud.settings.save_window_size": "Save window size",
|
||||
"hud.settings.lighting_rendering_mode": "Lighting Rendering Mode",
|
||||
"hud.settings.lighting_rendering_mode.ashikhmin": "Type A - High ",
|
||||
"hud.settings.lighting_rendering_mode.blinnphong": "Type B - Medium",
|
||||
"hud.settings.lighting_rendering_mode.lambertian": "Type L - Cheap",
|
||||
"hud.settings.shadow_rendering_mode": "Shadow Rendering Mode",
|
||||
"hud.settings.shadow_rendering_mode.none": "None",
|
||||
"hud.settings.shadow_rendering_mode.cheap": "Cheap",
|
||||
"hud.settings.shadow_rendering_mode.map": "Map",
|
||||
"hud.settings.shadow_rendering_mode.map.resolution": "Resolution",
|
||||
"hud.settings.lod_detail": "LoD Detail",
|
||||
"hud.settings.save_window_size": "Save window size",
|
||||
|
||||
|
||||
"hud.settings.music_volume": "Music Volume",
|
||||
"hud.settings.sound_effect_volume": "Sound Effects Volume",
|
||||
"hud.settings.audio_device": "Audio Device",
|
||||
|
||||
"hud.settings.awaitingkey": "Press a key...",
|
||||
"hud.settings.unbound": "None",
|
||||
"hud.settings.reset_keybinds": "Reset to Defaults",
|
||||
|
||||
"hud.social": "Other Players",
|
||||
"hud.social.online": "Online:",
|
||||
"hud.social.friends": "Friends",
|
||||
"hud.social.not_yet_available": "Not yet available",
|
||||
"hud.social.faction": "Faction",
|
||||
"hud.social.play_online_fmt": "{nb_player} player(s) online",
|
||||
"hud.social.name": "Name",
|
||||
"hud.social.level": "Level",
|
||||
"hud.social.zone": "Zone",
|
||||
"hud.social.account": "Account",
|
||||
|
||||
|
||||
"hud.crafting": "Crafting",
|
||||
"hud.crafting.recipes": "Recipes",
|
||||
"hud.crafting.ingredients": "Ingredients:",
|
||||
"hud.crafting.craft": "Craft",
|
||||
"hud.crafting.tool_cata": "Requires:",
|
||||
|
||||
"hud.group": "Group",
|
||||
"hud.group.invite_to_join": "{name} invited you to their group!",
|
||||
"hud.group.invite": "Invite",
|
||||
"hud.group.kick": "Kick",
|
||||
"hud.group.assign_leader": "Assign Leader",
|
||||
"hud.group.leave": "Leave Group",
|
||||
"hud.group.dead" : "Dead",
|
||||
"hud.group.out_of_range": "Out of range",
|
||||
"hud.group.add_friend": "Add to Friends",
|
||||
"hud.group.link_group": "Link Groups",
|
||||
"hud.group.in_menu": "In Menu",
|
||||
"hud.group.members": "Group Members",
|
||||
|
||||
"hud.spell": "Spells",
|
||||
|
||||
"hud.free_look_indicator": "Free look active. Press {key} to disable.",
|
||||
"hud.auto_walk_indicator": "Auto walk active",
|
||||
|
||||
"hud.map.difficulty": "Difficulty",
|
||||
"hud.map.towns": "Towns",
|
||||
"hud.map.castles": "Castles",
|
||||
"hud.map.dungeons": "Dungeons",
|
||||
"hud.map.caves": "Caves",
|
||||
"hud.map.cave": "Cave",
|
||||
"hud.map.town": "Town",
|
||||
"hud.map.castle": "Castle",
|
||||
"hud.map.dungeon": "Dungeon",
|
||||
"hud.map.difficulty_dungeon": "Dungeon\n\nDifficulty: {difficulty}",
|
||||
"hud.map.drag": "Drag",
|
||||
"hud.map.zoom": "Zoom",
|
||||
"hud.map.recenter": "Recenter",
|
||||
|
||||
/// End HUD section
|
||||
|
||||
|
||||
/// Start GameInput section
|
||||
|
||||
"gameinput.primary": "Basic Attack",
|
||||
"gameinput.secondary": "Secondary Attack/Block/Aim",
|
||||
"gameinput.slot1": "Hotbar Slot 1",
|
||||
"gameinput.slot2": "Hotbar Slot 2",
|
||||
"gameinput.slot3": "Hotbar Slot 3",
|
||||
"gameinput.slot4": "Hotbar Slot 4",
|
||||
"gameinput.slot5": "Hotbar Slot 5",
|
||||
"gameinput.slot6": "Hotbar Slot 6",
|
||||
"gameinput.slot7": "Hotbar Slot 7",
|
||||
"gameinput.slot8": "Hotbar Slot 8",
|
||||
"gameinput.slot9": "Hotbar Slot 9",
|
||||
"gameinput.slot10": "Hotbar Slot 10",
|
||||
"gameinput.swaploadout": "Swap Loadout",
|
||||
"gameinput.togglecursor": "Toggle Cursor",
|
||||
"gameinput.help": "Toggle Help Window",
|
||||
"gameinput.toggleinterface": "Toggle Interface",
|
||||
"gameinput.toggledebug": "Toggle FPS and Debug Info",
|
||||
"gameinput.screenshot": "Take Screenshot",
|
||||
"gameinput.toggleingameui": "Toggle Nametags",
|
||||
"gameinput.fullscreen": "Toggle Fullscreen",
|
||||
"gameinput.moveforward": "Move Forward",
|
||||
"gameinput.moveleft": "Move Left",
|
||||
"gameinput.moveright": "Move Right",
|
||||
"gameinput.moveback": "Move Backwards",
|
||||
"gameinput.jump": "Jump",
|
||||
"gameinput.glide": "Glider",
|
||||
"gameinput.roll": "Roll",
|
||||
"gameinput.climb": "Climb",
|
||||
"gameinput.climbdown": "Climb Down",
|
||||
"gameinput.wallleap": "Wall Leap",
|
||||
"gameinput.togglelantern": "Toggle Lantern",
|
||||
"gameinput.mount": "Mount",
|
||||
"gameinput.chat": "Chat",
|
||||
"gameinput.command": "Command",
|
||||
"gameinput.escape": "Escape",
|
||||
"gameinput.map": "Map",
|
||||
"gameinput.bag": "Bag",
|
||||
"gameinput.social": "Social",
|
||||
"gameinput.sit": "Sit",
|
||||
"gameinput.spellbook": "Spells",
|
||||
"gameinput.settings": "Settings",
|
||||
"gameinput.respawn": "Respawn",
|
||||
"gameinput.charge": "Charge",
|
||||
"gameinput.togglewield": "Toggle Wield",
|
||||
"gameinput.interact": "Interact",
|
||||
"gameinput.freelook": "Free Look",
|
||||
"gameinput.autowalk": "Auto Walk",
|
||||
"gameinput.dance": "Dance",
|
||||
"gameinput.select": "Select Entity",
|
||||
"gameinput.acceptgroupinvite": "Accept Group Invite",
|
||||
"gameinput.declinegroupinvite": "Decline Group Invite",
|
||||
"gameinput.crafting": "Crafting",
|
||||
"gameinput.fly": "Fly",
|
||||
"gameinput.sneak": "Sneak",
|
||||
"gameinput.swimdown": "Swim downwards",
|
||||
"gameinput.swimup": "Swim upwards",
|
||||
|
||||
/// End GameInput section
|
||||
|
||||
|
||||
/// Start chracter selection section
|
||||
"char_selection.loading_characters": "Loading characters...",
|
||||
"char_selection.delete_permanently": "Permanently delete this Character?",
|
||||
"char_selection.deleting_character": "Deleting Character...",
|
||||
"char_selection.change_server": "Change Server",
|
||||
"char_selection.enter_world": "Enter World",
|
||||
"char_selection.logout": "Logout",
|
||||
"char_selection.create_new_character": "Create New Character",
|
||||
"char_selection.creating_character": "Creating Character...",
|
||||
"char_selection.character_creation": "Character Creation",
|
||||
|
||||
"char_selection.human_default": "Human Default",
|
||||
"char_selection.level_fmt": "Level {level_nb}",
|
||||
"char_selection.uncanny_valley": "Wilderness",
|
||||
"char_selection.plains_of_uncertainty": "Plains of Uncertainty",
|
||||
"char_selection.beard": "Beard",
|
||||
"char_selection.hair_style": "Hair Style",
|
||||
"char_selection.hair_color": "Hair Color",
|
||||
"char_selection.eye_color": "Eye Color",
|
||||
"char_selection.skin": "Skin",
|
||||
"char_selection.eyeshape": "Eye Details",
|
||||
"char_selection.accessories": "Accessories",
|
||||
"char_selection.create_info_name": "Your Character needs a name!",
|
||||
|
||||
/// End character selection section
|
||||
|
||||
|
||||
/// Start character window section
|
||||
"character_window.character_name": "Character Name",
|
||||
// Character stats
|
||||
"character_window.character_stats": r#"Endurance
|
||||
|
||||
Fitness
|
||||
|
||||
Willpower
|
||||
|
||||
Protection
|
||||
"#,
|
||||
/// End character window section
|
||||
|
||||
|
||||
/// Start Escape Menu Section
|
||||
"esc_menu.logout": "Logout",
|
||||
"esc_menu.quit_game": "Quit Game",
|
||||
/// End Escape Menu Section
|
||||
|
||||
/// Buffs and Debuffs
|
||||
"buff.remove": "Click to remove",
|
||||
"buff.title.missing": "Missing Title",
|
||||
"buff.desc.missing": "Missing Description",
|
||||
// Buffs
|
||||
"buff.title.heal": "Heal",
|
||||
"buff.desc.heal": "Gain health over time.",
|
||||
"buff.title.potion": "Potion",
|
||||
"buff.desc.potion": "Drinking...",
|
||||
"buff.title.saturation": "Saturation",
|
||||
"buff.desc.saturation": "Gain health over time from consumables.",
|
||||
"buff.title.campfire_heal": "Campfire Heal",
|
||||
"buff.desc.campfire_heal": "Resting at a campfire heals 1% per second.",
|
||||
// Debuffs
|
||||
"debuff.title.bleed": "Bleeding",
|
||||
"debuff.desc.bleed": "Inflicts regular damage.",
|
||||
},
|
||||
|
||||
|
||||
vector_map: {
|
||||
"loading.tips": [
|
||||
"Press 'G' to light your lantern.",
|
||||
"Press 'F1' to see all default keybindings.",
|
||||
"You can type /say or /s to only chat with players directly around you.",
|
||||
"You can type /region or /r to only chat with players a couple of hundred blocks around you.",
|
||||
"You can type /group or /g to only chat with players in your current group.",
|
||||
"To send private messages type /tell followed by a player name and your message.",
|
||||
"NPCs with the same level can have a different difficulty.",
|
||||
"Keep an eye out for food, chests and other loot spread all around the world!",
|
||||
"Inventory filled with food? Try crafting better food from it!",
|
||||
"Wondering what's there to do? Try out one of the dungeons marked on the map!",
|
||||
"Don't forget to adjust the graphics for your system. Press 'N' to open the settings.",
|
||||
"Playing with others is fun! Press 'O' to see who is online.",
|
||||
"An NPC with a skull beneath their healthbar is quite powerful compared to yourself.",
|
||||
"Press 'J' to dance. Party!",
|
||||
"Press 'L-Shift' to open your Glider and conquer the skies.",
|
||||
"Veloren is still in Pre-Alpha. We do our best to improve it every day!",
|
||||
"If you want to join the Dev-Team or just have a chat with us join our Discord-Server.",
|
||||
"You can toggle showing your amount of health on the healthbar in the settings.",
|
||||
"In order to see your stats click the 'Stats' button in the inventory.",
|
||||
],
|
||||
"npc.speech.villager_under_attack": [
|
||||
"Help, I'm under attack!",
|
||||
"Help! I'm under attack!",
|
||||
"Ouch! I'm under attack!",
|
||||
"Ouch! I'm under attack! Help!",
|
||||
"Help me! I'm under attack!",
|
||||
"I'm under attack! Help!",
|
||||
"I'm under attack! Help me!",
|
||||
"Help!",
|
||||
"Help! Help!",
|
||||
"Help! Help! Help!",
|
||||
"I'm under attack!",
|
||||
"AAAHHH! I'm under attack!",
|
||||
"AAAHHH! I'm under attack! Help!",
|
||||
"Help! We're under attack!",
|
||||
"Help! Murderer!",
|
||||
"Help! There's a murderer on the loose!",
|
||||
"Help! They're trying to kill me!",
|
||||
"Guards, I'm under attack!",
|
||||
"Guards! I'm under attack!",
|
||||
"I'm under attack! Guards!",
|
||||
"Help! Guards! I'm under attack!",
|
||||
"Guards! Come quick!",
|
||||
"Guards! Guards!",
|
||||
"Guards! There's a villain attacking me!",
|
||||
"Guards, slay this foul villain!",
|
||||
"Guards! There's a murderer!",
|
||||
"Guards! Help me!",
|
||||
"You won't get away with this! Guards!",
|
||||
"You fiend!",
|
||||
"Help me!",
|
||||
"Help! Please!",
|
||||
"Ouch! Guards! Help!",
|
||||
"They're coming for me!",
|
||||
"Help! Help! I'm being repressed!",
|
||||
"Ah, now we see the violence inherent in the system.",
|
||||
"Tis but a scratch!",
|
||||
"Stop that!",
|
||||
"What did I ever do to you?!",
|
||||
"Please stop attacking me!",
|
||||
"Hey! Watch where you point that thing!",
|
||||
"Heinous wretch, be gone with you!",
|
||||
"Stop it! Go away!",
|
||||
"Now you're making me mad!",
|
||||
"Oi! Who do you think you are?!",
|
||||
"I'll have your head for that!",
|
||||
"Stop, please! I carry nothing of value!",
|
||||
"I'll set my brother on you, he's bigger than I am!",
|
||||
"Nooo, I'm telling mother!",
|
||||
"Curse you!",
|
||||
"Please don't do that.",
|
||||
"That wasn't very nice!",
|
||||
"Your weapon works, you can put it away now!",
|
||||
"Spare me!",
|
||||
"Please, I have a family!",
|
||||
"I'm too young to die!",
|
||||
"Can we talk about this?",
|
||||
"Violence is never the answer!",
|
||||
"Today is turning out to be a very bad day...",
|
||||
"Hey, that hurt!",
|
||||
"Eek!",
|
||||
"How rude!",
|
||||
"Stop, I beg you!",
|
||||
"A pox upon you!",
|
||||
"This isn't fun.",
|
||||
"How dare you?!",
|
||||
"You'll pay for that!",
|
||||
"Keep that up and you'll be sorry!",
|
||||
"Don't make me hurt you!",
|
||||
"There must be some misunderstanding!",
|
||||
"You don't need to do this!",
|
||||
"Be gone, fiend!",
|
||||
"That really hurt!",
|
||||
"Why would you do that?",
|
||||
"By the spirits, cease!",
|
||||
"You must have me confused with someone else!",
|
||||
"I don't deserve this!",
|
||||
"Please don't do that again.",
|
||||
"Guards, throw this monster in the lake!",
|
||||
"I'll set my tarrasque on you!",
|
||||
],
|
||||
}
|
||||
)
|
@ -1233,8 +1233,8 @@ impl Client {
|
||||
BowSkill::RDamage,
|
||||
)));
|
||||
},
|
||||
"@unlock bow repeater leap" => {
|
||||
self.send_msg(ClientGeneral::UnlockSkill(Skill::Bow(BowSkill::RLeap)));
|
||||
"@unlock bow repeater glide" => {
|
||||
self.send_msg(ClientGeneral::UnlockSkill(Skill::Bow(BowSkill::RGlide)));
|
||||
},
|
||||
"@unlock bow repeater arrows" => {
|
||||
self.send_msg(ClientGeneral::UnlockSkill(Skill::Bow(
|
||||
|
@ -65,10 +65,9 @@ impl Damage {
|
||||
DamageSource::Melee => {
|
||||
// Critical hit
|
||||
let mut critdamage = 0.0;
|
||||
/* Disabled so I can actually test stuff
|
||||
if rand::random() {
|
||||
critdamage = damage * 0.3;
|
||||
}*/
|
||||
}
|
||||
// Armor
|
||||
damage *= 1.0 - damage_reduction;
|
||||
|
||||
@ -87,9 +86,9 @@ impl Damage {
|
||||
},
|
||||
DamageSource::Projectile => {
|
||||
// Critical hit
|
||||
/*if rand::random() {
|
||||
if rand::random() {
|
||||
damage *= 1.2;
|
||||
}*/
|
||||
}
|
||||
// Armor
|
||||
damage *= 1.0 - damage_reduction;
|
||||
|
||||
|
@ -869,7 +869,7 @@ impl CharacterAbility {
|
||||
},
|
||||
RepeaterRanged {
|
||||
ref mut energy_cost,
|
||||
ref mut leap,
|
||||
ref mut buildup_duration,
|
||||
ref mut projectile,
|
||||
ref mut reps_remaining,
|
||||
ref mut projectile_speed,
|
||||
@ -883,8 +883,8 @@ impl CharacterAbility {
|
||||
*projectile =
|
||||
projectile.modified_projectile(power, 1_f32, 1_f32, 1_f32);
|
||||
}
|
||||
if !skills.contains_key(&Bow(RLeap)) {
|
||||
*leap = None;
|
||||
if !skills.contains_key(&Bow(RGlide)) {
|
||||
*buildup_duration = 1;
|
||||
}
|
||||
if let Some(level) = skills.get(&Bow(RArrows)).copied().flatten() {
|
||||
*reps_remaining += level as u32;
|
||||
|
@ -157,7 +157,7 @@ pub enum BowSkill {
|
||||
// Repeater upgrades
|
||||
UnlockRepeater,
|
||||
RDamage,
|
||||
RLeap,
|
||||
RGlide,
|
||||
RArrows,
|
||||
RCost,
|
||||
}
|
||||
|
@ -61,6 +61,23 @@ image_ids! {
|
||||
prompt_bot: "voxygen.element.frames.prompt_dialog_bot",
|
||||
key_button: "voxygen.element.buttons.key_button",
|
||||
key_button_press: "voxygen.element.buttons.key_button_press",
|
||||
|
||||
// Diary Window
|
||||
diary_bg: "voxygen.element.misc_bg.diary_bg",
|
||||
diary_frame: "voxygen.element.misc_bg.diary_frame",
|
||||
sword_render: "voxygen.element.misc_bg.sword_render",
|
||||
|
||||
// Skill Trees
|
||||
sceptre: "voxygen.element.icons.sceptre",
|
||||
sword: "voxygen.element.icons.sword",
|
||||
axe: "voxygen.element.icons.axe",
|
||||
hammer: "voxygen.element.icons.hammer",
|
||||
bow: "voxygen.element.icons.bow",
|
||||
staff: "voxygen.element.icons.staff",
|
||||
wpn_icon_border: "voxygen.element.buttons.border",
|
||||
wpn_icon_border_mo: "voxygen.element.buttons.border_mo",
|
||||
wpn_icon_border_press: "voxygen.element.buttons.border_press",
|
||||
wpn_icon_border_pressed: "voxygen.element.buttons.border_pressed",
|
||||
|
||||
// Social Window
|
||||
social_frame_on: "voxygen.element.misc_bg.social_frame",
|
||||
|
@ -43,7 +43,7 @@ use serde::{Deserialize, Serialize};
|
||||
use settings_window::{SettingsTab, SettingsWindow};
|
||||
use skillbar::Skillbar;
|
||||
use social::{Social, SocialTab};
|
||||
use spell::Spell;
|
||||
use spell::{SelectedSkillTree, Spell};
|
||||
|
||||
use crate::{
|
||||
ecs::{comp as vcomp, comp::HpFloaterList},
|
||||
@ -462,6 +462,7 @@ pub struct Show {
|
||||
mini_map: bool,
|
||||
ingame: bool,
|
||||
settings_tab: SettingsTab,
|
||||
skilltreetab: SelectedSkillTree,
|
||||
social_tab: SocialTab,
|
||||
want_grab: bool,
|
||||
stats: bool,
|
||||
@ -512,6 +513,8 @@ impl Show {
|
||||
if !self.esc_menu {
|
||||
self.social = false;
|
||||
self.crafting = false;
|
||||
self.bag = false;
|
||||
self.map = false;
|
||||
self.spell = open;
|
||||
self.want_grab = !open;
|
||||
}
|
||||
@ -614,6 +617,15 @@ impl Show {
|
||||
|
||||
fn toggle_spell(&mut self) {
|
||||
self.spell = !self.spell;
|
||||
self.bag = false;
|
||||
self.crafting = false;
|
||||
self.social = false;
|
||||
self.map = false;
|
||||
self.want_grab = !self.spell;
|
||||
}
|
||||
|
||||
fn open_skill_tree(&mut self, tree_sel: SelectedSkillTree) {
|
||||
self.skilltreetab = tree_sel;
|
||||
self.social = false;
|
||||
}
|
||||
}
|
||||
@ -743,6 +755,7 @@ impl Hud {
|
||||
group_menu: false,
|
||||
mini_map: true,
|
||||
settings_tab: SettingsTab::Interface,
|
||||
skilltreetab: SelectedSkillTree::Sword,
|
||||
social_tab: SocialTab::Online,
|
||||
want_grab: true,
|
||||
ingame: true,
|
||||
@ -2293,15 +2306,17 @@ impl Hud {
|
||||
|
||||
// Spellbook
|
||||
if self.show.spell {
|
||||
match Spell::new(&self.show, client, &self.imgs, &self.fonts, i18n)
|
||||
for event in Spell::new(&self.show, client, &self.imgs, &self.fonts, i18n)
|
||||
.set(self.ids.spell, ui_widgets)
|
||||
{
|
||||
Some(spell::Event::Close) => {
|
||||
self.show.spell(false);
|
||||
self.show.want_grab = true;
|
||||
self.force_ungrab = false;
|
||||
},
|
||||
None => {},
|
||||
match event {
|
||||
spell::Event::Close => {
|
||||
self.show.spell(false);
|
||||
self.show.want_grab = true;
|
||||
self.force_ungrab = false;
|
||||
},
|
||||
spell::Event::ChangeWeaponTree(tree_sel) => self.show.open_skill_tree(tree_sel),
|
||||
}
|
||||
}
|
||||
}
|
||||
// Map
|
||||
|
@ -1,26 +1,42 @@
|
||||
use super::{img_ids::Imgs, Show, TEXT_COLOR, UI_MAIN};
|
||||
use super::{img_ids::Imgs, Show, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN};
|
||||
use crate::{i18n::Localization, ui::fonts::Fonts};
|
||||
use conrod_core::{
|
||||
color,
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget_ids, Colorable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget, WidgetCommon,
|
||||
};
|
||||
|
||||
use client::{self, Client};
|
||||
use inline_tweak::*;
|
||||
|
||||
widget_ids! {
|
||||
pub struct Ids {
|
||||
spell_frame,
|
||||
spell_close,
|
||||
spell_title,
|
||||
frame,
|
||||
bg,
|
||||
icon,
|
||||
close,
|
||||
title,
|
||||
content_align,
|
||||
weapon_imgs[],
|
||||
weapon_btns[],
|
||||
skills_top_l_align,
|
||||
skills_top_r_align,
|
||||
skills_bot_l_align,
|
||||
skills_bot_r_align,
|
||||
skills_top_l[],
|
||||
skills_top_r[],
|
||||
skills_bot_l[],
|
||||
skills_bot_r[],
|
||||
sword_render,
|
||||
sword_skill_0,
|
||||
sword_sill_1,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(WidgetCommon)]
|
||||
pub struct Spell<'a> {
|
||||
_show: &'a Show,
|
||||
show: &'a Show,
|
||||
_client: &'a Client,
|
||||
|
||||
imgs: &'a Imgs,
|
||||
@ -29,6 +45,11 @@ pub struct Spell<'a> {
|
||||
|
||||
#[conrod(common_builder)]
|
||||
common: widget::CommonBuilder,
|
||||
created_btns_top_l: usize,
|
||||
created_btns_top_r: usize,
|
||||
created_btns_bot_l: usize,
|
||||
created_btns_bot_r: usize,
|
||||
example_skill_count: usize,
|
||||
}
|
||||
|
||||
impl<'a> Spell<'a> {
|
||||
@ -40,12 +61,17 @@ impl<'a> Spell<'a> {
|
||||
localized_strings: &'a Localization,
|
||||
) -> Self {
|
||||
Self {
|
||||
_show: show,
|
||||
show,
|
||||
_client,
|
||||
imgs,
|
||||
fonts,
|
||||
localized_strings,
|
||||
common: widget::CommonBuilder::default(),
|
||||
created_btns_top_l: 0,
|
||||
created_btns_top_r: 0,
|
||||
created_btns_bot_l: 0,
|
||||
created_btns_bot_r: 0,
|
||||
example_skill_count: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -54,12 +80,30 @@ impl<'a> Spell<'a> {
|
||||
ids: Ids,
|
||||
}*/
|
||||
|
||||
/*pub enum DiaryTab {
|
||||
SkillTrees,
|
||||
Achievements,
|
||||
}*/
|
||||
|
||||
pub enum SelectedSkillTree {
|
||||
None,
|
||||
Sword,
|
||||
Hammer,
|
||||
Axe,
|
||||
Sceptre,
|
||||
Bow,
|
||||
StaffFire,
|
||||
}
|
||||
|
||||
const WEAPONS: [&str; 6] = ["Sword", "Hammer", "Axe", "Sceptre", "Bow", "Fire Staff"];
|
||||
|
||||
pub enum Event {
|
||||
Close,
|
||||
ChangeWeaponTree(SelectedSkillTree),
|
||||
}
|
||||
|
||||
impl<'a> Widget for Spell<'a> {
|
||||
type Event = Option<Event>;
|
||||
type Event = Vec<Event>;
|
||||
type State = Ids;
|
||||
type Style = ();
|
||||
|
||||
@ -68,47 +112,359 @@ impl<'a> Widget for Spell<'a> {
|
||||
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
|
||||
fn style(&self) -> Self::Style { () }
|
||||
|
||||
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
|
||||
fn update(mut self, args: widget::UpdateArgs<Self>) -> Self::Event {
|
||||
let widget::UpdateArgs {
|
||||
id: _, state, ui, ..
|
||||
} = args;
|
||||
|
||||
Image::new(self.imgs.window_3)
|
||||
.top_left_with_margins_on(ui.window, 200.0, 25.0)
|
||||
.w_h(103.0 * 4.0, 122.0 * 4.0)
|
||||
let mut events = Vec::new();
|
||||
let sel_tab = &self.show.skilltreetab;
|
||||
// Frame
|
||||
Image::new(self.imgs.diary_bg)
|
||||
.w_h(1202.0, 886.0)
|
||||
.mid_top_with_margin_on(ui.window, 5.0)
|
||||
.color(Some(UI_MAIN))
|
||||
.set(state.spell_frame, ui);
|
||||
.set(state.bg, ui);
|
||||
|
||||
Image::new(self.imgs.diary_frame)
|
||||
.w_h(1202.0, 886.0)
|
||||
.middle_of(state.bg)
|
||||
.color(Some(UI_HIGHLIGHT_0))
|
||||
.set(state.frame, ui);
|
||||
|
||||
// Icon
|
||||
Image::new(self.imgs.spellbook_button)
|
||||
.w_h(30.0, 27.0)
|
||||
.top_left_with_margins_on(state.frame, 8.0, 8.0)
|
||||
.set(state.icon, ui);
|
||||
|
||||
// X-Button
|
||||
if Button::image(self.imgs.close_button)
|
||||
.w_h(28.0, 28.0)
|
||||
.hover_image(self.imgs.close_button_hover)
|
||||
.press_image(self.imgs.close_button_press)
|
||||
.top_right_with_margins_on(state.spell_frame, 0.0, 0.0)
|
||||
.set(state.spell_close, ui)
|
||||
.w_h(24.0, 25.0)
|
||||
.hover_image(self.imgs.close_btn_hover)
|
||||
.press_image(self.imgs.close_btn_press)
|
||||
.top_right_with_margins_on(state.frame, 0.0, 0.0)
|
||||
.set(state.close, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
return Some(Event::Close);
|
||||
events.push(Event::Close);
|
||||
}
|
||||
|
||||
// Title
|
||||
// TODO: Use an actual character name.
|
||||
Text::new(&self.localized_strings.get("hud.spell"))
|
||||
.mid_top_with_margin_on(state.spell_frame, 6.0)
|
||||
Text::new(&self.localized_strings.get("hud.diary"))
|
||||
.mid_top_with_margin_on(state.frame, 3.0)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_size(self.fonts.cyri.scale(29))
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.spell_title, ui);
|
||||
.set(state.title, ui);
|
||||
|
||||
// Content Alignment
|
||||
Rectangle::fill_with([95.0 * 4.0, 108.0 * 4.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(state.spell_frame, 40.0)
|
||||
Rectangle::fill_with([599.0 * 2.0, 419.0 * 2.0], color::TRANSPARENT)
|
||||
.mid_top_with_margin_on(state.frame, 46.0)
|
||||
.set(state.content_align, ui);
|
||||
|
||||
// Contents
|
||||
|
||||
// Frame
|
||||
// Skill Trees
|
||||
|
||||
None
|
||||
// Skill Tree Selection
|
||||
state.update(|s| {
|
||||
s.weapon_btns
|
||||
.resize(WEAPONS.len(), &mut ui.widget_id_generator())
|
||||
});
|
||||
state.update(|s| {
|
||||
s.weapon_imgs
|
||||
.resize(WEAPONS.len(), &mut ui.widget_id_generator())
|
||||
});
|
||||
for i in WEAPONS.iter().copied().enumerate() {
|
||||
// Background weapon image
|
||||
let img = Image::new(match i.1 {
|
||||
"Sword" => self.imgs.sword,
|
||||
"Hammer" => self.imgs.hammer,
|
||||
"Axe" => self.imgs.axe,
|
||||
"Sceptre" => self.imgs.sceptre,
|
||||
"Bow" => self.imgs.bow,
|
||||
"Fire Staff" => self.imgs.staff,
|
||||
_ => self.imgs.nothing,
|
||||
});
|
||||
|
||||
let img = if i.0 == 0 {
|
||||
img.top_left_with_margins_on(state.content_align, tweak!(10.0), tweak!(5.0))
|
||||
} else {
|
||||
img.down_from(state.weapon_btns[i.0 - 1], tweak!(5.0))
|
||||
};
|
||||
|
||||
img.w_h(tweak!(50.0), tweak!(50.0))
|
||||
.set(state.weapon_imgs[i.0], ui);
|
||||
// Weapon icons
|
||||
if Button::image(match i.1 {
|
||||
"Sword" => match sel_tab {
|
||||
SelectedSkillTree::Sword => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
"Hammer" => match sel_tab {
|
||||
SelectedSkillTree::Hammer => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
"Axe" => match sel_tab {
|
||||
SelectedSkillTree::Axe => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
"Sceptre" => match sel_tab {
|
||||
SelectedSkillTree::Sceptre => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
"Bow" => match sel_tab {
|
||||
SelectedSkillTree::Bow => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
"Fire Staff" => match sel_tab {
|
||||
SelectedSkillTree::StaffFire => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
},
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
})
|
||||
.w_h(tweak!(50.0), tweak!(50.0))
|
||||
.hover_image(match i.1 {
|
||||
"Sword" => match sel_tab {
|
||||
SelectedSkillTree::Sword => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
"Hammer" => match sel_tab {
|
||||
SelectedSkillTree::Hammer => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
"Axe" => match sel_tab {
|
||||
SelectedSkillTree::Axe => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
"Sceptre" => match sel_tab {
|
||||
SelectedSkillTree::Sceptre => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
"Bow" => match sel_tab {
|
||||
SelectedSkillTree::Bow => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
"Fire Staff" => match sel_tab {
|
||||
SelectedSkillTree::StaffFire => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_mo,
|
||||
},
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
})
|
||||
.press_image(match i.1 {
|
||||
"Sword" => match sel_tab {
|
||||
SelectedSkillTree::Sword => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
"Hammer" => match sel_tab {
|
||||
SelectedSkillTree::Hammer => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
"Axe" => match sel_tab {
|
||||
SelectedSkillTree::Axe => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
"Sceptre" => match sel_tab {
|
||||
SelectedSkillTree::Sceptre => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
"Bow" => match sel_tab {
|
||||
SelectedSkillTree::Bow => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
"Fire Staff" => match sel_tab {
|
||||
SelectedSkillTree::StaffFire => self.imgs.wpn_icon_border_pressed,
|
||||
_ => self.imgs.wpn_icon_border_press,
|
||||
},
|
||||
_ => self.imgs.wpn_icon_border,
|
||||
})
|
||||
.middle_of(state.weapon_imgs[i.0])
|
||||
.set(state.weapon_btns[i.0], ui)
|
||||
.was_clicked()
|
||||
{
|
||||
match i.1 {
|
||||
"Sword" => events.push(Event::ChangeWeaponTree(SelectedSkillTree::Sword)),
|
||||
"Hammer" => events.push(Event::ChangeWeaponTree(SelectedSkillTree::Hammer)),
|
||||
"Axe" => events.push(Event::ChangeWeaponTree(SelectedSkillTree::Axe)),
|
||||
"Sceptre" => events.push(Event::ChangeWeaponTree(SelectedSkillTree::Sceptre)),
|
||||
"Bow" => events.push(Event::ChangeWeaponTree(SelectedSkillTree::Bow)),
|
||||
"Fire Staff" => {
|
||||
events.push(Event::ChangeWeaponTree(SelectedSkillTree::StaffFire))
|
||||
},
|
||||
_ => events.push(Event::ChangeWeaponTree(SelectedSkillTree::None)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Skill Trees
|
||||
// Alignment Placing
|
||||
let x = tweak!(200.0);
|
||||
let y = tweak!(100.0);
|
||||
// Alignment rectangles for skills
|
||||
Rectangle::fill_with([124.0 * 2.0, 124.0 * 2.0], color::TRANSPARENT)
|
||||
.top_left_with_margins_on(state.content_align, y, x)
|
||||
.set(state.skills_top_l_align, ui);
|
||||
Rectangle::fill_with([124.0 * 2.0, 124.0 * 2.0], color::TRANSPARENT)
|
||||
.top_right_with_margins_on(state.content_align, y, x)
|
||||
.set(state.skills_top_r_align, ui);
|
||||
Rectangle::fill_with([124.0 * 2.0, 124.0 * 2.0], color::TRANSPARENT)
|
||||
.bottom_left_with_margins_on(state.content_align, y, x)
|
||||
.set(state.skills_bot_l_align, ui);
|
||||
Rectangle::fill_with([124.0 * 2.0, 124.0 * 2.0], color::TRANSPARENT)
|
||||
.bottom_right_with_margins_on(state.content_align, y, x)
|
||||
.set(state.skills_bot_r_align, ui);
|
||||
// Number of skills per rectangle per weapon, start counting at 0
|
||||
// Maximum of 9 skills/8 indices
|
||||
let skills_top_l = match sel_tab {
|
||||
SelectedSkillTree::Sword => 4,
|
||||
SelectedSkillTree::Bow => 1,
|
||||
_ => 0,
|
||||
};
|
||||
let skills_top_r = match sel_tab {
|
||||
SelectedSkillTree::Sword => 5,
|
||||
_ => 0,
|
||||
};
|
||||
let skills_bot_l = match sel_tab {
|
||||
SelectedSkillTree::Sword => 3,
|
||||
SelectedSkillTree::Bow => 2,
|
||||
_ => 0,
|
||||
};
|
||||
let skills_bot_r = match sel_tab {
|
||||
SelectedSkillTree::Sword => 1,
|
||||
_ => 0,
|
||||
};
|
||||
// Update widget id array len
|
||||
state.update(|s| {
|
||||
s.skills_top_l
|
||||
.resize(skills_top_l, &mut ui.widget_id_generator())
|
||||
});
|
||||
state.update(|s| {
|
||||
s.skills_top_r
|
||||
.resize(skills_top_r, &mut ui.widget_id_generator())
|
||||
});
|
||||
state.update(|s| {
|
||||
s.skills_bot_l
|
||||
.resize(skills_bot_l, &mut ui.widget_id_generator())
|
||||
});
|
||||
state.update(|s| {
|
||||
s.skills_bot_r
|
||||
.resize(skills_bot_r, &mut ui.widget_id_generator())
|
||||
});
|
||||
// Create Background Images to place skill icons on them later
|
||||
// Create central skill first, others around it:
|
||||
//
|
||||
// 5 1 6
|
||||
// 3 0 4
|
||||
// 8 2 7
|
||||
//
|
||||
//
|
||||
// TOP-LEFT Skills
|
||||
while self.created_btns_top_l < skills_top_l {
|
||||
let mut img = Button::image(self.imgs.wpn_icon_border).w_h(80.0, 80.0);
|
||||
match self.created_btns_top_l {
|
||||
0 => img = img.middle_of(state.skills_top_l_align), // Central Skill
|
||||
1 => img = img.up_from(state.skills_top_l[0], 4.0), // 12:00
|
||||
2 => img = img.down_from(state.skills_top_l[0], 4.0), // 6:00
|
||||
3 => img = img.left_from(state.skills_top_l[0], 4.0), // 3:00
|
||||
4 => img = img.right_from(state.skills_top_l[0], 4.0), // 9:00
|
||||
5 => img = img.top_left_with_margins_on(state.skills_top_l[0], -41.0, -41.0), /* 10:30 */
|
||||
6 => img = img.top_right_with_margins_on(state.skills_top_l[0], -41.0, -41.0), /* 1:30 */
|
||||
7 => img = img.bottom_left_with_margins_on(state.skills_top_l[0], -41.0, -41.0), /* 4:30 */
|
||||
8 => img = img.bottom_right_with_margins_on(state.skills_top_l[0], -41.0, -41.0), /* 7:30 */
|
||||
_ => {},
|
||||
}
|
||||
img.set(state.skills_top_l[self.created_btns_top_l], ui);
|
||||
self.created_btns_top_l = self.created_btns_top_l + 1;
|
||||
}
|
||||
// TOP-RIGHT Skills
|
||||
while self.created_btns_top_r < skills_top_r {
|
||||
let mut img = Button::image(self.imgs.wpn_icon_border).w_h(80.0, 80.0);
|
||||
match self.created_btns_top_r {
|
||||
0 => img = img.middle_of(state.skills_top_r_align), // Central Skill
|
||||
1 => img = img.up_from(state.skills_top_r[0], 4.0), // 12:00
|
||||
2 => img = img.down_from(state.skills_top_r[0], 4.0), // 6:00
|
||||
3 => img = img.left_from(state.skills_top_r[0], 4.0), // 3:00
|
||||
4 => img = img.right_from(state.skills_top_r[0], 4.0), // 9:00
|
||||
5 => img = img.top_left_with_margins_on(state.skills_top_r[0], -41.0, -41.0), /* 10:30 */
|
||||
6 => img = img.top_right_with_margins_on(state.skills_top_r[0], -41.0, -41.0), /* 1:30 */
|
||||
7 => img = img.bottom_left_with_margins_on(state.skills_top_r[0], -41.0, -41.0), /* 4:30 */
|
||||
8 => img = img.bottom_right_with_margins_on(state.skills_top_r[0], -41.0, -41.0), /* 7:30 */
|
||||
_ => {},
|
||||
}
|
||||
img.set(state.skills_top_r[self.created_btns_top_r], ui);
|
||||
self.created_btns_top_r = self.created_btns_top_r + 1;
|
||||
}
|
||||
// BOTTOM-LEFT Skills
|
||||
while self.created_btns_bot_l < skills_bot_l {
|
||||
let mut img = Button::image(self.imgs.wpn_icon_border).w_h(80.0, 80.0);
|
||||
match self.created_btns_bot_l {
|
||||
0 => img = img.middle_of(state.skills_bot_l_align), // Central Skill
|
||||
1 => img = img.up_from(state.skills_bot_l[0], 4.0), // 12:00
|
||||
2 => img = img.down_from(state.skills_bot_l[0], 4.0), // 6:00
|
||||
3 => img = img.left_from(state.skills_bot_l[0], 4.0), // 3:00
|
||||
4 => img = img.right_from(state.skills_bot_l[0], 4.0), // 9:00
|
||||
5 => img = img.top_left_with_margins_on(state.skills_bot_l[0], -41.0, -41.0), /* 10:30 */
|
||||
6 => img = img.top_right_with_margins_on(state.skills_bot_l[0], -41.0, -41.0), /* 1:30 */
|
||||
7 => img = img.bottom_left_with_margins_on(state.skills_bot_l[0], -41.0, -41.0), /* 4:30 */
|
||||
8 => img = img.bottom_right_with_margins_on(state.skills_bot_l[0], -41.0, -41.0), /* 7:30 */
|
||||
_ => {},
|
||||
}
|
||||
img.set(state.skills_bot_l[self.created_btns_bot_l], ui);
|
||||
self.created_btns_bot_l = self.created_btns_bot_l + 1;
|
||||
}
|
||||
// BOTTOM-RIGHT Skills
|
||||
while self.created_btns_bot_r < skills_bot_r {
|
||||
let mut btn = Image::new(self.imgs.wpn_icon_border).w_h(80.0, 80.0);
|
||||
match self.created_btns_bot_r {
|
||||
0 => btn = btn.middle_of(state.skills_bot_r_align), // Central Skill
|
||||
1 => btn = btn.up_from(state.skills_bot_r[0], 4.0), // 12:00
|
||||
2 => btn = btn.down_from(state.skills_bot_r[0], 4.0), // 6:00
|
||||
3 => btn = btn.left_from(state.skills_bot_r[0], 4.0), // 3:00
|
||||
4 => btn = btn.right_from(state.skills_bot_r[0], 4.0), // 9:00
|
||||
5 => btn = btn.top_left_with_margins_on(state.skills_bot_r[0], -41.0, -41.0), /* 10:30 */
|
||||
6 => btn = btn.top_right_with_margins_on(state.skills_bot_r[0], -41.0, -41.0), /* 1:30 */
|
||||
7 => btn = btn.bottom_left_with_margins_on(state.skills_bot_r[0], -41.0, -41.0), /* 4:30 */
|
||||
8 => btn = btn.bottom_right_with_margins_on(state.skills_bot_r[0], -41.0, -41.0), /* 7:30 */
|
||||
_ => {},
|
||||
}
|
||||
btn.set(state.skills_bot_r[self.created_btns_bot_r], ui);
|
||||
self.created_btns_bot_r = self.created_btns_bot_r + 1;
|
||||
}
|
||||
// Actual Skill-Icons and Functionality
|
||||
match sel_tab {
|
||||
SelectedSkillTree::Sword => {
|
||||
// Sword
|
||||
// fancy bg art
|
||||
let art_scale = tweak!(0.6);
|
||||
Image::new(self.imgs.sword_render)
|
||||
.w_h(222.0 * art_scale, 818.0 * art_scale)
|
||||
.middle_of(state.content_align)
|
||||
.graphics_for(state.content_align)
|
||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, tweak!(0.2))))
|
||||
.set(state.sword_render, ui);
|
||||
// Top Left skills
|
||||
// 5 1 6
|
||||
// 3 0 4
|
||||
// 8 2 7
|
||||
if Button::image(self.imgs.sword_whirlwind)
|
||||
.w_h(tweak!(74.0), tweak!(74.0))
|
||||
.middle_of(state.skills_top_l[0])
|
||||
.label(&self.example_skill_count.to_string())
|
||||
.label_y(conrod_core::position::Relative::Scalar(tweak!(-28.0)))
|
||||
.label_x(conrod_core::position::Relative::Scalar(tweak!(32.0)))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_size(self.fonts.cyri.scale(tweak!(16)))
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
.floating(true)
|
||||
.set(state.sword_skill_0, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
self.example_skill_count = self.example_skill_count + 1;
|
||||
};
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
events
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user