Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Added ruby compatibility for IngameLog.
Browse files Browse the repository at this point in the history
  • Loading branch information
RequiDev committed Aug 15, 2021
1 parent f9680eb commit cfbc0b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ReModCE/Components/IngameLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ public IngameLog()

public override void OnUiManagerInit(UiManager uiManager)
{
var cameraButton = ExtendedQuickMenu.ShortcutMenu.Find("UserIconCameraButton");

_log = new ReScrollView("ReModCELog", new Vector2(-1695, 1470f), ExtendedQuickMenu.ShortcutMenu);
var logPos = new Vector2(-1695, 1470f);
if (uiManager.IsRubyLoaded)
{
logPos.x -= 245f;
}

_log = new ReScrollView("ReModCELog", logPos, ExtendedQuickMenu.ShortcutMenu);
_log.AddText(_preUiLog);

}
Expand Down
3 changes: 3 additions & 0 deletions ReModCE/Managers/UiManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Linq;
using MelonLoader;
using ReModCE.UI;
Expand All @@ -16,10 +17,12 @@ internal class UiManager
public ReQuickMenu TargetMenu { get; }

public bool IsRemodLoaded { get; }
public bool IsRubyLoaded { get; }

public UiManager(string menuName)
{
IsRemodLoaded = MelonHandler.Mods.Any(m => m.Info.Name == "ReMod");
IsRubyLoaded = File.Exists("hid.dll");

if (!IsRemodLoaded)
{
Expand Down

0 comments on commit cfbc0b2

Please sign in to comment.