Any ideas why I cant change the options? Anyway to see if something else is running or smething is saved somewhere?
This is the settings when its loaded
Dim m_oSettingsWindow
Dim m_oColorPicker
Dim m_oTimerSettings
Dim m_lCurrentColor
Dim m_lCurrentIndex
Dim m_oSliderRed
Dim m_oSliderGreen
Dim m_oSliderBlue
Dim m_oButtonSet
Dim m_oButtonOK
Dim m_oButtonCancel
Dim m_oButtonDownload
Dim m_oCheckShowNPC
Dim m_oCheckShowGUI
Dim m_oCheckShowPoints
Dim m_oCheckShowPC
Dim m_oCheckShowPet
Dim m_oCheckShowObject
Dim m_oCheckShowUnknown
Dim m_oCheckShowUnknownTypeCode
Dim m_oCheckShowMining
Dim m_oCheckShowReaping
Dim m_oCheckShowQuarrying
Dim m_oCheckShowLumberjacking
Dim m_oCheckLocked
Dim m_oCheckScaling
Dim m_oCheckShowAggroRadius
Dim m_oCheckShowSearchBox
Dim m_oCheckShowPOI
Dim m_oEditMaxSearchDistance
Dim m_oEditMinSearchDistance
Dim m_oEditAggroRadius
Dim m_oEditAutoAlign
Dim m_oEditDrawDelay
Dim m_oEditMaxSeconds
Dim m_oEditSearchFoundAlert
Dim m_lColorPC
Dim m_lColorPet
Dim m_lColorObject
Dim m_lColorUnknown
Dim m_lColorUnknownTypeCode
Dim m_lColorAggroRadius
Dim m_lColorSearchBox
Dim m_lColorPOI
Dim m_bCreated
Dim m_bChanged
Dim m_hOldPen
Dim m_hOldBrush
Dim m_hNewPen
Dim m_hNewBrush
Sub ShowSettings
If m_bCreated Then Exit Sub
m_lColorAggroRadius =Radar.ColorAggro
m_lColorPC = Radar.ColorPC
m_lColorPet = Radar.ColorPet
m_lColorObject = Radar.ColorObject
m_lColorUnknown = Radar.ColorUnknown
m_lColorUnknownTypeCode = Radar.ColorUnknownTypeCode
m_lColorSearchBox = Radar.ColorSearch
m_lColorPOI = Radar.ColorPOI
m_bCreated = True
FocusWindow VGWindow
Set m_oSettingsWindow = GUI.AddWindow(GetCanvasX, GetCanvasY, "VGExtremeRadarSettings")
m_oSettingsWindow.SetTitle "VGExtremeRadar Settings"
m_oSettingsWindow.SetHeight 534
m_oSettingsWindow.SetWidth 300
m_oSettingsWindow.SetLeft Radar.RadarWindow.GetLeft + 10
m_oSettingsWindow.SetTop Radar.RadarWindow.GetTop + 64
m_oSettingsWindow.SetOnclickL "clickColor"
m_oSettingsWindow.SetLayeredWindowAttributes RGB(255, 0, 255), 0, 1
'SetWindowPos m_oSettingsWindow.GetHWND, -1, 0, 0, 200, 200, &H53 'Force topmost
m_oSettingsWindow.SetStyle &H94080044 'Windowless and borderless
'OrderWindows
Set m_oCheckLocked = m_oSettingsWindow.addcontrol("checkbox", 4, 0, "")
Set m_oCheckShowGUI = m_oSettingsWindow.addcontrol("checkbox", 4, 20, "")
Set m_oCheckScaling = m_oSettingsWindow.addcontrol("checkbox", 4, 40, "")
Set m_oCheckShowNPC = m_oSettingsWindow.addcontrol("checkbox", 4, 60, "")
Set m_oCheckShowPoints = m_oSettingsWindow.addcontrol("checkbox", 4, 80, "")
Set m_oCheckShowPC = m_oSettingsWindow.addcontrol("checkbox", 4, 100, "")
Set m_oCheckShowPet = m_oSettingsWindow.addcontrol("checkbox", 4, 120, "")
Set m_oCheckShowObject = m_oSettingsWindow.addcontrol("checkbox", 4, 140, "")
Set m_oCheckShowUnknown = m_oSettingsWindow.addcontrol("checkbox", 4, 160, "")
Set m_oCheckShowUnknownTypeCode = m_oSettingsWindow.addcontrol("checkbox", 4, 180, "")
Set m_oCheckShowMining = m_oSettingsWindow.addcontrol("checkbox", 4, 200, "")
Set m_oCheckShowReaping = m_oSettingsWindow.addcontrol("checkbox", 4, 220, "")
Set m_oCheckShowQuarrying = m_oSettingsWindow.addcontrol("checkbox", 4, 240, "")
Set m_oCheckShowLumberjacking = m_oSettingsWindow.addcontrol("checkbox", 4, 260, "")
Set m_oCheckShowAggroRadius = m_oSettingsWindow.addcontrol("checkbox", 4, 280, "")
Set m_oCheckShowSearchBox = m_oSettingsWindow.addcontrol("checkbox", 4, 300, "")
Set m_oCheckShowPOI = m_oSettingsWindow.addcontrol("checkbox", 4, 320, "")
m_oCheckLocked.SetChecked Radar.Locked
m_oCheckShowGUI.SetChecked Radar.ShowGUI
m_oCheckScaling.SetChecked Radar.Scaling
m_oCheckShowNPC.SetChecked Radar.ShowNPC
m_oCheckShowPoints.SetChecked Radar.ShowPoints
m_oCheckShowPC.SetChecked Radar.ShowPC
m_oCheckShowPet.SetChecked Radar.ShowPet
m_oCheckShowObject.SetChecked Radar.ShowObject
m_oCheckShowUnknown.SetChecked Radar.ShowUnknown
m_oCheckShowUnknownTypeCode.SetChecked Radar.ShowUnknownTypeCode
m_oCheckShowMining.SetChecked Radar.ShowMining
m_oCheckShowReaping.SetChecked Radar.ShowReaping
m_oCheckShowQuarrying.SetChecked Radar.ShowQuarrying
m_oCheckShowLumberjacking.SetChecked Radar.ShowLumberjacking
m_oCheckShowAggroRadius.SetChecked Radar.ShowAggroRadius
m_oCheckShowSearchBox.SetChecked Radar.ShowSearchBox
m_oCheckShowPOI.SetChecked Radar.ShowPOI
Set m_oEditMaxSearchDistance = m_oSettingsWindow.addcontrol("edit", 170, 340, Radar.MaxSearchDistance)
m_oEditMaxSearchDistance.SetWidth 120
m_oEditMaxSearchDistance.SetHeight 20
Set m_oEditMinSearchDistance = m_oSettingsWindow.addcontrol("edit", 170, 360, Radar.MinSearchDistance)
m_oEditMinSearchDistance.SetWidth 120
m_oEditMinSearchDistance.SetHeight 20
Set m_oEditAggroRadius = m_oSettingsWindow.addcontrol("edit", 170, 380, Radar.AggroRadius)
m_oEditAggroRadius.SetWidth 120
m_oEditAggroRadius.SetHeight 20
Set m_oEditAutoAlign = m_oSettingsWindow.addcontrol("combobox", 170, 400, "")
m_oEditAutoAlign.SetWidth 120
m_oEditAutoAlign.SetHeight 20
m_oEditAutoAlign.AddString "0 - Disabled"
m_oEditAutoAlign.AddString "1 - Top Left"
m_oEditAutoAlign.AddString "2 - Top Right"
m_oEditAutoAlign.AddString "3 - Bottom Right"
m_oEditAutoAlign.AddString "4 - Bottom Left"
m_oEditAutoAlign.AddString "5 - Centered"
m_oEditAutoAlign.AddString "6 - Maximized"
m_oEditAutoAlign.SetCaption m_oEditAutoAlign.GetString(CStr(Radar.AutoAlign))
Set m_oEditDrawDelay = m_oSettingsWindow.addcontrol("edit", 170, 420, Radar.DrawDelayMilliSeconds)
m_oEditDrawDelay.SetWidth 120
m_oEditDrawDelay.SetHeight 20
Set m_oEditMaxSeconds = m_oSettingsWindow.addcontrol("edit", 170, 440, Radar.MaxSecondsBetweenDraws)
m_oEditMaxSeconds.SetWidth 120
m_oEditMaxSeconds.SetHeight 20
Set m_oEditSearchFoundAlert = m_oSettingsWindow.addcontrol("edit", 23, 480, Radar.SearchFoundAlert)
m_oEditSearchFoundAlert.SetWidth 267
m_oEditSearchFoundAlert.SetHeight 20
Set m_oButtonDownload = m_oSettingsWindow.addcontrol("button", 100, 322, "Download")
m_oButtonDownload.SetHeight 16
m_oButtonDownload.SetWidth 70
m_oButtonDownload.SetLeftAnchor True
m_oButtonDownload.SetonPress "pressDownload"
Set m_oButtonOK = m_oSettingsWindow.addcontrol("button", 4, 506, "OK")
m_oButtonOK.SetHeight 24
m_oButtonOK.SetWidth 60
m_oButtonOK.SetLeftAnchor True
m_oButtonOK.SetonPress "pressOK"
Set m_oButtonCancel = m_oSettingsWindow.addcontrol("button", 64, 506, "Cancel")
m_oButtonCancel.SetHeight 24
m_oButtonCancel.SetWidth 60
m_oButtonCancel.SetLeftAnchor True
m_oButtonCancel.SetonPress "pressCancel"
Set m_oTimerSettings = m_oSettingsWindow.addcontrol("timer", 0, 0, "")
m_oTimerSettings.SetOnTimer "timerRedraw"
m_oTimerSettings.SetIntervalRun 100
PaintSettings
OrderWindows
FocusWindow VGWindow
Radar.Paint
End Sub
Sub timerRedraw
If m_bChanged Then
PaintSettings
m_bChanged = False
End If
End Sub
Sub PaintSettings
Dim hDC
hDC = m_oSettingsWindow.GetDC
SetBkColor hDC, RGB(128,128,128)
SetTextColor hDC, RGB(255, 255, 255)
SetBkMode hDC, 0
DrawRectangle hDC, RGB(255,0,255), 0, 0, m_oSettingsWindow.GetWidth, m_oSettingsWindow.GetHeight, True
DrawRectangle hDC, RGB(255,255,255), 0, 0, m_oSettingsWindow.GetWidth, m_oSettingsWindow.GetHeight, False
TextOut hDC, 24, 3, "Borderless"
TextOut hDC, 24, 23, "Show GUI"
TextOut hDC, 24, 43, "Scaling"
TextOut hDC, 24, 63, "Show NPC"
TextOut hDC, 24, 83, "Show Points"
TextOut hDC, 24, 103, "Show PC"
TextOut hDC, 24, 123, "Show Pet"
TextOut hDC, 24, 143, "Show Object"
TextOut hDC, 24, 163, "Show Unknown"
TextOut hDC, 24, 183, "Show Unknown Code"
TextOut hDC, 24, 203, "Show Mining"
TextOut hDC, 24, 223, "Show Reaping"
TextOut hDC, 24, 243, "Show Quarrying"
TextOut hDC, 24, 263, "Show Lumberjacking"
TextOut hDC, 24, 283, "Show Aggro Radius"
TextOut hDC, 24, 303, "Show Search Box"
TextOut hDC, 24, 323, "Show POI"
TextOut hDC, 24, 343, "Max Search Distance:"
TextOut hDC, 24, 363, "Min Search Distance:"
TextOut hDC, 24, 383, "Aggro Radius:"
TextOut hDC, 24, 403, "AutoAlign:"
TextOut hDC, 24, 423, "Draw delay in ms:"
TextOut hDC, 24, 443, "Refresh delay in secs:"
TextOut hDC, 24, 463, "Search Alert .wav:"
DrawRectangle hDC, m_lColorPC, 201, 101, 219, 119, True
DrawRectangle hDC, m_lColorPet, 201, 120, 219, 139, True
DrawRectangle hDC, m_lColorObject, 201, 140, 219, 159, True
DrawRectangle hDC, m_lColorUnknown, 201, 160, 219, 179, True
DrawRectangle hDC, m_lColorUnknownTypeCode, 201, 180, 219, 199, True
DrawRectangle hDC, m_lColorAggroRadius, 201, 280, 219, 299, True
DrawRectangle hDC, m_lColorSearchBox, 201, 300, 219, 319, True
DrawRectangle hDC, m_lColorPOI, 201, 320, 219, 339, True
m_oSettingsWindow.ReleaseDC hDC
m_oSettingsWindow.Invalidate False
End Sub
Sub DrawRectangle(p_hDC, p_lColor, p_lX, p_lY, p_lW, p_lH, p_bFill)
m_hNewPen = DLL.CreatePen(0, 1, p_lColor)
m_hOldPen = DLL.SelectObject(p_hDC, m_hNewPen)
If p_bFill Then
m_hNewBrush = DLL.CreateSolidBrush(p_lColor)
m_hOldBrush = DLL.SelectObject(p_hDC, m_hNewBrush)
Else
m_hOldBrush = DLL.SelectObject(p_hDC, DLL.GetStockObject(5)) 'Select NULL_BRUSH
End If
DLL.rectangle p_hDC, p_lX, p_lY, p_lW, p_lH
DLL.SelectObject p_hDC, m_hOldPen
DLL.SelectObject p_hDC, m_hOldBrush
DLL.DeleteObject m_hNewPen
If Not p_bFill Then
DLL.DeleteObject m_hNewBrush
End If
End Sub
Sub clickColor
Dim x
Dim y
x = GetCursorPosX - m_oSettingsWindow.GetLeft
y = GetCursorPosY - m_oSettingsWindow.GetTop
If x>200 And x<220>100 And y<120>120 And y<140>140 And y<160>160 And y<180>180 And y<200>280 And y<300>300 And y<320>320 And y<340 Then
ShowColorPicker 8, 220, 320
End If
End If
End Sub
Sub ShowColorPicker(p_lIndex, p_lX, p_lY)
m_lCurrentIndex = p_lIndex
If p_lIndex = 1 Then
m_lCurrentColor = m_lColorPC
ElseIf p_lIndex = 2 Then
m_lCurrentColor = m_lColorPet
ElseIf p_lIndex = 3 Then
m_lCurrentColor = m_lColorObject
ElseIf p_lIndex = 4 Then
m_lCurrentColor = m_lColorUnknown
ElseIf p_lIndex = 5 Then
m_lCurrentColor = m_lColorUnknownTypeCode
ElseIf p_lIndex = 6 Then
m_lCurrentColor = m_lColorAggroRadius
ElseIf p_lIndex = 7 Then
m_lCurrentColor = m_lColorSearchBox
ElseIf p_lIndex = 8 Then
m_lCurrentColor = m_lColorPOI
End If
m_oSettingsWindow.SetEnable False
Set m_oColorPicker = GUI.AddWindow(160, 60, "RadarColorPicker")
m_oColorPicker.SetStyle &H94080044 'Windowless and borderless
m_oColorPicker.SetTitle "Radar Color Picker"
'SetWindowPos m_oColorPicker.GetHWND, -1, p_lX + m_oSettingsWindow.GetLeft, p_lY + m_oSettingsWindow.GetTop, 60, 160, &H53 'Force topmost
m_oColorPicker.SetLayeredWindowAttributes RGB(255,255,255), 200, 2
'SetWindowPos m_oColorPicker.GetHWND, -1, 0, 0, 200, 200, &H53 'Force topmost
m_oColorPicker.SetStyle &H94080044 'Windowless and borderless
OrderWindows
m_oColorPicker.SetHeight 60
m_oColorPicker.SetWidth 160
m_oColorPicker.SetLeft p_lX + m_oSettingsWindow.GetLeft
m_oColorPicker.SetTop p_lY + m_oSettingsWindow.GetTop
Set m_oSliderRed = m_oColorPicker.AddControl("slider", 0, 0, "Red")
m_oSliderRed.SetHeight 20
m_oSliderRed.SetWidth 100
m_oSliderRed.SetCaption "Red"
m_oSliderRed.SetRangeMin 0
m_oSliderRed.SetRangeMax 255
m_oSliderRed.SetPos ExtractRGB_Red(m_lCurrentColor)
m_oSliderRed.SetOnThumbTrack "changeSlider"
m_oSliderRed.SetOnThumbEndTrack "releaseSlider"
Set m_oSliderGreen = m_oColorPicker.AddControl("slider", 0, 20, "Green")
m_oSliderGreen.SetHeight 20
m_oSliderGreen.SetWidth 100
m_oSliderGreen.SetCaption "Green"
m_oSliderGreen.SetRangeMin 0
m_oSliderGreen.SetRangeMax 255
m_oSliderGreen.SetPos ExtractRGB_Green(m_lCurrentColor)
m_oSliderGreen.SetOnThumbTrack "changeSlider"
m_oSliderGreen.SetOnThumbEndTrack "releaseSlider"
Set m_oSliderBlue = m_oColorPicker.AddControl("slider", 0, 40, "Blue")
m_oSliderBlue.SetHeight 20
m_oSliderBlue.SetWidth 100
m_oSliderBlue.SetCaption "Blue"
m_oSliderBlue.SetRangeMin 0
m_oSliderBlue.SetRangeMax 255
m_oSliderBlue.SetPos ExtractRGB_Blue(m_lCurrentColor)
m_oSliderBlue.SetOnThumbTrack "changeSlider"
m_oSliderBlue.SetOnThumbEndTrack "releaseSlider"
Set m_oButtonSet = m_oColorPicker.addcontrol("button", 100, 0, "OK")
m_oButtonSet.SetHeight 60
m_oButtonSet.SetWidth 60
m_oButtonSet.SetonPress "pressSet"
FocusWindow VGWindow
End Sub
Sub changeSlider
Dim lColor
lColor = RGB(m_oSliderRed.GetPos, m_oSliderGreen.GetPos, m_oSliderBlue.GetPos)
If m_lCurrentIndex = 1 Then
m_lColorPC = lColor
ElseIf m_lCurrentIndex = 2 Then
m_lColorPet = lColor
ElseIf m_lCurrentIndex = 3 Then
m_lColorObject = lColor
ElseIf m_lCurrentIndex = 4 Then
m_lColorUnknown = lColor
ElseIf m_lCurrentIndex = 5 Then
m_lColorUnknownTypeCode = lColor
ElseIf m_lCurrentIndex = 6 Then
m_lColorAggroRadius = lColor
ElseIf m_lCurrentIndex = 7 Then
m_lColorSearchBox = lColor
ElseIf m_lCurrentIndex = 8 Then
m_lColorPOI = lColor
End If
m_bChanged = True
End Sub
Sub releaseSlider
FocusWindow VGWindow
End Sub
Sub pressSet
CloseWindow m_oColorPicker.GetHWND
DeleteWindow "ColorPicker"
Set m_oColorPicker = Nothing
m_oSettingsWindow.SetEnable True
FocusWindow VGWindow
End Sub
Function CheckValidLongSetting(p_lValue, p_lDefault)
If IsNumeric(p_lValue) Then
CheckValidLongSetting = CLng(p_lValue)
Else
CheckValidLongSetting = p_lDefault
End If
End Function
Sub pressOK
Radar.ColorAggro = m_lColorAggroRadius
Radar.ColorPC = m_lColorPC
Radar.ColorPet = m_lColorPet
Radar.ColorObject = m_lColorObject
Radar.ColorUnknown = m_lColorUnknown
Radar.ColorUnknownTypeCode = m_lColorUnknownTypeCode
Radar.ColorSearch = m_lColorSearchBox
Radar.ColorPOI = m_lColorPOI
Radar.AutoAlign = CheckValidLongSetting(Left(m_oEditAutoAlign.GetCaption,1), Radar.AutoAlign)
Radar.MaxSearchDistance = CheckValidLongSetting(m_oEditMaxSearchDistance.GetCaption, Radar.MaxSearchDistance)
Radar.MinSearchDistance = CheckValidLongSetting(m_oEditMinSearchDistance.GetCaption, Radar.MinSearchDistance)
Radar.AggroRadius = CheckValidLongSetting(m_oEditAggroRadius.GetCaption, Radar.AggroRadius)
Radar.AutoAlign = CheckValidLongSetting(m_oEditAutoAlign.GetCaption, Radar.AutoAlign)
Radar.DrawDelayMilliSeconds = CheckValidLongSetting(m_oEditDrawDelay.GetCaption, Radar.DrawDelayMilliSeconds)
Radar.MaxSecondsBetweenDraws = CheckValidLongSetting(m_oEditMaxSeconds.GetCaption, Radar.MaxSecondsBetweenDraws)
Radar.SearchFoundAlert = m_oEditSearchFoundAlert.GetCaption
Radar.Locked = m_oCheckLocked.GetChecked
Radar.ShowGUI = m_oCheckShowGUI.GetChecked
Radar.Scaling = m_oCheckScaling.GetChecked
Radar.ShowNPC = m_oCheckShowNPC.GetChecked
Radar.ShowPoints = m_oCheckShowPoints.GetChecked
Radar.ShowPC = m_oCheckShowPC.GetChecked
Radar.ShowPet = m_oCheckShowPet.GetChecked
Radar.ShowObject = m_oCheckShowObject.GetChecked
Radar.ShowUnknown = m_oCheckShowUnknown.GetChecked
Radar.ShowUnknownTypeCode = m_oCheckShowUnknownTypeCode.GetChecked
Radar.ShowMining = m_oCheckShowMining.GetChecked
Radar.ShowReaping = m_oCheckShowReaping.GetChecked
Radar.ShowQuarrying = m_oCheckShowQuarrying.GetChecked
Radar.ShowLumberjacking = m_oCheckShowLumberjacking.GetChecked
Radar.ShowAggroRadius = m_oCheckShowAggroRadius.GetChecked
Radar.ShowSearchBox = m_oCheckShowSearchBox.GetChecked
Radar.ShowPOI = m_oCheckShowPOI.GetChecked
If IsObject(oProgressWindow) And CStr(TypeName(oProgressWindow) <> "Nothing") Then
CloseWindow oProgressWindow.GetHWND
DeleteWindow "DownloadingPOIs"
Set oProgressWindow = Nothing
End If
m_bCreated = False
CloseWindow m_oSettingsWindow.GetHWND
DeleteWindow "Settings"
Set m_oSettingsWindow = Nothing
Radar.SaveCharSettings
CloseWindow Radar.RadarWindow.GetHWND
DeleteWindow APP_NAME & " v" & VERSION
Radar.CreateRadar APP_NAME & " v" & VERSION, sDrawCallBack
FocusWindow VGWindow
End Sub
Sub pressCancel
If IsObject(oProgressWindow) And CStr(TypeName(oProgressWindow) <> "Nothing") Then
CloseWindow oProgressWindow.GetHWND
DeleteWindow "DownloadingPOIs"
Set oProgressWindow = Nothing
End If
m_bCreated = False
CloseWindow m_oSettingsWindow.GetHWND
DeleteWindow "Settings"
Set m_oSettingsWindow = Nothing
FocusWindow VGWindow
End Sub
|