Skip to content

Type improvements & Bugfix - #2

Open
Jeremoiii wants to merge 14 commits into
RocwoDev:mainfrom
Jeremoiii:main
Open

Type improvements & Bugfix#2
Jeremoiii wants to merge 14 commits into
RocwoDev:mainfrom
Jeremoiii:main

Conversation

@Jeremoiii

Copy link
Copy Markdown
  • improved typing
  • fixed type errors
  • fixed bugs
  • refactored code

(not tested yet but I didn't really changed anything significant to the codebase)

@RocwoDev RocwoDev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small changes so i can merge it 😉

Comment thread src/components/Util.lua
@@ -5,11 +5,19 @@
---

function math.round(num, numDecimalPlaces)

@RocwoDev RocwoDev Apr 16, 2024

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New round function is :

function math.round(value, numDecimalPlaces)
	if numDecimalPlaces then
		local power = 10^numDecimalPlaces
		return math.floor((value * power) + 0.5) / (power)
	else
		return math.floor(value + 0.5)
	end
end

Pull request : #3

Comment thread example.lua
MainMenu.EnableMouse = true;

local SubMenu = RageUI.CreateSubMenu(MainMenu, "Title", "SubTitle")
local SubMenu = RageUI.CreateSubMenu(MainMenu, "Title", "SubTitle") --[[@as RageUIMenus (change return vaules to mach type?)]]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vaules -> values

@RocwoDev RocwoDev self-assigned this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants