Improve jobs screen UX (#13657)

This commit is contained in:
James Simonson
2023-01-27 06:32:15 +08:00
committed by GitHub
parent f4ac6f445c
commit bf5de5472b
4 changed files with 108 additions and 95 deletions

View File

@@ -15,7 +15,7 @@
<BoxContainer Orientation="Vertical"> <BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal" VerticalExpand="True"> <BoxContainer Orientation="Horizontal" VerticalExpand="True">
<Label Text="{Loc 'humanoid-profile-editor-name-label'}" /> <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'}" /> <Button Name="CNameRandomize" Text="{Loc 'humanoid-profile-editor-name-random-button'}" />
</BoxContainer> </BoxContainer>
<Button Name="CRandomizeEverything" HorizontalAlignment="Center" <Button Name="CRandomizeEverything" HorizontalAlignment="Center"

View File

@@ -410,7 +410,8 @@ namespace Content.Client.Preferences.UI
new Label new Label
{ {
Text = Loc.GetString("humanoid-profile-editor-department-jobs-label", Text = Loc.GetString("humanoid-profile-editor-department-jobs-label",
("departmentName", departmentName)) ("departmentName", departmentName)),
Margin = new Thickness(5f, 0, 0, 0)
} }
} }
}); });
@@ -1111,7 +1112,8 @@ namespace Content.Client.Preferences.UI
ButtonStyle = StyleBase.ButtonOpenBoth, ButtonStyle = StyleBase.ButtonOpenBoth,
LastButtonStyle = StyleBase.ButtonOpenLeft LastButtonStyle = StyleBase.ButtonOpenLeft
}; };
//Override default radio option button width
_optionButton.GenerateItem = GenerateButton;
// Text, Value // 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-high-button"), (int) JobPriority.High);
_optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium); _optionButton.AddItem(Loc.GetString("humanoid-profile-editor-job-priority-medium-button"), (int) JobPriority.Medium);
@@ -1159,8 +1161,9 @@ namespace Content.Client.Preferences.UI
_jobTitle = new Label() _jobTitle = new Label()
{ {
Margin = new Thickness(5f,0,5f,0),
Text = job.LocalizedName, Text = job.LocalizedName,
MinSize = (175, 0), MinSize = (180, 0),
MouseFilter = MouseFilterMode.Stop MouseFilter = MouseFilterMode.Stop
}; };
@@ -1197,6 +1200,16 @@ namespace Content.Client.Preferences.UI
_lockStripe.Visible = false; _lockStripe.Visible = false;
_optionButton.Visible = true; _optionButton.Visible = true;
} }
private Button GenerateButton(string text, int value)
{
var btn = new Button
{
Text = text,
MinWidth = 90
};
return btn;
}
} }
private void UpdateAntagPreferences() private void UpdateAntagPreferences()

View File

@@ -1,7 +1,7 @@
department-Cargo = cargo department-Cargo = Cargo
department-Civilian = civilian department-Civilian = Civilian
department-Command = command department-Command = Command
department-Engineering = engineering department-Engineering = Engineering
department-Medical = medical department-Medical = Medical
department-Security = security department-Security = Security
department-Science = science department-Science = Science

View File

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