Skip to content

Commit 76da1f0

Browse files
committed
Revert "Revert "Added all the Kivy requirements""
This reverts commit 5349ce6.
1 parent 5349ce6 commit 76da1f0

15 files changed

+1291
-1339
lines changed

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/pyfa-ng.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+523-1,230
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gui/kv/centerColumn.kv

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#:include kv/centerColumnBottomPane.kv
2+
#:include kv/shipFitting.kv
23

34
<NewWidget@BaseClass>:
45
# .. definitions ..
@@ -8,13 +9,10 @@
89
GridLayout:
910
rows: 2
1011
cols: 1
11-
passing: 10
12-
spacing: 10
12+
passing: 0
13+
spacing: 0
1314

14-
Label:
15-
id: my_custom_label
16-
text: 'Ship Fitting Window'
17-
size_hint: 1, .5
15+
ShipFitting:
1816

1917
CenterColumnBottomPane:
2018
size_hint: 1, .5

gui/kv/centerColumnBottomPane.kv

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11

22
<CenterColumnBottomPane>:
3-
Accordion:
4-
orientation: 'vertical'
53

6-
AccordionItem:
7-
title: 'Drones\Fighters'
8-
collapse: False
4+
TabbedPanel:
5+
size_hint: 1, 1
6+
pos_hint: {'center_x': .5, 'center_y': .5}
7+
do_default_tab: False
8+
9+
TabbedPanelItem:
10+
text: 'Drones\nFighters'
911

1012
Label:
1113
text: 'Show things like:\nDrones\nFighters'
1214

13-
AccordionItem:
14-
title: 'Cargo'
15-
15+
TabbedPanelItem:
16+
text: 'Cargo'
1617
Label:
1718
text: 'Cargo'
1819

19-
AccordionItem:
20-
title: 'Character\Implants'
2120

21+
TabbedPanelItem:
22+
text: 'Character\nImplants'
2223
Label:
2324
text: 'Unified window for selecting\ncharacter and implants'
2425

25-
AccordionItem:
26-
title: 'Projected Effects'
26+
27+
TabbedPanelItem:
28+
text: 'Projected\nEffects'
2729

2830
Label:
2931
text: 'See current panel'

gui/kv/rightColumn.kv

+7-53
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,12 @@
1+
#:include kv/statPaneQuick.kv
2+
#:include kv/statPaneFitting.kv
3+
14
<RightColumn>:
2-
Accordion:
5+
BoxLayout:
36
orientation: 'vertical'
7+
padding: 0
48

5-
AccordionItem:
6-
title: 'Quick Stats'
7-
collapse: False
8-
9-
Label:
10-
text: 'Show things like:\nCPU\nPG\nEHP\nTotal DPS\nCap Stability'
11-
12-
AccordionItem:
13-
title: 'Detailed Fitting Stats'
14-
15-
Label:
16-
text: 'CPU\nPG\nCalibration'
17-
18-
AccordionItem:
19-
title: 'Resistances'
20-
21-
Label:
22-
text: 'See current resistances pane'
23-
24-
AccordionItem:
25-
title: 'Active\Passive Tanking'
26-
27-
Label:
28-
text: 'See current panel'
29-
30-
AccordionItem:
31-
title: 'DPS'
32-
33-
Label:
34-
text: 'Weapon DPS\nDrone DPS\nTotal DPS'
35-
36-
AccordionItem:
37-
title: 'Mining Stats'
38-
39-
Label:
40-
text: 'Laser Yield\nDrone Yield\nTotal Yield\nCycle Time\nRange'
41-
42-
AccordionItem:
43-
title: 'Capacitor'
44-
45-
Label:
46-
text: 'See current stat pane'
47-
48-
AccordionItem:
49-
title: 'Price'
50-
51-
Label:
52-
text: 'Ship price\nModule Price\nTotal Price\nInsurance Payouts'
9+
StatPaneQuick:
5310

54-
AccordionItem:
55-
title: 'Drones\Fighters'
11+
StatPaneFitting:
5612

57-
Label:
58-
text: 'Drone\Fighter Bay\nActive Drones\Tubes\nDrone Bandwidth\nDrone Control Range'

gui/kv/shipFitting.kv

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<ShipFitting>:
2+
GridLayout:
3+
id: shipFitting
4+
cols: 1
5+
6+
GridLayout:
7+
cols: 11
8+
rows: 1
9+
10+
Label:
11+
text: ' '
12+
13+
Label:
14+
text: ' '
15+
16+
Label:
17+
text: ' '
18+
19+
Label:
20+
text: 'Name'
21+
22+
Label:
23+
text: 'CPU'
24+
25+
Label:
26+
text: 'PG'
27+
28+
Label:
29+
text: 'Cap'
30+
31+
Label:
32+
text: 'Range'
33+
34+
Label:
35+
text: 'Misc'
36+
37+
Label:
38+
text: 'Cost'
39+
40+
Label:
41+
text: 'Ammo'
42+
43+
BoxLayout:
44+
Label:
45+
text: 'High Slots'
46+
47+
GridLayout:
48+
cols: 11
49+
rows: 8
50+
51+
BoxLayout:
52+
Label:
53+
text: 'Mid Slots'
54+
55+
GridLayout:
56+
cols: 11
57+
rows: 8
58+
59+
BoxLayout:
60+
Label:
61+
text: 'Low Slots'
62+
63+
GridLayout:
64+
cols: 11
65+
rows: 8
66+
67+
BoxLayout:
68+
Label:
69+
text: 'Rigs'
70+
71+
GridLayout:
72+
cols: 11
73+
rows: 3
74+
75+
BoxLayout:
76+
Label:
77+
text: 'Subsystems'
78+
79+
GridLayout:
80+
cols: 11
81+
rows: 5

gui/kv/statPaneFitting.kv

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<StatPaneFitting>:
2+
GridLayout:
3+
id: statsFitting
4+
cols: 1
5+
6+
BoxLayout:
7+
Label:
8+
text: 'Fitting'
9+
10+
GridLayout:
11+
cols: 2
12+
13+
Label:
14+
text: 'CPU'
15+
16+
Label:
17+
id: statsQuickCPU
18+
text: '0'
19+
20+
Label:
21+
text: 'Powergrid'
22+
23+
Label:
24+
id: statsQuickPG
25+
text: '0'
26+
27+
Label:
28+
text: 'Calibration'
29+
30+
Label:
31+
id: statsQuickCalibration
32+
text: '0'

gui/kv/statPaneQuick.kv

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<StatPaneQuick>:
2+
GridLayout:
3+
id: statsQuick
4+
cols: 1
5+
6+
BoxLayout:
7+
Label:
8+
text: 'Quick Stats'
9+
10+
GridLayout:
11+
cols: 2
12+
13+
Label:
14+
text: 'CPU'
15+
16+
Label:
17+
id: statsQuickCPU
18+
text: '0'
19+
20+
Label:
21+
text: 'Powergrid'
22+
23+
Label:
24+
id: statsQuickPG
25+
text: '0'
26+
27+
Label:
28+
text: 'Capacitor'
29+
30+
Label:
31+
id: statsQuickCapacitorStability
32+
text: '0%'
33+
34+
Label:
35+
text: 'DPS'
36+
37+
Label:
38+
id: statsQuickDPS
39+
text: '0'
40+
41+
Label:
42+
text: 'Effective Hitpoints'
43+
44+
Label:
45+
id: statsQuickEHP
46+
text: '0'

gui/main.kv

+47-28
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,55 @@
66
#:include kv/rightColumn.kv
77

88
<main>:
9-
#label_wid: my_custom_label
10-
#canvas.before:
11-
# Color:
12-
# rgba: 1, 1, 1, 1
13-
# Rectangle:
14-
# pos: self.pos
15-
# size: self.size
16-
17-
GridLayout:
18-
rows: 2
19-
cols: 1
20-
passing: 0
21-
spacing: 0
9+
BoxLayout:
10+
orientation: 'vertical'
2211

2312
MenuBar:
24-
minimum_height: 10
13+
height: 50
2514
size_hint: 1, None
2615

27-
GridLayout:
28-
rows: 1
29-
cols: 3
30-
passing: 0
31-
spacing: 0
16+
BoxLayout:
17+
orientation: 'horizontal'
3218
size_hint: 1, 1
33-
34-
LeftColumn:
35-
size_hint: .2, 1
36-
37-
CenterColumn:
38-
size_hint: .6, 1
39-
40-
RightColumn:
41-
size_hint: .2, 1
19+
id: mainBox
20+
21+
BoxLayout:
22+
id: all
23+
min_view_size: sp(30)
24+
strip_size: sp(13)
25+
#orientation: 'vertical' if self.width < self.height else 'horizontal'
26+
orientation: 'horizontal'
27+
vertical: self.orientation == 'vertical'
28+
bigger_size: self.height if self.vertical else self.width
29+
default_part_size: (self.bigger_size - self.strip_size*2)/3
30+
31+
# Reset part sizes when orientation changes
32+
on_vertical:
33+
if args[1]: (splitter1.height, splitter2.height) = (self.default_part_size, self.default_part_size)
34+
if not args[1]: (splitter1.width, splitter2.width) = (self.default_part_size, self.default_part_size)
35+
36+
Splitter:
37+
size_hint: .3, 1
38+
id: splitter1
39+
strip_size: all.strip_size
40+
max_size: all.bigger_size - (all.min_view_size + all.strip_size)*2
41+
min_size: all.min_view_size + all.strip_size
42+
sizable_from: 'bottom' if all.vertical else 'right'
43+
size_hint: (1, None) if all.vertical else (None, 1)
44+
size: (all.width, all.default_part_size) if all.vertical else (all.default_part_size, all.height)
45+
46+
LeftColumn:
47+
size_hint: 1, 1
48+
49+
50+
BoxLayout:
51+
size_hint: .7, 1
52+
CenterColumn:
53+
size_hint: 1, 1
54+
55+
BoxLayout:
56+
size_hint: None, 1
57+
width: 100
58+
59+
RightColumn:
60+
size_hint: 1, 1

0 commit comments

Comments
 (0)