Skip to content
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

now working with the latest update of Rust #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrissaoussama
Copy link

No description provided.

…reused icons, both are saved to button_config.json.

currently there needs to be a config json so makers can appear properly.
(bug: markers appear incorrectly if you try to setup again, must be the offset from the red border)
- added "done" button during marker or region selection
-added openarrowmarker in region selection dialog
-made bobrustpalette receive a screenshot of the color area, split it into 4 by 16 grid and map the coords relative to screen. getSizeButton is changed to work with the brush size limit of 100
-palette generator is unused now.
- made the coordinate record in its own file
-made circleCache load circle_config.json and create one with defaults if it doesn't exist. made for easier testing.
- added config file related functions to ApplicationWindow.
Thanks for the developer for explaining and helping me make this work.

static {

public static int CIRCLE_0_VALUE = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be final

LOGGER.info("Applied paletteRect from loaded configuration: {}", paletteRect);
}
screenDrawDialog.setPaletteRect(paletteRect);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work as the screen size is dependent on the current monitor loaded

private boolean findColorPalette() {
// Take a screenshot
BufferedImage screenshot = RustWindowUtil.captureScreenshot(monitor);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather you implement window ui capture screenshot because it's dependant on window scaling. It's complicated when working with multi resolution monitors

// Change the size
if (lastSize != blob.sizeIndex) {
clickSlider(robot, palette.getSizeButton(blob.sizeIndex), 20, autoDelay);
var paletteSizeButton=palette.getSizeButton(blob.sizeIndex);
LOGGER.info("point: "+paletteSizeButton.toString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logging here is excessive, Should be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants