Search found 412 matches
- Wed Aug 01, 2018 4:29 am
- Forum: LiveCode Builder
- Topic: Specifying supported platforms in Inclusions entry for LCB extension?
- Replies: 13
- Views: 10094
Re: Specifying supported platforms in Inclusions entry for LCB extension?
When the widget is generated, platform will need to be added to the manifest. If the "OS" and "Platforms" keys are included in the library level doc comment, then they do make it to the lcdoc file that is generated. I started looking at the code briefly, but didn't follow it all to way to see if mor...
- Mon Jul 30, 2018 4:13 am
- Forum: Getting Started with LiveCode - Experienced Developers
- Topic: Nested Data Grid Behaviors
- Replies: 3
- Views: 3410
Nested Data Grid Behaviors
We had a thread going on the Use List about how to get a behavior between the Data Grid group and the DG library. It turns out that the way the library code was written, attempting to do this broke the Data Grid. A bug report was submitted and a fix has been proposed. This is great for those of us w...
- Fri Jul 27, 2018 11:38 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
I've posted an update that does the auto-cleanup. https://milby.us/lc/HexSplit3.livecode UPDATED: Code now has more comments. Adjusted code to only capture one column at a time. I left the previous version up and added a new version. I've also move the tile size to a field. hexsplit2b.jpg OMG, it is...
- Fri Jul 27, 2018 7:59 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
Thanks. I’ll add that and repost. I’ve been doing it by hand each time
- Fri Jul 27, 2018 2:33 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
Stack updated. Still need to work with it a bit more to be sure it captures the entire image.
- Fri Jul 27, 2018 4:09 am
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
I've updated the button to use the red rectangle as the bounds for the slicing. There is also a variable to set the desired side length of the tile and everything adjusts accordingly. Download the stack here: https://milby.us/lc/HexSplit2.livecode (I couldn't post here - kept getting a message that ...
- Thu Jul 26, 2018 2:02 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
That's clever stuff! Although: 1. I'm not sure if that provides the whole image in hex tiles. 2. It needs quite a bit of modification to chop up any image an end-user imports into the stack. Correct, I was just demonstrating the process. A more robust solution would allow configuration of the hex s...
- Thu Jul 26, 2018 6:40 am
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
How is this for a start? I created the img objects by hand, but for more than a demo would do it automatically. I also didn't figure out the transparency piece. on mouseUp pMouseButton local tLeft, tTop put 0 into tLeft repeat with tCol = 1 to 5 step 2 put 0 into tTop repeat with tRow = 1 to 3 expor...
- Tue Jul 24, 2018 10:31 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
So, here is what I was thinking. The below image show the rectangles that need to be captured and then clipped for each hex tile. hex2.png Based on then math, if each side of the hexagon is 1 unit, then the height is sqrt(3) units and the width is 2 units (assuming flat top/bottom). So if you chose ...
- Tue Jul 24, 2018 5:24 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: How to sort out this
- Replies: 50
- Views: 26322
Re: How to sort out this
singletonKeys(Temp) should be singletonKeys(Temp, “:”)
But no smart quotes.
But no smart quotes.
- Tue Jul 24, 2018 1:41 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
Would a rect with a width of 2x and height of sqrt(3)x be fully displayed (I.e. just cut off at the edges from left/right point to flat edge end points top/bottom)?
- Sun Jul 22, 2018 9:12 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: How to sort out this
- Replies: 50
- Views: 26322
Re: How to sort out this
Glad to help out. Of course my solution would not have been possible without the 2 previous suggestions on using arrays. Also, looking at this sample data, item 2 is item 1 + what looks to be a 2 or 4 digit year (for the duplicates). The second pass could be eliminated if you tested for that instead.
- Sun Jul 22, 2018 8:51 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: How to sort out this
- Replies: 50
- Views: 26322
Re: How to sort out this
Well, I don't think the lineoffset method is viable for the real file. I let it run for >10 min and it still didn't finish. The below code took between 18 and 23 sec for the actual data (first file - .7z) on mouseUp local tList, tKey, tLines, tCounts, tDupes, tStart set the itemDel to ":" put the mi...
- Sun Jul 22, 2018 7:32 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: How to sort out this
- Replies: 50
- Views: 26322
Re: How to sort out this
The goal is to completely remove any key that is repeated (not just the duplicates). Having real data makes a difference. The offset method is terribly slow (still working). The 2 array method took 18497ms. I'm not sure if you caught the 10000 loops and removed them (I did that to compare speed of t...
- Sat Jul 21, 2018 11:21 pm
- Forum: Games
- Topic: Hexagons and stuff
- Replies: 51
- Views: 51714
Re: Hexagons and stuff
Probably something along the lines of creating a square mask image that only shows the hex tile area and then screen shot that area. Then as you move across the image you will capture the tiles you need and can set the margins as transparent. Just need to do the math to position the captures correct...