fastman92 Posted April 5, 2012 Share Posted April 5, 2012 (edited) GTA Palette & Mouse SCM API Many of people have asked how to create UI interface in CLEO SCM, but most of them have no required knowledge to know how to begin. However creators of CLEO added useful commands such as 0AB1 and 0AB2 that make it possible to simulate classes from modern programming languages. When combined with method of additional variables, we’re able to do something than usual 0AB1 SCM functions. The subject described in this document is easy-to-use circular HSV palette with few buttons to select color, alpha and switch whether value of color shall be maximized when particular color is being chosen by clicking on palette. Reasonably a mouse support is easy to use as well. It occurs as a matter of 3 opcodes to add in source of project. What’s more – you can use more than one instance of palette and draw it on screen. Feel free to use palette and mouse cursor in whichever project where you can find these things useful. As time goes by - GTA SA modding is still growing up. Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE Fully compatible with any screen resolution (4:3, 16:9, 16:10...) Fully compatible with CLEO3 and newer - - - - - - - - - - - - - - - - - - Download http://www.mediafire.com/?8irp00v7a2jqr64 ***** How to use Open Readme.docx and read more about it. ***** Changes in 1.1 version: - enlarged "hsvPalette" texture to 512 x 512 px - fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor - added aliases such as: PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor - added automatic rescaling when user has changed the game resolution - fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently ***** 1.1 is 100% compatible with previously written scripts. ***** Informations: Date of release: 02-05-2012 (d-m-Y) Author: fastman92 Version: 1.1 For: GTA San Andreas Visit fastman92-site.tk Edited May 2, 2012 by fastman92 Crspy, HzanRsxa2959, MasterHK and 1 other 4 Link to comment Share on other sites More sharing options...
Braindawg Posted April 5, 2012 Share Posted April 5, 2012 Can you please make a video of how this works ingame? It looks very interesting. Link to comment Share on other sites More sharing options...
fastman92 Posted April 5, 2012 Author Share Posted April 5, 2012 (edited) I have only a video of the In-game Timecyc Editor (project already), where palette is used. On the video, button to switch option, brightening value of color when color is chosen by clicking on palette didn't exist yet. What i made is Palette & Mouse Cursor SCM Framework for which you will need little skill of CLEO scripting. It's FOR SCRIPTERS, who want use mouse cursor and possibly a palette in their projects. Please download archive and open Readme.docx to read more. Edited April 5, 2012 by fastman92 Link to comment Share on other sites More sharing options...
DK22Pac Posted April 5, 2012 Share Posted April 5, 2012 This interface is much better than SA's panels. Link to comment Share on other sites More sharing options...
Deji Posted April 5, 2012 Share Posted April 5, 2012 I miss working with these kind of interfaces. Can't wait until L.A.M.E. is the next thing on my todo list... Mouse is tiny, though Link to comment Share on other sites More sharing options...
Juarez Posted May 1, 2012 Share Posted May 1, 2012 Very nice. Good job. Link to comment Share on other sites More sharing options...
fastman92 Posted May 2, 2012 Author Share Posted May 2, 2012 (edited) Thanks for replies. I updated version to 1.1: ***** Changes in 1.1 version: - enlarged "hsvPalette" texture to 512 x 512 px - fixed number of input parameters in example of function @PaletteHSVCircle_setHSVcolor - added aliases such as: PaletteHSVCircle_getRGBcolor and PaletteHSVCircle_readRGBcolor PaletteHSVCircle_getRGBAcolor and PaletteHSVCircle_readRGBAcolor PaletteHSVCircle_getHSVcolor and PaletteHSVCircle_readHSVcolor - added automatic rescaling when user has changed the game resolution - fixed incorrect change of position when PaletteHSVCircle_RescaleAllObjects is used subsequently ***** 1.1 is 100% compatible with previously written scripts. Note that anyone can use the palette in their projects freely. You can use it whenever needed. Example: car color editor. Upcoming In-game Timecyc 1.7 will be integrated with GTA Palette & Mouse SCM API. Edited May 2, 2012 by fastman92 Link to comment Share on other sites More sharing options...
Midnightz Posted November 11, 2012 Share Posted November 11, 2012 It would be nice to see something like this replace the mod shop color picker in-game. Gonna take a look... Link to comment Share on other sites More sharing options...
HeresOtis Posted March 10, 2013 Share Posted March 10, 2013 You should include a sample that demonstrates how to check if a drawn texture has been clicked on, because I couldn't understand it in the PaletteCircleHandling. Link to comment Share on other sites More sharing options...
MasterHK Posted July 15, 2013 Share Posted July 15, 2013 Can I use this pallete in a mod? Be sure I will add your name in authors. Link to comment Share on other sites More sharing options...
Link2012 Posted July 17, 2013 Share Posted July 17, 2013 Can I use this pallete in a mod?Be sure I will add your name in authors. He, I think so, otherwise he would not have posted the library including a how to use and stuff MasterHK 1 Link to comment Share on other sites More sharing options...
MasterHK Posted July 17, 2013 Share Posted July 17, 2013 Hey guys! I uploaded one of my mods on GTAGarage at Here Now you can change your car RGBA by a palette; as you wish! Link to comment Share on other sites More sharing options...
Ryan Posted July 17, 2013 Share Posted July 17, 2013 Hey guys!I uploaded one of my mods on GTAGarage at Here Now you can change your car RGBA by a palette; as you wish! Please don't use someone else's topic to advertise your own mod. Link to comment Share on other sites More sharing options...
MasterHK Posted January 1, 2014 Share Posted January 1, 2014 oh... i totally forgotten about this topic! excuse me(after some years and years!) that will never be done again and this(really i've to say word 'This' after this time?!) just for midnightz's post. DK22Pac 1 Link to comment Share on other sites More sharing options...
fastman92 Posted January 1, 2014 Author Share Posted January 1, 2014 It's fairly easy to make CLEO with a palette and mouse. If anyone has an idea for interactive CLEO script, then go ahead. MasterHK 1 Link to comment Share on other sites More sharing options...
TheGodfather. Posted January 3, 2014 Share Posted January 3, 2014 Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random. Will it be possible to make the pallette compactible with my exe ?/ I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here). Link to comment Share on other sites More sharing options...
fastman92 Posted January 3, 2014 Author Share Posted January 3, 2014 Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random. Will it be possible to make the pallette compactible with my exe ?/ I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here). Random? I don't know it at all. I can't imagine it. What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time. Readme.docx says: Basic information Palette API was confirmed to be: • Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE • Fully compatible with any screen resolution (4:3, 16:9, 16:10...) • Fully compatible with CLEO3 and newer Link to comment Share on other sites More sharing options...
MasterHK Posted January 4, 2014 Share Posted January 4, 2014 It's fairly easy to make CLEO with a palette and mouse. If anyone has an idea for interactive CLEO script, then go ahead. you want idea? I have one! InGame Paint! yes paint. lets explain that: as you know In SCM shapes don't have a name (opposite of flash) so how to move/re-scale/re-color them? yes. we have to make an array for naming them like: posX[shapeIndex] posY[shapeIndex] and so on... script must draw all of them every moment; but the uncolored/unscaled shapes have colorAlpha[shapeIndex] = 0 every new click mouse must increase 1 our shapeIndexCounter script check what tool we are using that? pen, rectangle or circle. if pen then increase shapeIndexCounter every moment else wait until mouse button have released and then increase it. drawing rectangle is too easy with opcode 0937 but circle. i think must there is a 1*1 circle texture that script draw it according to our pos/size. it's my first question to is there any other way for it? loading pic is so easy... wait... not so easy! i think it's possible to use windows funcs to open a open file dialog: else have to make a one, manual! listing all files of an folder is not so hard. just need to search for *.* (or *.bmp/png) and give name of them to an memory alloc array. wen list of folder's files is available it's time to draw window. an white rectangle. an exit × button. cancel button. and open button. also may an text for write file name manually.(e.g. with the method that used in MyCheatConsole) then draw an little icon for each file. and draw that's name side of it. my second question is how to get folder names. but saving is really easy! opcode 0A1e and find the latest file in gallery folder and then move it to a new folder with an arbitrary name. Link to comment Share on other sites More sharing options...
TheGodfather. Posted January 4, 2014 Share Posted January 4, 2014 Just wondering fastman32 I was experimenting with your mod with my modified exe it led to some bugs like not correctly displaying the texts,panel etc.It was completely random. Will it be possible to make the pallette compactible with my exe ?/ I can PM you my exe if you could help me.(GTAF doesn't support sharing of game files so I won't be posting the link here). Random? I don't know it at all. I can't imagine it. What EXE size is yours? You should write it already in a post. Otherwise you're wasting someone's time. Readme.docx says: Basic information Palette API was confirmed to be: • Fully compatible with GTA San Andreas v1.0 [uS] HOODLUM No-CD Fixed EXE & GTA: San Andreas v1.01 [EURO] No-CD/Fixed EXE • Fully compatible with any screen resolution (4:3, 16:9, 16:10...) • Fully compatible with CLEO3 and newer Well thanks for keeping a notice on my post but no worries I fixed it out myself @MasterK: Your idea really impressed me Are you planning to make a mod like that ?? That would be really great Link to comment Share on other sites More sharing options...
fastman92 Posted January 4, 2014 Author Share Posted January 4, 2014 (edited) Sorry, but i meant if someone has the idea to make a CLEO script, then make it yourself. Beside, your idea would be a waste of time for trying to archive very hard stuff with no exact purpose whatsoever. I'm not fastman32. Edited January 4, 2014 by fastman92 Link to comment Share on other sites More sharing options...
MasterHK Posted January 4, 2014 Share Posted January 4, 2014 i just ask 2 questions on that post. i just wanted from you to ask them, amigo! @MasterK: Your idea really impressed me Are you planning to make a mod like that ?? That would be really great Thank you and... Perhaps , just Perhaps... : ) Link to comment Share on other sites More sharing options...
Asdf92 Posted January 16, 2014 Share Posted January 16, 2014 (edited) I got a good idea an In-game car colours editor with their names and IDs (similiar to your timecyc editor though) Edit : Forget it... terrible idea since vehicle modders are using that tools... whatever it calls... GTA San Andreas Ultimate Editor Edited January 16, 2014 by Rizky Rizaldi Link to comment Share on other sites More sharing options...
fastman92 Posted March 24, 2016 Author Share Posted March 24, 2016 Will someone come up and implement anything with this library? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now