Skip to content

Commit

Permalink
Improve jobs screen UX (#13657)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessimo authored Jan 26, 2023
1 parent f4ac6f4 commit bf5de54
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 95 deletions.
2 changes: 1 addition & 1 deletion Content.Client/Preferences/UI/HumanoidProfileEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-name-label'}" />
<LineEdit Name="CNameEdit" MinSize="270 0" VerticalAlignment="Center" />
<LineEdit Name="CNameEdit" MinSize="270 0" VerticalAlignment="Center" Margin="5 0 0 0" />
<Button Name="CNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer>
<Button Name="CRandomizeEverything" HorizontalAlignment="Center"
Expand Down
19 changes: 16 additions & 3 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IProt
new Label
{
Text = Loc.GetString("humanoid-profile-editor-department-jobs-label",
("departmentName", departmentName))
("departmentName", departmentName)),
Margin = new Thickness(5f, 0, 0, 0)
}
}
});
Expand Down Expand Up @@ -1111,7 +1112,8 @@ public JobPrioritySelector(JobPrototype job)
ButtonStyle = StyleBase.ButtonOpenBoth,
LastButtonStyle = StyleBase.ButtonOpenLeft
};

//Override default radio option button width
_optionButton.GenerateItem = GenerateButton;
// Text, Value
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-high-button"), (int) JobPriority.High);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium);
Expand Down Expand Up @@ -1159,8 +1161,9 @@ public JobPrioritySelector(JobPrototype job)

_jobTitle = new Label()
{
Margin = new Thickness(5f,0,5f,0),
Text = job.LocalizedName,
MinSize = (175, 0),
MinSize = (180, 0),
MouseFilter = MouseFilterMode.Stop
};

Expand Down Expand Up @@ -1197,6 +1200,16 @@ public void UnlockRequirements()
_lockStripe.Visible = false;
_optionButton.Visible = true;
}

private Button GenerateButton(string text, int value)
{
var btn = new Button
{
Text = text,
MinWidth = 90
};
return btn;
}
}

