The radar ui can now be moved

This commit is contained in:
Dan
2019-12-05 19:31:13 +00:00
parent 4184138e24
commit 624ac969cd
3 changed files with 66 additions and 14 deletions

View File

@@ -311,6 +311,10 @@ function sendData( name, data ) {
}
// UI stuff
elements.closeUiBtn.click( function() {
toggleUISettings();
} )
function toggleUISettings()
{
elements.uiSettingsBox.fadeToggle();
@@ -323,6 +327,15 @@ function hideUISettings()
}
}
elements.uiSettingsBox.find( "button" ).each( function( i, obj ) {
if ( $( this ).attr( "data-value" ) ) {
$( this ).click( function() {
let align = $( this ).data( "value" );
elements.radar.removeClass().addClass( align );
} )
}
} );
// This runs when the JS file is loaded, loops through all of the remote buttons and assigns them an onclick function
elements.remote.find( "button" ).each( function( i, obj ) {
if ( $( this ).attr( "data-nuitype" ) ) {