Jump to content

[CLEO4] Lower case dynamic gxt


Recommended Posts

GaryRoachSanderson

Hi guys, how do i get lower case text in game when i add dynamic gxt?

 

0ADF: add_dynamic_GXT_entry "_Test" text "Test"

 

based on the code above, I get "TEST" instead of "Test" when I display the text in a menu in-game. Any idea guys? Thanks in advance. biggrin.gif

Link to comment
https://gtaforums.com/topic/458084-cleo4-lower-case-dynamic-gxt/
Share on other sites

If you are using 0ACA then you do not need 0ADF. When you don't use gxt, fxt then your text will print in capital letters!

http://www.gtaforums.com/index.php?showtop...st&p=1060102713

All the scripts will be print in capital letters except Rapier's script!

Edited by BnB

I guess it's a Sanny Builder compilation error. SB automatically change each letter in capital into every string type, short or long they are. Luckily, the game has an internal function which converts upper string to lower but you'll find this useful only if you'd convert all the letters. Forget this even if it's correct but unuseful.

 

I prefer using this function for 8/16-byte string ONLY: confused.gif

 

{ FUNCTIONS INCLUDED:-   getLabelOffset     Type: GET       Description: Get a label offset.-   getStringFormat     Type: GET       Description: Get a 8/16-byte string as it is (to avoid SB bug).}{$CLEO}0000: NOPwhile true wait 0  0AB1: call_scm_func @getStringFormat 1 label @GXTEntry store_to 1@ 2@ 3@ 4@  // 1@v will contain our string as it isend:GXTEntryhex "This" 20 "is" 20 "a" 20 "TEST" 00 end:getLabelOffset{ Parameters:   Passed:     0@ - label name   Result:     1@ - label offset Example:   0AB1: call_scm_func @getLabelOffset 1 label @LABEL store_to 1@ }if  0@ <> 0 then 0A9F: 1@ = current_thread_pointer 1@ += 0x10  0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0  0062: 1@ -= 0@ else 1@ = 0 end0AB2: ret 1 1@ :getStringFormat{ Parameters:   Passed:     0@ - label name   Result:     2@/5@ - string Example:   0AB1: call_scm_func @getStringFormat 1 label @LABEL store_to 1@ }0AB1: call_scm_func @getLabelOffset 1 label 0@ store_to 1@ 0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x4 0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x4 0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x4 0A8D: 5@ = read_memory 1@ size 4 virtual_protect 0 0AB2: ret 4 2@ 3@ 4@ 5@ 

 

Isn't it easier to change Case Convering (SB options) from 'uppercase' to 'as is'? :]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.