Help with flags on menu

Everything about Modding TE2013, from new courts to the modifications of the player & tournament bases (and including all the bugs they may be creating ! ;) )
Forum rules
Speak English in 1st page of topics, and don't hijack topics, troll, use profanities nor insults

Help with flags on menu

Postby antimouse » 07 Mar 2014, 23:32

Hello all,

I'm trying to put flags on the tournament selection screen, instead of country names. I was able to put the flag there, but it's always Andorra flag. Plus, when I add OnAction command, the HelpText stop working.
What am I doing wrong?

If someone can explain to me what this CycleButton function does, I'd be glad.

Code: Select all
item
{
   //Text /Board/Country
   //HelpText /WT_Intern/Text !ShowIfUnselectable
   HelpText /Board/Country !ShowIfUnselectable
   ImageFlag Flag 0.25 0.25
   //CycleButton #ImageGI

   Pos xC y   center   center
   Font BoardF
   ShrinkToMaxPixel dxC
   
   OnAction
   {
      SlideCountry /Board/Country 0 /WT_Intern/NbCountry-1
   }

   ShowIfNot /Board/Country -1
   ShowIfNot /Board/TypeRank -1
}


Thanks!
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby antimouse » 09 Mar 2014, 20:33

Anyone??

Manutoo, maybe?
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby manutoo » 10 Mar 2014, 03:32

Hello,

in your code sample, "CycleButton #ImageGI" does nothing, as it's preceded by "//" which means it's commented out (ie: it's seen as a comment and ignored by the script processing).
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Help with flags on menu

Postby antimouse » 10 Mar 2014, 04:49

Oh sorry Manu, that was just one of my tests. But I tried with that line uncommented and it didn't work as well. Here is the screenshot of what happens:

flags.jpg


As you see, every flag is the same!

The corrected code follows:
Code: Select all
item
{
   //Text /Board/Country
   //HelpText /WT_Intern/Text !ShowIfUnselectable
   HelpText /Board/Country !ShowIfUnselectable
   CycleButton #ImageGI
   ImageFlag Flag 0.25 0.25

   Pos xC y center   center
   Font BoardF
   ShrinkToMaxPixel dxC
   
   OnAction
   {
      SlideCountry /Board/Country 0 /WT_Intern/NbCountry-1 !Apply
   }

   ShowIfNot /Board/Country -1
   ShowIfNot /Board/TypeRank -1
}


Some specific questions:
1) What does CycleImage do?
2) What is this #ImageGI? I saw this in rogerfed1's scoreboards. What is the difference between #ImageGI and just #Image?
You do not have the required permissions to view the files attached to this post.
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby Nigogu » 10 Mar 2014, 05:16

That's a problem of Language select, the flag is from Andorra, this is a common problem when you don't have the file Lang_xxx(in this case Spanish) modded.
User avatar
Nigogu
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 3562
Gaming Since: 26 Mar 2012, 16:48

Re: Help with flags on menu

Postby antimouse » 10 Mar 2014, 13:09

It's not a problem with language, Nigogu. This already happened before I translated the game. If I switch back to English, the same thing happens.
And it is not Spanish, it's Portuguese :)
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby Nigogu » 10 Mar 2014, 14:51

antimouse,
Oh right it's not spanish, i just read the half of the post ':D
And, believe me, same happens with Sam's Patch when you don't have the modded Lang :wink:
User avatar
Nigogu
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 3562
Gaming Since: 26 Mar 2012, 16:48

Re: Help with flags on menu

Postby antimouse » 10 Mar 2014, 18:03

Yeah I know, but his problem is different. In Sam's Patch, the problem affected players' nationalities. That's not the case here. All players are fine. And I also added a modded countries language file. So I guess it is a different problem.
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby Nigogu » 10 Mar 2014, 18:52

TourATP.ini maybe :?: :unsure:
User avatar
Nigogu
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 3562
Gaming Since: 26 Mar 2012, 16:48

Re: Help with flags on menu

Postby antimouse » 10 Mar 2014, 22:57

Manutoo,

I realized after some tests that /Board/Country is a string value, that's why SlideCountry was not working.

My question now is:
Is there any way to get the country code? This playerplanningsub.menu uses a GetWeekTournamentInfoBySlot function, but I don't know what information it stores inside Board. I tried some random guesses like /Board/CountryCode, /Board/CountryS, /Board/CountryC, but nothing seemed to work. Is it possible to get it with this function or another one?

Thank you very much!
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby manutoo » 11 Mar 2014, 03:34

antimouse,
I'll add /Board/CountryNum for next update, but you'll have big problem to display several flags on the same screen. Have a look at what did Kersou for his scoreboard ; if I recall correctly, he had to create an hidden item per visible flag. And there, the menu uses the same item (through submenu call) to display all the tournaments, so I guess it won't be possible to make it work.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Help with flags on menu

Postby antimouse » 11 Mar 2014, 14:00

Thank you very much, Manutoo!

I'll have a look on what he did. I managed to display some flags with a tedious workaround, defining country codes based on country text, using OnActionIf, and testing for the /Board/Country string. The CountryNum will be a nice add.

So I have one last question, if I may:
Is there a way of checking a string like "United States", with spaces? I tried enclosing it in quotes, so the engine would not think it's two separate things, but didn't work. I was looking for something like:
OnActionIf /Board/Country "United States"

Thanks one more time for your patience! :)
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05

Re: Help with flags on menu

Postby manutoo » 12 Mar 2014, 03:12

"United States" with the quotes should work, but if it doesn't, then maybe it means it doesn't work... ;)
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 17497
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Help with flags on menu

Postby antimouse » 12 Mar 2014, 03:32

Lol, thank you! :D
I'll leave my flags obsession for now :D
My courts here: topic29-15848.php
antimouse
crazy of the little yellow ball
crazy of the little yellow ball
 
Messages: 539
Gaming Since: 06 Sep 2013, 01:05


Return to Modding - TE2013

Who is online

Users browsing this forum: AhRefs [Bot], Bing [Bot], CCBot [Bot] and 3 guests