mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
The radar ui can now be moved
This commit is contained in:
13
nui/radar.js
13
nui/radar.js
@@ -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" ) ) {
|
||||
|
||||
Reference in New Issue
Block a user