Skip to content

Commit c219c67

Browse files
committed
update for ksp 1.8.x
1 parent b8d07ac commit c219c67

7 files changed

Lines changed: 128 additions & 119 deletions

File tree

BDAnimationModules/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
// Build Number
3030
// Revision
3131
//
32-
[assembly: AssemblyVersion("0.6.5.7")]
33-
[assembly: AssemblyFileVersion("0.6.5.7")]
32+
[assembly: AssemblyVersion("0.6.5.8")]
33+
[assembly: AssemblyFileVersion("0.6.5.8")]

BDAnimationModules/FSUsed/BDFSGUIPopup.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ public BDFSGUIPopup(int Windowlayer, Rect windowDimensions, string windowName)
9595
windowRect.y += (moduleID * windowRect.height) + 20;
9696
}
9797

98-
private void drawElement(PopupElement element)
98+
private void DrawElement(PopupElement element)
9999
{
100100
if (element.showElement)
101101
{
102102
if (element.style == null)
103103
{
104-
element.setStyle(GUI.skin.textArea); //GUI.skin.textArea
104+
element.SetStyle(GUI.skin.textArea); //GUI.skin.textArea
105105
}
106106
int activeElements = 0;
107107
if (element.useTitle) activeElements++;
@@ -176,13 +176,13 @@ private void drawElement(PopupElement element)
176176
}
177177
}
178178

179-
private void drawWindow(int windowID)
179+
private void DrawWindow(int windowID)
180180
{
181181
windowRect.height = marginTop + marginBottom - lineSpacing;
182182
lastSectionTop = 0f;
183183
foreach (PopupSection section in sections)
184184
{
185-
drawSection(section);
185+
DrawSection(section);
186186
lastSectionTop += lastElementTop;
187187
}
188188

@@ -197,7 +197,7 @@ private void drawWindow(int windowID)
197197
GUI.DragWindow();
198198
}
199199

200-
private void drawSection(PopupSection section)
200+
private void DrawSection(PopupSection section)
201201
{
202202
if (section.showSection)
203203
{
@@ -206,7 +206,7 @@ private void drawSection(PopupSection section)
206206
//windowRect.height = ((float)section.elements.Count * (elementSize.y + lineSpacing)) + marginTop + marginBottom;
207207
for (int i = 0; i < section.elements.Count; i++)
208208
{
209-
drawElement(section.elements[i]);
209+
DrawElement(section.elements[i]);
210210
windowRect.height += section.elements[i].height + lineSpacing;
211211
}
212212
}
@@ -220,15 +220,15 @@ private void drawSection(PopupSection section)
220220
//}
221221
}
222222

