Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 64399ef

Browse files
skill icons 2
1 parent 31490d1 commit 64399ef

File tree

2 files changed

+41
-25
lines changed

2 files changed

+41
-25
lines changed

code/_onclick/hud/screen_objects.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@
200200
/atom/movable/screen/skill_menu/ui_state(mob/user)
201201
return GLOB.always_state
202202

203+
/atom/movable/screen/skill_menu/ui_assets(mob/user)
204+
return list(
205+
get_asset_datum(/datum/asset/spritesheet/crafting),
206+
)
207+
203208
/atom/movable/screen/ghost/pai
204209
name = "pAI Candidate"
205210
icon = 'icons/mob/screen_midnight.dmi'

tgui/packages/tgui/interfaces/SkillMenu.js

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { classes } from 'common/react';
12
import { useBackend } from '../backend';
2-
import { formatSiUnit } from '../format';
3-
import { Box, Button, Icon, LabeledList, NumberInput, Section, Tabs, Tooltip } from '../components';
3+
import { Box, Button, Icon, LabeledList, Section, Stack, Tooltip } from '../components';
44
import { Window } from '../layouts';
55

66
export const SkillMenu = (props, context) => {
@@ -10,7 +10,7 @@ export const SkillMenu = (props, context) => {
1010
return (
1111
<Window
1212
title="Skills"
13-
width={204}
13+
width={224}
1414
height={262}
1515
>
1616
<Window.Content>
@@ -72,28 +72,39 @@ const AdjustSkill = (props, context) => {
7272
const { base, allocated } = skills[index];
7373

7474
return (
75-
<LabeledList.Item label={name}>
76-
<Tooltip content={tooltip}>
77-
<Icon name="question-circle" width="12px" mr="6px" />
78-
</Tooltip>
79-
<Button
80-
icon="minus"
81-
disabled={allocated <= 0 || allocated_points <= 0}
82-
onClick={() => act('allocate', {
83-
skill: skill,
84-
amount: -1,
85-
})}
75+
<Stack>
76+
<Box
77+
verticalAlign="middle"
78+
inline
79+
my={-0.5}
80+
mr={-1}
81+
className={classes(['crafting32x32', skill.replace(/ /g, '')])}
8682
/>
87-
{base + allocated} / {exceptional_skill ? 5 : 4}
88-
<Button
89-
ml="2px"
90-
icon="plus"
91-
disabled={(base + allocated) >= (exceptional_skill ? 5 : 4) || allocated_points >= skill_points}
92-
onClick={() => act('allocate', {
93-
skill: skill,
94-
amount: 1,
95-
})}
96-
/>
97-
</LabeledList.Item>
83+
<LabeledList.Item label={name}>
84+
<Box textAlign="right" ml={-5} mr={40}>
85+
<Tooltip content={tooltip}>
86+
<Icon name="question-circle" width="12px" mr="6px" />
87+
</Tooltip>
88+
<Button
89+
icon="minus"
90+
disabled={allocated <= 0 || allocated_points <= 0}
91+
onClick={() => act('allocate', {
92+
skill: skill,
93+
amount: -1,
94+
})}
95+
/>
96+
{base + allocated} / {exceptional_skill ? 5 : 4}
97+
<Button
98+
ml="2px"
99+
icon="plus"
100+
disabled={(base + allocated) >= (exceptional_skill ? 5 : 4) || allocated_points >= skill_points}
101+
onClick={() => act('allocate', {
102+
skill: skill,
103+
amount: 1,
104+
})}
105+
/>
106+
</Box>
107+
</LabeledList.Item>
108+
</Stack>
98109
);
99110
};

0 commit comments

Comments
 (0)