Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve sliders #207

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions Main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7298,10 +7298,10 @@ Function DrawMenu()

y=y+30*MenuScale

ScreenGamma = (SlideBar(x + 270*MenuScale, y+6*MenuScale, 100*MenuScale, ScreenGamma*50.0)/50.0)
ScreenGamma = (SlideBar(x + 270*MenuScale, y+6*MenuScale, 100*MenuScale, ScreenGamma*50.0, 1)/50.0)
Color 255,255,255
AAText(x, y, "Screen gamma")
If MouseOn(x+270*MenuScale,y+6*MenuScale,100*MenuScale+14,20) And OnSliderID=0
If (MouseOn(x+270*MenuScale,y+6*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=1
DrawOptionsTooltip(tx,ty,tw,th,"gamma",ScreenGamma)
EndIf

Expand Down Expand Up @@ -7352,20 +7352,20 @@ Function DrawMenu()
;[Block]
y = y + 50*MenuScale

MusicVolume = (SlideBar(x + 250*MenuScale, y-4*MenuScale, 100*MenuScale, MusicVolume*100.0)/100.0)
MusicVolume = (SlideBar(x + 250*MenuScale, y-4*MenuScale, 100*MenuScale, MusicVolume*100.0, 1)/100.0)
Color 255,255,255
AAText(x, y, "Music volume:")
If MouseOn(x+250*MenuScale,y-4*MenuScale,100*MenuScale+14,20)
If (MouseOn(x+250*MenuScale,y-4*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=1
DrawOptionsTooltip(tx,ty,tw,th,"musicvol",MusicVolume)
EndIf

y = y + 30*MenuScale

PrevSFXVolume = (SlideBar(x + 250*MenuScale, y-4*MenuScale, 100*MenuScale, SFXVolume*100.0)/100.0)
PrevSFXVolume = (SlideBar(x + 250*MenuScale, y-4*MenuScale, 100*MenuScale, SFXVolume*100.0, 2)/100.0)
If (Not DeafPlayer) Then SFXVolume# = PrevSFXVolume#
Color 255,255,255
AAText(x, y, "Sound volume:")
If MouseOn(x+250*MenuScale,y-4*MenuScale,100*MenuScale+14,20)
If (MouseOn(x+250*MenuScale,y-4*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=2
DrawOptionsTooltip(tx,ty,tw,th,"soundvol",PrevSFXVolume)
EndIf

Expand All @@ -7374,7 +7374,7 @@ Function DrawMenu()
Color 100,100,100
AAText x, y, "Sound auto-release:"
EnableSFXRelease = DrawTick(x + 270 * MenuScale, y + MenuScale, EnableSFXRelease,True)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th+220*MenuScale,"sfxautorelease")
EndIf

Expand All @@ -7383,7 +7383,7 @@ Function DrawMenu()
Color 100,100,100
AAText x, y, "Enable user tracks:"
EnableUserTracks = DrawTick(x + 270 * MenuScale, y + MenuScale, EnableUserTracks,True)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"usertrack")
EndIf

Expand All @@ -7397,7 +7397,7 @@ Function DrawMenu()
Else
AAText x, y + 20 * MenuScale, "Random"
EndIf
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"usertrackmode")
EndIf
;DrawButton(x, y + 30 * MenuScale, 190 * MenuScale, 25 * MenuScale, "Scan for User Tracks",False)
Expand All @@ -7411,10 +7411,10 @@ Function DrawMenu()
;[Block]
y = y + 50*MenuScale

MouseSens = (SlideBar(x + 270*MenuScale, y-4*MenuScale, 100*MenuScale, (MouseSens+0.5)*100.0)/100.0)-0.5
MouseSens = (SlideBar(x + 270*MenuScale, y-4*MenuScale, 100*MenuScale, (MouseSens+0.5)*100.0, 1)/100.0)-0.5
Color(255, 255, 255)
AAText(x, y, "Mouse sensitivity:")
If MouseOn(x+270*MenuScale,y-4*MenuScale,100*MenuScale+14,20)
If (MouseOn(x+270*MenuScale,y-4*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=1
DrawOptionsTooltip(tx,ty,tw,th,"mousesensitivity",MouseSens)
EndIf

Expand All @@ -7423,16 +7423,16 @@ Function DrawMenu()
Color(255, 255, 255)
AAText(x, y, "Invert mouse Y-axis:")
InvertMouse = DrawTick(x + 270 * MenuScale, y + MenuScale, InvertMouse)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"mouseinvert")
EndIf

y = y + 40*MenuScale

MouseSmooth = (SlideBar(x + 270*MenuScale, y-4*MenuScale, 100*MenuScale, (MouseSmooth)*50.0)/50.0)
MouseSmooth = (SlideBar(x + 270*MenuScale, y-4*MenuScale, 100*MenuScale, (MouseSmooth)*50.0, 2)/50.0)
Color(255, 255, 255)
AAText(x, y, "Mouse smoothing:")
If MouseOn(x+270*MenuScale,y-4*MenuScale,100*MenuScale+14,20)
If (MouseOn(x+270*MenuScale,y-4*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=2
DrawOptionsTooltip(tx,ty,tw,th,"mousesmoothing",MouseSmooth)
EndIf

Expand Down Expand Up @@ -7464,7 +7464,7 @@ Function DrawMenu()
AAText(x, y + 200 * MenuScale, "Open/Close Console")
InputBox(x + 200 * MenuScale, y + 200 * MenuScale,100*MenuScale,20*MenuScale,KeyName(Min(KEY_CONSOLE,210)),12)

If MouseOn(x,y,300*MenuScale,220*MenuScale)
If MouseOn(x,y,300*MenuScale,220*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"controls")
EndIf

Expand Down Expand Up @@ -7505,7 +7505,7 @@ Function DrawMenu()
Color 255,255,255
AAText(x, y, "Show HUD:")
HUDenabled = DrawTick(x + 270 * MenuScale, y + MenuScale, HUDenabled)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"hud")
EndIf

Expand All @@ -7514,7 +7514,7 @@ Function DrawMenu()
Color 255,255,255
AAText(x, y, "Enable console:")
CanOpenConsole = DrawTick(x +270 * MenuScale, y + MenuScale, CanOpenConsole)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"consoleenable")
EndIf

Expand All @@ -7523,7 +7523,7 @@ Function DrawMenu()
Color 255,255,255
AAText(x, y, "Open console on error:")
ConsoleOpening = DrawTick(x + 270 * MenuScale, y + MenuScale, ConsoleOpening)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"consoleerror")
EndIf

Expand All @@ -7532,7 +7532,7 @@ Function DrawMenu()
Color 255,255,255
AAText(x, y, "Achievement popups:")
AchvMSGenabled% = DrawTick(x + 270 * MenuScale, y, AchvMSGenabled%)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"achpopup")
EndIf

Expand All @@ -7541,7 +7541,7 @@ Function DrawMenu()
Color 255,255,255
AAText(x, y, "Show FPS:")
ShowFPS% = DrawTick(x + 270 * MenuScale, y, ShowFPS%)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"showfps")
EndIf

Expand All @@ -7555,19 +7555,19 @@ Function DrawMenu()
;CurrFrameLimit# = (SlideBar(x + 150*MenuScale, y+30*MenuScale, 100*MenuScale, CurrFrameLimit#*50.0)/50.0)
;CurrFrameLimit = Max(CurrFrameLimit, 0.1)
;Framelimit% = CurrFrameLimit#*100.0
CurrFrameLimit# = (SlideBar(x + 150*MenuScale, y+30*MenuScale, 100*MenuScale, CurrFrameLimit#*99.0)/99.0)
CurrFrameLimit# = (SlideBar(x + 150*MenuScale, y+30*MenuScale, 100*MenuScale, CurrFrameLimit#*99.0, 1)/99.0)
CurrFrameLimit# = Max(CurrFrameLimit, 0.01)
Framelimit% = 19+(CurrFrameLimit*100.0)
Color 255,255,0
AAText(x + 5 * MenuScale, y + 25 * MenuScale, Framelimit%+" FPS")
If MouseOn(x+150*MenuScale,y+30*MenuScale,100*MenuScale+14,20)
If (MouseOn(x+150*MenuScale,y+30*MenuScale,100*MenuScale+14,20) And OnSliderID=0) Or OnSliderID=1
DrawOptionsTooltip(tx,ty,tw,th,"framelimit",Framelimit)
EndIf
Else
CurrFrameLimit# = 0.0
Framelimit = 0
EndIf
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"framelimit",Framelimit)
EndIf

Expand Down Expand Up @@ -7601,7 +7601,7 @@ Function DrawMenu()
;ReloadAAFont()
AATextEnable_Prev% = AATextEnable
EndIf
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale)
If MouseOn(x+270*MenuScale,y+MenuScale,20*MenuScale,20*MenuScale) And OnSliderID=0
DrawOptionsTooltip(tx,ty,tw,th,"antialiastext")
EndIf
;[End Block]
Expand Down
Loading