mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.9.4.1
This commit is contained in:
@@ -32,7 +32,7 @@ public class IptEventType_ {
|
||||
if (ary.length == 0) return IptEventType_.None;
|
||||
int newVal = ary[0].Val();
|
||||
for (int i = 1; i < ary.length; i++)
|
||||
newVal = Enm_.Flip_int(true, newVal, ary[i].Val());
|
||||
newVal = Bitmask_.Flip_int(true, newVal, ary[i].Val());
|
||||
return getOrNew_(newVal);
|
||||
}
|
||||
static IptEventType getOrNew_(int v) {
|
||||
@@ -46,7 +46,7 @@ public class IptEventType_ {
|
||||
}
|
||||
@gplx.Internal protected static boolean Has(IptEventType val, IptEventType find) {
|
||||
if (find == IptEventType_.None && val != IptEventType_.None) return false; // check .None manually b/c 0 is identity when BitShifting
|
||||
return Enm_.Has_int(val.Val(), find.Val());
|
||||
return Bitmask_.Has_int(val.Val(), find.Val());
|
||||
}
|
||||
public static IptEventType default_(IptArg[] args) {
|
||||
IptEventType rv = IptEventType_.None;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class IptKey implements IptArg {
|
||||
public boolean Eq(IptArg comp) {return String_.Eq(key, comp.Key());}
|
||||
public String XtoUiStr() {return IptKeyStrMgr._.To_str(this);}
|
||||
public IptKey Add(IptKey comp) {return IptKey_.add_(this, comp);}
|
||||
public boolean Mod_shift() {return Enm_.Has_int(val, IptKey_.Shift.Val());}
|
||||
public boolean Mod_ctrl() {return Enm_.Has_int(val, IptKey_.Ctrl.Val());}
|
||||
public boolean Mod_alt() {return Enm_.Has_int(val, IptKey_.Alt.Val());}
|
||||
public boolean Mod_shift() {return Bitmask_.Has_int(val, IptKey_.Shift.Val());}
|
||||
public boolean Mod_ctrl() {return Bitmask_.Has_int(val, IptKey_.Ctrl.Val());}
|
||||
public boolean Mod_alt() {return Bitmask_.Has_int(val, IptKey_.Alt.Val());}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class IptKey_ {
|
||||
if (ary.length == 0) return IptKey_.None;
|
||||
int newVal = ary[0].Val();
|
||||
for (int i = 1; i < ary.length; i++)
|
||||
newVal = Enm_.Flip_int(true, newVal, ary[i].Val());
|
||||
newVal = Bitmask_.Flip_int(true, newVal, ary[i].Val());
|
||||
return get_or_new_(newVal);
|
||||
}
|
||||
public static IptKey api_(int val) {
|
||||
@@ -138,9 +138,9 @@ public class IptKey_ {
|
||||
}
|
||||
public static String To_str(int val) {
|
||||
String mod_str = "", rv = "";
|
||||
boolean mod_c = Enm_.Has_int(val, IptKey_.Ctrl.Val()); if (mod_c) {mod_str += "c"; val = Enm_.Flip_int(Bool_.N, val, IptKey_.Ctrl.Val());}
|
||||
boolean mod_a = Enm_.Has_int(val, IptKey_.Alt.Val()); if (mod_a) {mod_str += "a"; val = Enm_.Flip_int(Bool_.N, val, IptKey_.Alt.Val());}
|
||||
boolean mod_s = Enm_.Has_int(val, IptKey_.Shift.Val()); if (mod_s) {mod_str += "s"; val = Enm_.Flip_int(Bool_.N, val, IptKey_.Shift.Val());}
|
||||
boolean mod_c = Bitmask_.Has_int(val, IptKey_.Ctrl.Val()); if (mod_c) {mod_str += "c"; val = Bitmask_.Flip_int(Bool_.N, val, IptKey_.Ctrl.Val());}
|
||||
boolean mod_a = Bitmask_.Has_int(val, IptKey_.Alt.Val()); if (mod_a) {mod_str += "a"; val = Bitmask_.Flip_int(Bool_.N, val, IptKey_.Alt.Val());}
|
||||
boolean mod_s = Bitmask_.Has_int(val, IptKey_.Shift.Val()); if (mod_s) {mod_str += "s"; val = Bitmask_.Flip_int(Bool_.N, val, IptKey_.Shift.Val());}
|
||||
if (String_.Len_gt_0(mod_str)) {
|
||||
rv = "mod." + mod_str;
|
||||
if (val == 0) return rv; // handle modifiers only, like "mod.cs"; else will be "mod.cs+key.#0"
|
||||
|
||||
Reference in New Issue
Block a user