Results 1 to 7 of 7
  1. #1
    Member
    savagesun is offline

    Posts
    72

    Manual Mode Visualization

    Not really expecting a ton of feedback considering this is not necessarily a good place to talk programming, but I figure since there might be a coder with experience specifically relating to this, I choose to post this:

    I've been tinkering around with simple bot code, but I've gotten to the point at which visualizing the moves to make rather than displaying text in a JFrame or something would work better. After some googling, I'm rather stuck on what I need to be doing to draw off the bot's UI window. In things like Poseidon, the next move to make is made obvious by a red box surrounding what piece to click. Is it just 4 frames with no border and a solid color set to positions that form a rectangle? Or am I missing something obvious here. I've tried using a transparent window but it intercepts the input from the user and I'm not sure I can stop it from being the active window without having it draw behind the YPP window. Hopefully someone has some input. Thanks!

  2. #2
    Member
    Luriebot is offline

    Posts
    85
    in java all you have to do is make a new pane that covers the game area, make it invisible, and draw on it.

  3. #3
    Member
    Crussell is offline

    Posts
    68
    luriebot please can you help me can i have your skype name? If not have you bought some bots?

  4. #4
    Member
    savagesun is offline

    Posts
    72
    Quote Originally Posted by Luriebot View Post
    in java all you have to do is make a new pane that covers the game area, make it invisible, and draw on it.
    Wouldn't the invisible pane interfere with input even when clicking in areas that are transparent?

  5. #5
    Member
    Luriebot is offline

    Posts
    85
    @crussel yes i have bought a few bots, what do you need help with?

    @savagesun no the pane would not interfere with click-ability when building the plane call it as transparent and as far as i know that does not respond to clicks however the drawing on the pane will when it is clicked, that's why aleos rigging has those circles in which you click. However is a pane does respond to clicks then i would just track the mouse and when the mouse is over the drawing remove that portion of the pane. however as i understand it just setting accessibility to null should make all transparent parts unclickable.

  6. #6
    Member
    savagesun is offline

    Posts
    72
    Okay what I've done so far is create a new JFrame, and add a panel that draws a rectangle. Then I set it to undecorated and set the opacity to 0.0f. This also makes the panel inside the JFrame transparent though. How can I keep it from being affected?

    Edit: Nevermind, set the background color instead and managed to get the desired result. Thanks!
    Last edited by savagesun; 09-19-2013 at 01:18 AM.

  7. #7
    Member
    Luriebot is offline

    Posts
    85
    yea no problem, if you need any more help just message me and we can skype Im kind of interested in what your working on!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •