Skip to content

Manual hotbar v1.0.1#94

Open
prodbyichigo wants to merge 3 commits intomainfrom
Manual-Hotbar-v1.0.1
Open

Manual hotbar v1.0.1#94
prodbyichigo wants to merge 3 commits intomainfrom
Manual-Hotbar-v1.0.1

Conversation

@prodbyichigo
Copy link
Member

No description provided.

Noobyguy775 and others added 3 commits September 4, 2024 22:06
I will explain each change more in the commit commits
Rewrote SOME old functions though i dont think this has to be the BEST coding ever, just rewrote some really nested parts and cleaned up grammar in some error messages,
@prodbyichigo prodbyichigo requested a review from a team February 8, 2026 00:20
Copy link
Contributor

@Myurius Myurius left a comment

Choose a reason for hiding this comment

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

Pretty quick non thorough review


ReloadScript(ahkpath)
{
static cmd := DllCall("GetCommandLine", "Str"), params := DllCall("shlwapi\PathGetArgs","Str",cmd,"Str")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really any need for these to be static considering that this function only runs once

global
if (ManualHotbarButton1 && ManualHotbarButton2 && ManualHotbarButton3 && ManualHotbarButton4 && ManualHotbarButton5 && ManualHotbarButton6 && ManualHotbarButton7) or (!ManualHotbarArmed1 && !ManualHotbarArmed2 && !ManualHotbarArmed3 && !ManualHotbarArmed4 && !ManualHotbarArmed5 && !ManualHotbarArmed6 && !ManualHotbarArmed7)
return
ManualHotbar["UnlockButton"].Visible :=0
Copy link
Contributor

Choose a reason for hiding this comment

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

Up to you, but personally i would change all boolean 1/0s to true/false just to show the intent a bit better


nm_UnlockHotbar(*){
global
if (ManualHotbarButton1 && ManualHotbarButton2 && ManualHotbarButton3 && ManualHotbarButton4 && ManualHotbarButton5 && ManualHotbarButton6 && ManualHotbarButton7) or (!ManualHotbarArmed1 && !ManualHotbarArmed2 && !ManualHotbarArmed3 && !ManualHotbarArmed4 && !ManualHotbarArmed5 && !ManualHotbarArmed6 && !ManualHotbarArmed7)
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is really long, maybe shorten it down by comparing 2 variables instead

nm_saveManualHotbarGui(*){
wp := Buffer(44)
DllCall("GetWindowPlacement", "UInt", ManualHotbar.Hwnd, "Ptr", wp)
x := NumGet(wp, 28, "Int"), y := NumGet(wp, 32, "Int")
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty sure we can do all this by using built in functions instead


nm_ToggleManualHotbar(GuiCtrl, param?,*){
global
num := SubStr(GuiCtrl.Name, -1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rename this to something more descriptive rather than num if it's intended to be a global

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.

4 participants