-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSettingsWindowPage.cs
80 lines (71 loc) · 3.27 KB
/
SettingsWindowPage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using ModSettings;
using VoxelTycoon;
using VoxelTycoon.Game.UI;
using VoxelTycoon.Localization;
namespace ScheduleStopwatch
{
public class SettingsWindowPage : ModSettingsWindowPage
{
protected override void InitializeInternal(SettingsControl settingsControl)
{
Settings settings = Settings.Current;
Locale locale = LazyManager<LocaleManager>.Current.Locale;
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_time_for_inidividual_tasks"), null, settings.ShowIndividualTaskTimes, delegate ()
{
settings.ShowIndividualTaskTimes = true;
}, delegate ()
{
settings.ShowIndividualTaskTimes = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_totaltime_in_schedule"), null, settings.ShowScheduleTotalTime, delegate ()
{
settings.ShowScheduleTotalTime = true;
}, delegate ()
{
settings.ShowScheduleTotalTime = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_total_capacity"), null, settings.ShowTotalTransferCapacity, delegate ()
{
settings.ShowTotalTransferCapacity = true;
}, delegate ()
{
settings.ShowTotalTransferCapacity = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_individual_unloading_capacity"), null, settings.ShowIndividualUnloadingCapacity, delegate ()
{
settings.ShowIndividualUnloadingCapacity = true;
}, delegate ()
{
settings.ShowIndividualUnloadingCapacity = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_individual_loading_capacity"), null, settings.ShowIndividualLoadingCapacity, delegate ()
{
settings.ShowIndividualLoadingCapacity = true;
}, delegate ()
{
settings.ShowIndividualLoadingCapacity = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_station_loading_capacity"), null, settings.ShowStationLoadedItems, delegate ()
{
settings.ShowStationLoadedItems = true;
}, delegate ()
{
settings.ShowStationLoadedItems = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/display_station_unloading_capacity"), null, settings.ShowStationUnloadedItems, delegate ()
{
settings.ShowStationUnloadedItems = true;
}, delegate ()
{
settings.ShowStationUnloadedItems = false;
});
settingsControl.AddToggle(locale.GetString("schedule_stopwatch/calculate_unserviced_demands"), locale.GetString("schedule_stopwatch/calculate_unserviced_demands_description"), settings.CalculateUnservicedDemands, delegate ()
{
settings.CalculateUnservicedDemands = true;
}, delegate ()
{
settings.CalculateUnservicedDemands = false;
});
}
}
}