| View previous topic :: View next topic |
| Author |
Message |
Redouane Master Cheater
Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Sat Dec 20, 2014 1:17 pm Post subject: Accessing files associated with a CT file |
|
|
Hi,I want to get the files that are associated with a ct file from Lua (see in picture).
In a form,I have a button that is an image,and when clicked,I want to change its texture (button.Picture) to the confirm_clicked.png image.
Any lua function to do it?couldn't find it.
-Thanks
| Description: |
|
| Filesize: |
9.82 KB |
| Viewed: |
5752 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Sat Dec 20, 2014 2:49 pm Post subject: |
|
|
| Code: |
UDF1.button.Picture.loadFromStream(findTableFile('confirm_clicked.png').Stream)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Redouane Master Cheater
Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Sat Dec 20, 2014 4:14 pm Post subject: |
|
|
| Dark Byte wrote: | | Code: |
UDF1.button.Picture.loadFromStream(findTableFile('confirm_clicked.png').Stream)
|
|
Thanks,didn't knew about streams...what is a stream?like a handle or something?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Sat Dec 20, 2014 4:23 pm Post subject: |
|
|
A stream is an abstract interface that is used to read/write raw data, like an image file in this case.
There a different implementations of streams like filestreams and memorystreams.
The tablefile contains a memorystream which is used in this case.
Note: sometimes you may have to set the position manually
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|