mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-12 01:21:09 -07:00
- Beta version of a fix to use hotbars on the multiple gui size/resolutions
This commit is contained in:
parent
bbbd0b61e3
commit
7b52d539e2
3 changed files with 41 additions and 10 deletions
|
|
@ -4,8 +4,13 @@ import android.os.*;
|
|||
import android.view.*;
|
||||
import android.view.View.*;
|
||||
import android.widget.*;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import net.kdt.pojavlaunch.customcontrols.*;
|
||||
import net.kdt.pojavlaunch.prefs.*;
|
||||
import net.kdt.pojavlaunch.utils.MCOptionUtils;
|
||||
|
||||
import org.lwjgl.glfw.*;
|
||||
import java.io.*;
|
||||
import com.google.gson.*;
|
||||
|
|
@ -17,6 +22,7 @@ public class MainActivity extends BaseMainActivity {
|
|||
|
||||
private View.OnClickListener mClickListener;
|
||||
private View.OnTouchListener mTouchListener;
|
||||
private FileObserver fileObserver;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
|
@ -98,6 +104,16 @@ public class MainActivity extends BaseMainActivity {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
fileObserver = new FileObserver(new File(Tools.DIR_GAME_NEW + "/options.txt"), FileObserver.MODIFY) {
|
||||
@Override
|
||||
public void onEvent(int i, @Nullable String s) {
|
||||
//FIXME Make sure the multithreading nature of this event doesn't cause any problems ?
|
||||
MCOptionUtils.load();
|
||||
}
|
||||
};
|
||||
fileObserver.startWatching();
|
||||
|
||||
ControlData[] specialButtons = ControlData.getSpecialButtons();
|
||||
specialButtons[0].specialButtonListener
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue