Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534

    Grid - Chess Board Question.

    I have successfully made a chessboard with dynamic colors and alternating squares out of the grid object but now I'm thinking that I'd like to use pictures instead. Is there any way to use the Grid object for this or do I need to find another method?
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  2. #2
    Join Date
    Apr 2007
    Posts
    165
    I would go for image objects. One image for the chessboard and then images for the chesspieces. And then you could make tables with each field position and piece positions like so

    Field = {}

    --[[
    Index Explanation:
    1 = Field A1
    2 = Field A2
    ....
    ]]--
    Field[1] = {}
    Field[1].X = 500 -- Estimated
    Field[1].Y = 10 -- Estimated
    Field[2] = {}
    Field[2].X = 450 -- Estimated
    Field[2].Y = 10 -- Estimated


    --[[
    Index Explanation:
    1 = 1stPawn
    9 = Knight
    ]]--
    WhitePieces = {}
    WhitePieces[1] = {}
    WhitePieces[1].X = Field[2].X
    WhitePieces[1].X = Field[2].Y


    I hope you get my idea and make it better.

  3. #3
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Quote Originally Posted by Teqskater View Post
    I would go for image objects. One image for the chessboard and then images for the chesspieces. And then you could make tables with each field position and piece positions like so

    Field = {}

    --[[
    Index Explanation:
    1 = Field A1
    2 = Field A2
    ....
    ]]--
    Field[1] = {}
    Field[1].X = 500 -- Estimated
    Field[1].Y = 10 -- Estimated
    Field[2] = {}
    Field[2].X = 450 -- Estimated
    Field[2].Y = 10 -- Estimated


    --[[
    Index Explanation:
    1 = 1stPawn
    9 = Knight
    ]]--
    WhitePieces = {}
    WhitePieces[1] = {}
    WhitePieces[1].X = Field[2].X
    WhitePieces[1].X = Field[2].Y


    I hope you get my idea and make it better.
    Thanks for your suggestion, Teqskater. I was just trying to avoid using this method. This was the only alternative that I could think of too. I would rather do it with Grid Object which is why I'm posting now. I'm not looking for methods on how to make the chess board (because I have a thousand ideas myself) but rather methods specifically for doing this with the Grid Object. Does anyone have any work-around code for the grid lying around that would allow me to use images in the cells?
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    The grid object does not support images. You will have to use a different method. If you want to use images, then really the only option is to use the image object.
    Dermot

    I am so out of here

  5. #5
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Quote Originally Posted by Dermot View Post
    The grid object does not support images. You will have to use a different method. If you want to use images, then really the only option is to use the image object.
    I was afraid there was going to be an answer like that...oh well. I will make due. Thanks guys.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

Posting Permissions

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