-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard #659
base: dev/0.8
Are you sure you want to change the base?
Keyboard #659
Conversation
…and simple screen to unlock the mouse
…oard Also fixed colored messages for the memory card and cleaned up the translation keys
So the keyboard works now I now want to remove JEI from the keyboard screen and place a little info text at the top The last thing I need to do is to implement this as a smart glasses module |
…dule keybind. I will see what I will do with the hotkey module or if I will create a new Keybind I've created two new nbt tags to bind the module to the glasses to sync that to the container, I am not sure if there is maybe a better way, but it works
…it was bound to different glasses before
I think everything is done now. Mouse and keyboard events are working, I got the little info text rendered, JEI does not render anymore and everything works fine as a glasses module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just have some detail need to deal with
src/main/java/de/srendi/advancedperipherals/client/screens/KeyboardScreen.java
Outdated
Show resolved
Hide resolved
src/main/java/de/srendi/advancedperipherals/client/screens/KeyboardScreen.java
Outdated
Show resolved
Hide resolved
src/main/java/de/srendi/advancedperipherals/client/screens/KeyboardScreen.java
Outdated
Show resolved
Hide resolved
Sorry to annoy you @SquidDev, just asking you because of #650 (comment) I used a piece of the TerminalWidget implementation for our keyboard screen. Just asking if this is okay And maybe you can answer the two comments related to that from zyxkad |
It might be easier to copy what |
Thank you, I didn't see that |
Build PreviewYou can find files attached to the below linked Workflow Run URL (Logs).
|
build.gradle
Outdated
@@ -324,11 +324,12 @@ dependencies { | |||
compileOnly fg.deobf("com.ldtteam:domum_ornamentum:${domumornamentum_version}:universal") | |||
compileOnly fg.deobf("com.ldtteam:blockui:${blockui_version}") | |||
// IMPORTANT. This should be removed/commented when running `runData` | |||
runtimeOnly fg.deobf("com.ldtteam:minecolonies:${minecolonies_version}") | |||
/*runtimeOnly fg.deobf("com.ldtteam:minecolonies:${minecolonies_version}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pretend I didn't see those
(although I think you should merge from dev/0.8)
src/main/java/de/srendi/advancedperipherals/client/ClientRegistry.java
Outdated
Show resolved
Hide resolved
* <p> | ||
* We just create a terminal which is used to forward all the key presses and mouse clicks but we don't render it. | ||
*/ | ||
public class KeyboardScreen extends BaseScreen<KeyboardContainer> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do not extend from AbstractContainerScreen
, but inherit Screen
or GuiComponent
, then jade should not render on it
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class KeyboardContainer extends BaseContainer implements ComputerMenu { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And so we don't need KeyboardContainer anymore
if (data.contains("ownerId") && data.contains("owner")) { | ||
tooltip.add(EnumColor.buildTextComponent(Component.translatable("item.advancedperipherals.tooltip.memory_card.bound", data.getString("owner")))); | ||
if (data.contains("ownerId")) { | ||
tooltip.add(EnumColor.buildTextComponent(Component.translatable("item.advancedperipherals.tooltip.binding.boundto", data.getString("ownerId")))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alr we are not showing ownerId here, we still want show the owner's name, so we need an extra step to turn the id into GameProfile
, then get the player's cached name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah
I can use the new cache thing there I made
Co-authored-by: Kevin Z <[email protected]> Signed-off-by: Srendi <[email protected]>
# Conflicts: # build.gradle # src/generated/resources/.cache/67cce32b1c3cbbcb1f646605f4914e3f196986c2 # src/generated/resources/.cache/c622617f6fabf890a00b9275cd5f643584a8a2c8 # src/generated/resources/assets/advancedperipherals/lang/en_us.json # src/main/java/de/srendi/advancedperipherals/common/data/EnUsLanguageProvider.java # src/main/java/de/srendi/advancedperipherals/common/setup/APItems.java
What kind of change does this PR introduce? (Bug fix, feature, ...)
Feature
What is the new behavior (if this is a feature change)?
Added the keyboard item. An item which can be linked to a computer. A user can now right click the item to unlock their mouse, they can now freely type while the typed characters are send to the linked computer. Will also be a module for the smart glasses.
Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
No
Other information: