Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,14 @@ WindowMsgHandledType GadgetHorizontalSliderSystem( GameWindow *window, UnsignedI
Int newPos = (Int)mData1;
GameWindow *child = window->winGetChild();

if( newPos < s->minVal || newPos > s->maxVal )
Comment thread
Skyaero42 marked this conversation as resolved.
break;
// TheSuperHackers @fix No longer reject out of bounds positions to prevent
// reset of custom option.ini settings to 0.

s->position = newPos;

// Translate to window coords
newPos = (Int)((newPos - s->minVal) * s->numTicks);
newPos = clamp(0, newPos, (Int)((s->maxVal - s->minVal) * s->numTicks));

child->winSetPosition( newPos , HORIZONTAL_SLIDER_THUMB_POSITION );
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,14 @@ WindowMsgHandledType GadgetVerticalSliderSystem( GameWindow *window, UnsignedInt
Int newPos = (Int)mData1;
GameWindow *child = window->winGetChild();

if (newPos < s->minVal || newPos > s->maxVal)
break;
// TheSuperHackers @fix No longer reject out of bounds positions to prevent
// reset of custom option.ini settings to 0.

s->position = newPos;

// Translate to window coords
newPos = (Int)((s->maxVal - newPos) * s->numTicks);
newPos = clamp(0, newPos, (Int)((s->maxVal - s->minVal) * s->numTicks));
Comment thread
xezon marked this conversation as resolved.

child->winSetPosition( 0, newPos );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,14 @@ WindowMsgHandledType GadgetHorizontalSliderSystem( GameWindow *window, UnsignedI
Int newPos = (Int)mData1;
GameWindow *child = window->winGetChild();

if( newPos < s->minVal || newPos > s->maxVal )
break;
// TheSuperHackers @fix No longer reject out of bounds positions to prevent
// reset of custom option.ini settings to 0.

s->position = newPos;

// Translate to window coords
newPos = (Int)((newPos - s->minVal) * s->numTicks);
newPos = clamp(0, newPos, (Int)((s->maxVal - s->minVal) * s->numTicks));

child->winSetPosition( newPos , HORIZONTAL_SLIDER_THUMB_POSITION );
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,14 @@ WindowMsgHandledType GadgetVerticalSliderSystem( GameWindow *window, UnsignedInt
Int newPos = (Int)mData1;
GameWindow *child = window->winGetChild();

if (newPos < s->minVal || newPos > s->maxVal)
break;
// TheSuperHackers @fix No longer reject out of bounds positions to prevent
// reset of custom option.ini settings to 0.

s->position = newPos;

// Translate to window coords
newPos = (Int)((s->maxVal - newPos) * s->numTicks);
newPos = clamp(0, newPos, (Int)((s->maxVal - s->minVal) * s->numTicks));

child->winSetPosition( 0, newPos );

Expand Down
Loading