Skip to content

Commit

Permalink
Reformats the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Nov 14, 2023
1 parent e82f91d commit 0ed5d1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ GLOBAL_LIST_INIT(loadout_categories, init_loadout_categories())
/datum/preference_middleware/loadout/proc/select_slot(list/params, mob/user)
preferences.write_preference(GLOB.preference_entries[/datum/preference/numeric/active_loadout], text2num(params["new_slot"]))
character_preview_view.update_body()
preferences.character_preview_view?.update_body()
preferences.update_static_data_for_all_viewers()

/datum/preference_middleware/loadout/get_ui_data(mob/user)
Expand Down
22 changes: 13 additions & 9 deletions tgui/packages/tgui/interfaces/_LoadoutManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,19 @@ const LoadoutPreviewSection = (props, context) => {
)}
</Stack.Item>
<Stack.Divider />
<Stack.Item align="center">
<Stack>
{loadoutSlots(max_loadout_slots).map((slot) => (
<Stack.Item key={slot}>
<Button
color={slot === current_slot ? 'green' : 'grey'}
content={slot}
onClick={() => act('select_slot', { new_slot: slot })}
/>
</Stack.Item>
))}
</Stack>
</Stack.Item>
<Stack.Item align="center">
<Stack>
<Stack.Item>
Expand All @@ -350,15 +363,6 @@ const LoadoutPreviewSection = (props, context) => {
}
/>
</Stack.Item>
{loadoutSlots(max_loadout_slots).map((slot) => (
<Stack.Item key={slot}>
<Button
color={slot === current_slot ? 'green' : ''}
content={slot}
onClick={() => act('select_slot', { new_slot: slot })}
/>
</Stack.Item>
))}
<Stack.Item>
<Button
icon="chevron-right"
Expand Down

0 comments on commit 0ed5d1f

Please sign in to comment.