GTNewHorizons / Applied-Energistics-2-Unofficial

Unofficial AE2 for 1.7.10 which is still supported,which is like the extraterrestrial technology.
GNU Lesser General Public License v3.0
42 stars 97 forks source link

add different function for left and right key in ore dictionary filter gui #555

Closed MCTBL closed 2 months ago

MCTBL commented 2 months ago

https://github.com/user-attachments/assets/076711c5-ef98-4292-97ac-f39260ddca1f

If drag some ore and click the text field before will clear it and insert new ore dict of what you hold.

Now if use left click will not clear it but append new ore dict at the end of the text field. Right click will clear it like used to be.

MCTBL commented 2 months ago

It can reduce the if-else to one line under textField.setText((Mouse.isButtonDown(0) ? textField.getText() : "") + OreDictionary.getOreName(ores[0])); but i think it will make code less readable

slprime commented 2 months ago

What do you think about the "or" separator?

slprime commented 2 months ago

It can reduce the if-else to one line under textField.setText((Mouse.isButtonDown(0) ? textField.getText() : "") + OreDictionary.getOreName(ores[0])); but i think it will make code less readable

no need to shorten

MCTBL commented 2 months ago

What do you think about the "or" separator?

I don't really get it.🤔

MCTBL commented 2 months ago

It can reduce the if-else to one line under textField.setText((Mouse.isButtonDown(0) ? textField.getText() : "") + OreDictionary.getOreName(ores[0])); but i think it will make code less readable

no need to shorten

i think so

MCTBL commented 2 months ago

What do you think about the "or" separator?

u mean left click or text field is not empty? if(Mouse.isButtonDown(0) || textField.getText().length() != 0) like this?

slprime commented 2 months ago

What do you think about the "or" separator?

u mean left click or text field is not empty? if(Mouse.isButtonDown(0) || textField.getText().length() != 0) like this?

no, i meant that when a new oredict is added it is separated from the previous one |

MCTBL commented 2 months ago

What do you think about the "or" separator?

u mean left click or text field is not empty? if(Mouse.isButtonDown(0) || textField.getText().length() != 0) like this?

no, i meant that when a new oredict is added it is separated from the previous one |

oh, you mean add to text field🤣 but some time palyer may need & but not |?

slprime commented 2 months ago

What do you think about the "or" separator?

u mean left click or text field is not empty? if(Mouse.isButtonDown(0) || textField.getText().length() != 0) like this?

no, i meant that when a new oredict is added it is separated from the previous one |

oh, you mean add to text field🤣 but some time palyer may need & but not |?

yes, we don't know what separator to insert, but we know that it definitely should be. by default i recommend set |. if the player needs another separator, he will change it

P.S. English is not my main language 😃

MCTBL commented 2 months ago

or add more if-else, when shift is press will auto add | and if ctrl is press will auto add &? may too complex?

P.S. Me too

slprime commented 2 months ago

or add more if-else, when shift is press will auto add | and if ctrl is press will auto add &? may too complex?

too complex

MCTBL commented 2 months ago

or add more if-else, when shift is press will auto add | and if ctrl is press will auto add &? may too complex?

too complex

so just add | by default?

slprime commented 2 months ago

or add more if-else, when shift is press will auto add | and if ctrl is press will auto add &? may too complex?

too complex

so just add | by default?

yes, because without separator or with & separator filter always return empty list which doesn't make sense

MCTBL commented 2 months ago

image

it will auto add | now