Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Handling very long Item Names
#2
You would need to either count how many spaces fit the window or look for the last empty space and split the name right before that space. Or mix both ways...
  • This option would split words as well:
    This is a long na
    me for a sword
  • This one would attempt to keep it readable:
    This is a long
    name for a
    sword

In the former you would count how large is the string with string.size (and add a condition), while in the latter you would use self.contents.text_size(string) and a if statement or condition to determine when it should be split into two chunks. Here it would be measured in pixels not spaces.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Messages In This Thread
Handling very long Item Names - by Melana - 09-23-2018, 04:21 PM
RE: Handling very long Item Names - by kyonides - 09-23-2018, 06:16 PM
RE: Handling very long Item Names - by Melana - 09-23-2018, 11:30 PM
RE: Handling very long Item Names - by Melana - 09-24-2018, 06:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Refreshing original skills names Whisper 2 4,276 05-31-2020, 04:35 PM
Last Post: Whisper
   I want to merge item classification and description extensions. zlsl 7 8,196 11-25-2019, 06:46 AM
Last Post: kyonides
   Need help with my menu - Current issue is item grid layout LilyFrog 41 32,926 09-24-2018, 02:03 AM
Last Post: LilyFrog
   Actor names in Quest Script jreagan406 5 7,589 03-07-2017, 08:06 AM
Last Post: JayRay
   A fourth column in MOG Scene Item Laura V1.2 Noctis 13 17,427 11-27-2016, 05:12 PM
Last Post: DerVVulfman
Exclamation  FF7s Hyper/Tranquilizer Item Script Petition Iqus 2 4,526 06-18-2013, 01:26 AM
Last Post: Iqus
   Cold's Bestiary and Item Book Vengan 0 3,133 05-27-2010, 08:59 AM
Last Post: Vengan



Users browsing this thread: