Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed +menu_context and localization changes #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/stormfox/language/chef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ return [[Stormfox Chef
sf_setwindangle = Set VindOungle-a
sf_setweather = Set Veezeer
sf_settime = Set Time-a
sf_holdc = Huld C
sf_holdc = Huld
sf_interface_lighttheme = LEEght Zeeme-a
sf_interface_darktheme = Derk Zeeme-a
sf_interface_light = LEEght
Expand All @@ -190,4 +190,4 @@ return [[Stormfox Chef
sf_warning_missingmaterial = Yuou're-a meessing %i meteriel(s).
sf_warning_unfinished_a = Zees is nut feenished yet. Pleese-a use-a zee-a Truoubleshuoter in serfer-settings
sf_warning_unfinished_b = Oupee-a serferside-a Truoubleshuoter (Requoures permeessiun)
]]
]]
4 changes: 2 additions & 2 deletions lua/stormfox/language/en-PT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ return [[Stormfox English Pirate
sf_setwindangle = Set WindAngle
sf_setweather = Set Skies
sf_settime = Set Time
sf_holdc = Hold C
sf_holdc = Hold
sf_interface_lighttheme = Light Theme
sf_interface_darktheme = Dark Theme
sf_interface_light = Light
Expand All @@ -190,4 +190,4 @@ return [[Stormfox English Pirate
sf_warning_missingmaterial = Ye're missin' %i material(s).
sf_warning_unfinished_a = This is not finished yet. Please use the Troubleshooter in poseidon-settings
sf_warning_unfinished_b = Open poseidonside Troubleshooter (Requires permission)
]]
]]
4 changes: 2 additions & 2 deletions lua/stormfox/language/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ return [[Stormfox English
sf_setwindangle = Set WindAngle
sf_setweather = Set Weather
sf_settime = Set Time
sf_holdc = Hold C
sf_holdc = Hold
sf_interface_lighttheme = Light Theme
sf_interface_darktheme = Dark Theme
sf_interface_light = Light
Expand All @@ -190,4 +190,4 @@ return [[Stormfox English
sf_warning_missingmaterial = You're missing %i material(s).
sf_warning_unfinished_a = This is not finished yet. Please use the Troubleshooter in server-settings
sf_warning_unfinished_b = Open serverside Troubleshooter (Requires permission)
]]
]]
4 changes: 2 additions & 2 deletions lua/stormfox/language/fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
sf_setwindangle = Régler l'angle de vent
sf_setweather = Changer la météo
sf_settime = Changer l'heure
sf_holdc = Maintenir C
sf_holdc = Maintenir
sf_interface_lighttheme = Thème clair
sf_interface_darktheme = Thème sombre
sf_interface_light = Lumière
Expand All @@ -176,4 +176,4 @@
sf_warning_missingmaterial = Il vous manque %i texture.
sf_warning_unfinished_a = Ce n'est pas encore fini. Veuillez utiliser le dépannage dans les paramètres du serveur.
sf_warning_unfinished_b = Ouvrir le dépannage côté serveur (nécessite l'autorisation)
]]
]]
4 changes: 2 additions & 2 deletions lua/stormfox/language/ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ return [[Stormfox Russian
sf_setwindangle = Установ. Угол
sf_setweather = Выбрать Погоду
sf_settime = Установить Время
sf_holdc = Удерживайте "С"
sf_holdc = Удерживайте
sf_interface_lighttheme = Светлая Тема
sf_interface_darktheme = Тёмная Тема
sf_interface_light = Освещение
Expand All @@ -189,4 +189,4 @@ return [[Stormfox Russian
sf_warning_missingmaterial = Не найден(о) %i материал(а/ов).
sf_warning_unfinished_a = В разработке. Используйте Фиксер в серверных настройках.
sf_warning_unfinished_b = Открыть серверный Фиксер (Требуются полномочия)
]]
]]
19 changes: 15 additions & 4 deletions lua/stormfox/sh_options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1002,15 +1002,26 @@
surface.SetFont("StormFox-Console")
local tw,th = surface.GetTextSize(t)
surface.SetTextPos(w / 2 - tw / 2,h / 2 - th / 2)
surface.DrawText(t)
if t == StormFox.Language.Translate(self.text) then
surface.DrawText(string.format("%s %s", t, string.upper(input.LookupBinding("+menu_context", true) or "C")))
else
surface.DrawText(t)
end
end
function panel:Think()
if not self.enabled and input.IsKeyDown(KEY_C) and not openChat and not gui.IsConsoleVisible() then
--input.GetKeyCode flips out if the command it's looking for doesn't have any binds, so check if it's bound, if not, default back to using KEY_C
local bind
if input.LookupBinding("+menu_context", true) then
bind = input.GetKeyCode(input.LookupBinding("+menu_context", true))
else
bind = KEY_C
end
if not self.enabled and input.IsKeyDown(bind) and not openChat and not gui.IsConsoleVisible() then
self.enabled = true
self.btnClose:SetDisabled( false )
self:MakePopup()
self:SetSelected()
elseif self.enabled and not input.IsKeyDown(KEY_C) then
elseif self.enabled and not input.IsKeyDown(bind) then
self.enabled = false
self.btnClose:SetDisabled( true )
self:SetMouseInputEnabled(false)
Expand Down Expand Up @@ -1056,4 +1067,4 @@
LocalPlayer():EmitSound("garrysmod/ui_click.wav")
end
})
end
end