nanoblox / core

https://nanoblox.github.io/core/
Mozilla Public License 2.0
56 stars 17 forks source link

Topbar+ Controller and console support #25

Closed Lucke0051 closed 4 years ago

1ForeverHD commented 4 years ago

A wonderful enhancement for console users, thanks lucke! Here's a few things you'll need to change:

Modifications

  1. Change method setContainerMode(mode) to enableControllerMode(bool) - this limits the scope to true/false and makes it easier to understand for outside users

  2. Make isControllerMode a local function instead of a method

  3. Make isConsoleMode a local function instead of a method

  4. Make updateDevice a local function instead of a method

Bugs

  1. If you call game:GetService("StarterGui"):SetCore("TopbarEnabled", false) then plug-in a controller, the d-pad action image and topbar will still appear. This enables players to cheat by plugging in a controller whenever they want to re-enable their topbar.

  2. Calling game:GetService("StarterGui"):SetCore("TopbarEnabled", false) when a controller is plugged in does not hide the dpad icon, enabling users to still continue using topbar.

  3. When you press dpad-down, then A (to select highlighted icon) before toggling left/right, it makes your character jump instead of clicking the highlighted button