@@ -11,6 +11,7 @@ using namespace GlobalNamespace;
11
11
#include " TMPro/TextMeshPro.hpp"
12
12
#include " TMPro/TextMeshProUGUI.hpp"
13
13
#include " TMPro/TextAlignmentOptions.hpp"
14
+ #include " TMPro/TMP_Text.hpp"
14
15
using namespace TMPro ;
15
16
16
17
#include " UnityEngine/Canvas.hpp"
@@ -22,6 +23,7 @@ using namespace TMPro;
22
23
#include " UnityEngine/RenderMode.hpp"
23
24
#include " UnityEngine/UI/CanvasScaler.hpp"
24
25
#include " UnityEngine/CanvasRenderer.hpp"
26
+ #include " UnityEngine/MonoBehaviour.hpp"
25
27
using namespace UnityEngine ;
26
28
using namespace UnityEngine ::UI;
27
29
@@ -67,7 +69,7 @@ MAKE_HOOK_OFFSETLESS(MainMenuViewController_DidActivate, void, MainMenuViewContr
67
69
auto canvas_renderer = canvas_object->AddComponent <CanvasRenderer*>();
68
70
69
71
canvas_object->AddComponent <CurvedCanvasSettings*>();
70
- canvas_object->get_transform ()->set_position (UnityEngine::Vector3 (0 , 0.5 , 2.6 ));
72
+ canvas_object->get_transform ()->set_position (UnityEngine::Vector3 (0 , 0.5 , 3 ));
71
73
canvas_object->get_transform ()->set_localScale (UnityEngine::Vector3 (0.1 , 0.1 , 0.1 ));
72
74
73
75
Object::DontDestroyOnLoad (canvas_object);
@@ -79,15 +81,23 @@ MAKE_HOOK_OFFSETLESS(MainMenuViewController_DidActivate, void, MainMenuViewContr
79
81
80
82
layout->GetComponent <LayoutElement*>()->set_minWidth (7 );
81
83
layout->GetComponent <LayoutElement*>()->set_minHeight (80 );
84
+ // layout->set_childAlignment(TMPro::TextAlignmentOptions::Center, TMPro::TMP_Text::m_lineSpacing(0));
82
85
layout->set_childAlignment (TMPro::TextAlignmentOptions::Center);
83
- layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -2.20 , 3 ));
84
- clock_text->set_fontSize (4 );
85
- clock_text->get_transform ()->set_position (UnityEngine::Vector3 (0 , 1 , 2.6 ));
86
+ // layout->set_(TMPro::TMP_Text::m_lineSpacing(0))
87
+ layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -1.7 , 3.85 ));
88
+ // float fontsize = getConfig().config["FontSize"].GetFloat();
89
+
90
+ clock_text->get_transform ()->set_position (UnityEngine::Vector3 (0 , 0.5 , 3.85 ));
86
91
clock_text->get_gameObject ()->AddComponent <ClockMod::ClockUpdater*>();
87
92
}
88
93
canvas->get_gameObject ()->SetActive (true );
89
94
}
90
95
96
+ // void ClockMod::ClockViewController::DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling) {
97
+ // UnityEngine::MonoBehaviour::Update();
98
+ // clock_text->get_transform()->set_position(UnityEngine::Vector3(0, 1, 12.6));
99
+ // }
100
+
91
101
MAKE_HOOK_OFFSETLESS (AudioTimeSyncController_StartSong, void , AudioTimeSyncController* self, float startTimeOffset) {
92
102
AudioTimeSyncController_StartSong (self, startTimeOffset);
93
103
@@ -127,13 +137,15 @@ MAKE_HOOK_OFFSETLESS(PauseMenuManager_StartResumeAnimation, void, PauseMenuManag
127
137
MAKE_HOOK_OFFSETLESS (MultiplayerLobbyController_ActivateMultiplayerLobby, void , MultiplayerLobbyController* self) {
128
138
MultiplayerLobbyController_ActivateMultiplayerLobby (self);
129
139
130
- layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -1.9 , 3 ));
140
+ layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -0.45 , 1.62 ));
141
+ layout->get_transform ()->set_localScale (UnityEngine::Vector3 (0.35 , 0.35 , 0.35 ));
131
142
}
132
143
133
144
MAKE_HOOK_OFFSETLESS (MultiplayerLobbyController_DeactivateMultiplayerLobby, void , MultiplayerLobbyController* self) {
134
145
MultiplayerLobbyController_DeactivateMultiplayerLobby (self);
135
146
136
- layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -2.2 , 3 ));
147
+ layout->get_transform ()->set_position (UnityEngine::Vector3 (0 , -1.7 , 3.85 ));
148
+ layout->get_transform ()->set_localScale (UnityEngine::Vector3 (1.0 , 1.0 , 1.0 ));
137
149
}
138
150
139
151
// Called at the early stages of game loading
@@ -147,7 +159,7 @@ extern "C" void setup(ModInfo & info) {
147
159
148
160
rapidjson::Document::AllocatorType& allocator = getConfig ().config .GetAllocator ();
149
161
if (!getConfig ().config .HasMember (" insong" )) {
150
- getConfig ().config .AddMember (" insong" , rapidjson::Value (0 ).SetBool (false ), allocator);
162
+ getConfig ().config .AddMember (" insong" , rapidjson::Value (0 ).SetBool (true ), allocator);
151
163
getConfig ().Write ();
152
164
}
153
165
if (!getConfig ().config .HasMember (" 12Toggle" )) {
@@ -158,6 +170,26 @@ extern "C" void setup(ModInfo & info) {
158
170
getConfig ().config .AddMember (" SecToggle" , rapidjson::Value (0 ).SetBool (false ), allocator);
159
171
getConfig ().Write ();
160
172
}
173
+ if (!getConfig ().config .HasMember (" FontSize" )) {
174
+ getConfig ().config .AddMember (" FontSize" , rapidjson::Value (0 ).SetFloat (4 ), allocator);
175
+ getConfig ().Write ();
176
+ }
177
+ if (!getConfig ().config .HasMember (" BattToggle" )) {
178
+ getConfig ().config .AddMember (" BattToggle" , rapidjson::Value (0 ).SetBool (false ), allocator);
179
+ getConfig ().Write ();
180
+ }
181
+ // if (!getConfig().config.HasMember("ClockXOffset")) {
182
+ // getConfig().config.AddMember("ClockXOffset", rapidjson::Value(0).SetFloat(0), allocator);
183
+ // getConfig().Write();
184
+ // }
185
+ // if (!getConfig().config.HasMember("ClockYOffset")) {
186
+ // getConfig().config.AddMember("ClockYOffset", rapidjson::Value(0).SetFloat(0), allocator);
187
+ // getConfig().Write();
188
+ // }
189
+ // if (!getConfig().config.HasMember("ClockZOffset")) {
190
+ // getConfig().config.AddMember("ClockZOffset", rapidjson::Value(0).SetFloat(0), allocator);
191
+ // getConfig().Write();
192
+ // }
161
193
}
162
194
163
195
// Called later on in the game loading - a good time to install function hooks
0 commit comments