private void UpdateAntagPreferences()
Expand Down
14 changes: 7 additions & 7 deletions Resources/Locale/en-US/job/department.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
department-Cargo = cargo
department-Civilian = civilian
department-Command = command
department-Engineering = engineering
department-Medical = medical
department-Security = security
department-Science = science
department-Cargo = Cargo
department-Civilian = Civilian
department-Command = Command
department-Engineering = Engineering
department-Medical = Medical
department-Security = Security
department-Science = Science
168 changes: 84 additions & 84 deletions Resources/Locale/en-US/job/job-names.ftl
Original file line number Diff line number Diff line change
@@ -1,86 +1,86 @@
job-name-warden = warden
job-name-security = security officer
job-name-cadet = security cadet
job-name-hos = head of security
job-name-detective = detective
job-name-scientist = scientist
job-name-rd = research director
job-name-psychologist = psychologist
job-name-intern = medical intern
job-name-doctor = medical doctor
job-name-cmo = chief medical officer
job-name-chemist = chemist
job-name-technical-assistant = technical assistant
job-name-engineer = station engineer
job-name-atmostech = atmospheric technician
job-name-hop = head of personnel
job-name-captain = captain
job-name-serviceworker = service worker
job-name-centcomoff = CentCom official
job-name-reporter = reporter
job-name-musician = musician
job-name-librarian = librarian
job-name-lawyer = lawyer
job-name-mime = mime
job-name-ce = chief engineer
job-name-janitor = janitor
job-name-chaplain = chaplain
job-name-botanist = botanist
job-name-bartender = bartender
job-name-passenger = passenger
job-name-salvagespec = salvage specialist
job-name-qm = quartermaster
job-name-cargotech = cargo technician
job-name-chef = chef
job-name-clown = clown
job-name-ertleader = ERT leader
job-name-ertengineer = ERT engineer
job-name-ertsecurity = ERT security
job-name-ertmedic = ERT medic
job-name-ertjanitor = ERT janitor
job-name-boxer = boxer
job-name-zookeeper = zookeeper
job-name-warden = Warden
job-name-security = Security Officer
job-name-cadet = Security Cadet
job-name-hos = Head of Security
job-name-detective = Detective
job-name-scientist = Scientist
job-name-rd = Research Director
job-name-psychologist = Psychologist
job-name-intern = Medical Intern
job-name-doctor = Medical Doctor
job-name-cmo = Chief Medical Officer
job-name-chemist = Chemist
job-name-technical-assistant = Technical Assistant
job-name-engineer = Station Engineer
job-name-atmostech = Atmospheric Technician
job-name-hop = Head of Personnel
job-name-captain = Captain
job-name-serviceworker = Service Worker
job-name-centcomoff = CentCom Official
job-name-reporter = Reporter
job-name-musician = Musician
job-name-librarian = Librarian
job-name-lawyer = Lawyer
job-name-mime = Mime
job-name-ce = Chief Engineer
job-name-janitor = Janitor
job-name-chaplain = Chaplain
job-name-botanist = Botanist
job-name-bartender = Bartender
job-name-passenger = Passenger
job-name-salvagespec = Salvage specialist
job-name-qm = Quartermaster
job-name-cargotech = Cargo Technician
job-name-chef = Chef
job-name-clown = Clown
job-name-ertleader = ERT Leader
job-name-ertengineer = ERT Engineer
job-name-ertsecurity = ERT Security
job-name-ertmedic = ERT Medic
job-name-ertjanitor = ERT Janitor
job-name-boxer = Boxer
job-name-zookeeper = Zookeeper
# Role timers - Make these alphabetical or I cut you
JobAtmosphericTechnician = atmospheric technician
JobBartender = bartender
JobBotanist = botanist
JobCaptain = captain
JobCargoTechnician = cargo technician
JobCentralCommandOfficial = central command official
JobChaplain = chaplain
JobChef = chef
JobChemist = chemist
JobChiefEngineer = chief engineer
JobChiefMedicalOfficer = chief medical officer
JobClown = clown
JobDetective = detective
JobERTEngineer = ERT engineer
JobERTJanitor = ERT janitor
JobERTLeader = ERT leader
JobERTMedical = ERT medical
JobERTSecurity = ERT security
JobHeadOfPersonnel = head of personnel
JobHeadOfSecurity = head of security
JobJanitor = janitor
JobLawyer = lawyer
JobLibrarian = librarian
JobMedicalDoctor = medical doctor
JobMedicalIntern = medical intern
JobMime = mime
JobMusician = musician
JobPassenger = passenger
JobPsychologist = psychologist
JobQuartermaster = quartermaster
JobReporter = reporter
JobResearchDirector = research director
JobSalvageSpecialist = salvage specialist
JobScientist = scientist
JobSecurityCadet = security cadet
JobSecurityOfficer = security officer
JobServiceWorker = service worker
JobStationEngineer = station engineer
JobTechnicalAssistant = technical assistant
JobWarden = warden
JobBoxer = boxer
JobZookeeper = zookeeper
JobAtmosphericTechnician = Atmospheric Technician
JobBartender = Bartender
JobBotanist = Botanist
JobBoxer = Boxer
JobCaptain = Captain
JobCargoTechnician = Cargo Technician
JobCentralCommandOfficial = Central Command Official
JobChaplain = Chaplain
JobChef = Chef
JobChemist = Chemist
JobChiefEngineer = Chief Engineer
JobChiefMedicalOfficer = Chief Medical Officer
JobClown = Clown
JobDetective = Detective
JobERTEngineer = ERT Engineer
JobERTJanitor = ERT Janitor
JobERTLeader = ERT Leader
JobERTMedical = ERT Medical
JobERTSecurity = ERT Security
JobHeadOfPersonnel = Head of Personnel
JobHeadOfSecurity = Head of Security
JobJanitor = Janitor
JobLawyer = Lawyer
JobLibrarian = Librarian
JobMedicalDoctor = Medical doctor
JobMedicalIntern = edical intern
JobMime = Mime
JobMusician = Musician
JobPassenger = Passenger
JobPsychologist = Psychologist
JobQuartermaster = Quartermaster
JobReporter = Reporter
JobResearchDirector = Research Director
JobSalvageSpecialist = Salvage Specialist
JobScientist = Scientist
JobSecurityCadet = Security Cadet
JobSecurityOfficer = Security Officer
JobServiceWorker = Service Worker
JobStationEngineer = Station Engineer
JobTechnicalAssistant = Technical Assistant
JobWarden = Warden
JobZookeeper = Zookeeper

0 comments on commit bf5de54

Please sign in to comment.