223-
public void popup()
223+
public void Popup()
224224
{
225225
if (HighLogic.LoadedSceneIsEditor)
226226
{
227227
if (useInEditor)
228228
{
229229
if (showMenu)
230230
{
231-
windowRect = GUI.Window(GUIlayer, windowRect, drawWindow, windowTitle);
231+
windowRect = GUI.Window(GUIlayer, windowRect, DrawWindow, windowTitle);
232232
}
233233
}
234234
else if (useInActionEditor)
@@ -237,7 +237,7 @@ public void popup()
237237
{
238238
if (showMenu)
239239
{
240-
windowRect = GUI.Window(GUIlayer, windowRect, drawWindow, windowTitle);
240+
windowRect = GUI.Window(GUIlayer, windowRect, DrawWindow, windowTitle);
241241
}
242242

243243
showMenu = false;
@@ -270,14 +270,14 @@ public void popup()
270270
{
271271
if (showMenu && parentPart.vessel.isActiveVessel)
272272
{
273-
windowRect = GUI.Window(GUIlayer, windowRect, drawWindow, windowTitle);
273+
windowRect = GUI.Window(GUIlayer, windowRect, DrawWindow, windowTitle);
274274
}
275275
}
276276
if (useInMenus && !HighLogic.LoadedSceneIsFlight && !HighLogic.LoadedSceneIsEditor)
277277
{
278278
if (showMenu)
279279
{
280-
windowRect = GUI.Window(GUIlayer, windowRect, drawWindow, windowTitle);
280+
windowRect = GUI.Window(GUIlayer, windowRect, DrawWindow, windowTitle);
281281
}
282282
}
283283
//return optionEnabled;
@@ -328,12 +328,12 @@ public class PopupElement
328328
bool wordWrap = true;
329329
bool richText = true;
330330

331-
public void setStyle(GUIStyle _baseStyle)
331+
public void SetStyle(GUIStyle _baseStyle)
332332
{
333-
setStyle(textColor, wordWrap, richText, _baseStyle);
333+
SetStyle(textColor, wordWrap, richText, _baseStyle);
334334
}
335335

336-
public void setStyle(Color _textColor, bool _wordWrap, bool _richText, GUIStyle _baseStyle)
336+
public void SetStyle(Color _textColor, bool _wordWrap, bool _richText, GUIStyle _baseStyle)
337337
{
338338
style = new GUIStyle(_baseStyle);
339339
style.normal.textColor = _textColor;
@@ -415,33 +415,33 @@ public class PopupButton
415415
Color normalColor = Color.white;
416416
Color disabledColor = Color.gray;
417417

418-
public void setupGUIStyle()
418+
public void SetupGUIStyle()
419419
{
420420
style = new GUIStyle(); //GUI.skin.GetStyle("Button"));
421421
//style.normal.background = texture;
422422
//style.border = new RectOffset(1,1,1,1);
423423
style.alignment = TextAnchor.LowerCenter;
424424
}
425425

426-
public void setTexture(Texture2D normalTexture, Texture2D hoverTexture, Texture2D focusedTexture, Texture2D activeTexture)
426+
public void SetTexture(Texture2D normalTexture, Texture2D hoverTexture, Texture2D focusedTexture, Texture2D activeTexture)
427427
{
428428
style.normal.background = normalTexture;
429429
style.hover.background = hoverTexture;
430430
style.focused.background = focusedTexture;
431431
style.active.background = activeTexture;
432432
}
433433

434-
public void setTexture(Texture2D allStatesTextures)
434+
public void SetTexture(Texture2D allStatesTextures)
435435
{
436-
setTexture(allStatesTextures, allStatesTextures, allStatesTextures, allStatesTextures);
436+
SetTexture(allStatesTextures, allStatesTextures, allStatesTextures, allStatesTextures);
437437
}
438438

439-
private bool _styleSelected;
440-
public bool styleSelected
439+
private bool _StyleSelected;
440+
public bool StyleSelected
441441
{
442442
set
443443
{
444-
_styleSelected = value;
444+
_StyleSelected = value;
445445
if (value)
446446
{
447447
style.normal.textColor = selectedColor;
@@ -453,16 +453,16 @@ public bool styleSelected
453453
}
454454
get
455455
{
456-
return _styleSelected;
456+
return _StyleSelected;
457457
}
458458
}
459459

460-
private bool _styleDisabled;
461-
public bool styleDisabled
460+
private bool _StyleDisabled;
461+
public bool StyleDisabled
462462
{
463463
set
464464
{
465-
_styleDisabled = value;
465+
_StyleDisabled = value;
466466
if (value)
467467
{
468468
style.normal.textColor = disabledColor;
@@ -474,7 +474,7 @@ public bool styleDisabled
474474
}
475475
get
476476
{
477-
return _styleDisabled;
477+
return _StyleDisabled;
478478
}
479479
}
480480

@@ -533,7 +533,7 @@ public PopupButton(string text, float width, RunIDFunctionString function, strin
533533
//setupGUIStyle();
534534
}
535535

536-
public void toggle(bool newState)
536+
public void Toggle(bool newState)
537537
{
538538
toggleState = newState;
539539
if (newState)

BDAnimationModules/FSwheel/FSBDWheelClass.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class FSBDWheelClass
99
public bool useSuspension = false;
1010

1111
public float screechCountdown = 0f;
12-
public FSBDparticleFX smokeFX;
12+
public Firespitter.FSBDparticleFX smokeFX;
1313
public GameObject fxLocation = new GameObject();
1414

1515
private float deltaRPM = 0f;
@@ -21,7 +21,7 @@ public FSBDWheelClass(WheelCollider _wheelCollider, Transform _wheelMesh, Transf
2121
wheelCollider = _wheelCollider;
2222
wheelMesh = _wheelMesh;
2323
suspensionParent = _suspensionParent;
24-
setupFxLocation();
24+
SetupFxLocation();
2525
}
2626

2727
public FSBDWheelClass(WheelCollider _wheelCollider)
@@ -31,13 +31,13 @@ public FSBDWheelClass(WheelCollider _wheelCollider)
3131
useSuspension = false;
3232
}
3333

34-
public void setupFxLocation()
34+
public void SetupFxLocation()
3535
{
3636
fxLocation.transform.parent = suspensionParent;
3737
fxLocation.transform.localPosition = new Vector3(0f, 0, -wheelCollider.radius); //
3838
}
3939

40-
public float getDeltaRPM()
40+
public float GetDeltaRPM()
4141
{
4242
deltaRPM = oldRPM - wheelCollider.rpm;
4343
oldRPM = wheelCollider.rpm;

BDAnimationModules/FSwheel/FSBDWheelList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void Create(List<WheelCollider> colliders, List<Transform> wheelMeshes, L
3838
{
3939
wheels[i].wheelMesh = wheelMeshes[i];
4040
wheels[i].useRotation = true;
41-
wheels[i].setupFxLocation();
41+
wheels[i].SetupFxLocation();
4242
}
4343
}
4444
}

0 commit comments

Comments
 (0)