(Ace) Help with title screen

Status
Not open for further replies.

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
I am using Zerbu's title screen window option script to customize my title screen.

#============================================================================
# Zerbu Engine - Title Screen Window Options
#----------------------------------------------------------------------------
# This script allows you to set window options specifically for the title
# screen to customize its appearance.
#============================================================================

#============================================================================
# (module) Title_Screen_Window_Options
#============================================================================
module Title_Screen_Window_Options
ZE_TSWO = {
#------------------------------------------------------------------------
# Options
#------------------------------------------------------------------------
# What font should be used on the title screen?
#------------------------------------------------------------------------
:FONT_FACE => ["VL Gothic", "Verdana", "Arial", "Courier"],
#------------------------------------------------------------------------
# What size should the text be?
#------------------------------------------------------------------------
:FONT_SIZE => 24,
#------------------------------------------------------------------------
# Should the text on the title screen be bold?
#------------------------------------------------------------------------
:FONT_BOLD => false,
#------------------------------------------------------------------------
# Should the text on the title screen be italic?
#------------------------------------------------------------------------
:FONT_ITALIC => false,
#------------------------------------------------------------------------
# Should the text on the title screen have a shadow?
#------------------------------------------------------------------------
:FONT_SHADOW => false,
#------------------------------------------------------------------------
# Should the text on the title screen have an outline?
#------------------------------------------------------------------------
:FONT_OUTLINE => true,
#------------------------------------------------------------------------
# What colour should the outline be? The format to use is:
# [red, green, blue, opacity]
#------------------------------------------------------------------------
:FONT_OUT_COL => [0, 0, 0],
#------------------------------------------------------------------------
# This is the Windowskin used on the title screen.
#------------------------------------------------------------------------
:WINDOWSKIN => "Window",
#------------------------------------------------------------------------
# This is the width of the title window. If this is set to 0, the
# default width will be used.
#------------------------------------------------------------------------
:WINDOW_WIDTH => 200,
#------------------------------------------------------------------------
# This is the X position of the title window. If this is set to -1, the
# default position will be used.
#------------------------------------------------------------------------
:WINDOW_X => 20,
#------------------------------------------------------------------------
# This is the Y position of the title window. If this is set to -1, the
# default position will be used.
#------------------------------------------------------------------------
:WINDOW_Y => 20,
#------------------------------------------------------------------------
# This is the opacity of the window.
#------------------------------------------------------------------------
:oPACITY => 255,
#------------------------------------------------------------------------
# This is the back opacity of the window.
#------------------------------------------------------------------------
:BACK_OPACITY => 200,
}
end

#============================================================================
# Window_TitleCommand
#============================================================================
class Window_TitleCommand < Window_Command
include Title_Screen_Window_Options

#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias ze_tsto_initialize initialize
def initialize
#---
ze_tsto_initialize
#---
self.windowskin = Cache.system(ZE_TSWO[:WINDOWSKIN])
self.opacity = ZE_TSWO[:oPACITY]
self.back_opacity = ZE_TSWO[:BACK_OPACITY]
#---
end

#--------------------------------------------------------------------------
# alias method: window_width
#--------------------------------------------------------------------------
alias ze_tswo_window_width window_width
def window_width
#---
if ZE_TSWO[:WINDOW_WIDTH] != 0
return ZE_TSWO[:WINDOW_WIDTH]
else
ze_tswo_window_width
end
#---
end

#--------------------------------------------------------------------------
# alias method: draw_item
#--------------------------------------------------------------------------
alias ze_tswo_draw_item draw_item
def draw_item(index)
#---
contents.font.name = ZE_TSWO[:FONT_FACE]
contents.font.size = ZE_TSWO[:FONT_SIZE]
contents.font.bold = ZE_TSWO[:FONT_BOLD]
contents.font.italic = ZE_TSWO[:FONT_ITALIC]
contents.font.shadow = ZE_TSWO[:FONT_SHADOW]
contents.font.outline = ZE_TSWO[:FONT_OUTLINE]
contents.font.out_color = Color.new(ZE_TSWO[:FONT_OUT_COL][0], ZE_TSWO[:FONT_OUT_COL][1], ZE_TSWO[:FONT_OUT_COL][2])
#---
ze_tswo_draw_item(index)
#---
end

#--------------------------------------------------------------------------
# overwrite method: update_placement
#--------------------------------------------------------------------------
def update_placement
#---
if ZE_TSWO[:WINDOW_X] != -1
self.x = ZE_TSWO[:WINDOW_X]
else
self.x = (Graphics.width - width) / 2
end
#---
if ZE_TSWO[:WINDOW_Y] != -1
self.y = ZE_TSWO[:WINDOW_Y]
else
self.y = (Graphics.height * 1.6 - height) / 2
end
#---
end
end
I've got quite a bit of things working the way I want but there are a couple of small things that need to be tweaked. First, if I change the size of the font at all, the bottom of the letters are cut off. I need to have each line drawn larger. In addition, the cursor will probably need to be taller, will this change automatically with it?

Here is a screenshot of what it looks like. (I did realize how to make the cursor not so wide, so ignore that part.)

The other issue is that I figured out how to change the font color, only I want it to only be this color/font on the title. So how would I go about changing it back to "normal" for everything else. I did find the large section in Window Base on colors (where I changed "normal" color), I'm just not entirely sure what to change or where to put the changes.

Thanks so much in advance!
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
changing the window width will help the cursor issue as for the text being cut off you need to increase the height size of the item so add this in the script

def item_height ; 48 end

where 48 can be any number
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
Thanks Zane - where do I add that line though - in Zerbu's script or in the title command section?
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
You can add it in the script sense it's the same thing just don't put the def inside another def =)
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
Still needing help on this one. I added the line Zane posted above to Zerbu's script. It worked in that the words are not cut off anymore. However, it will not display the full menu. It is only showing the first two items. If I move the cursor down, it will show the last two options.

I also would still like to know how to change just the text color for the title menu, while leaving the rest of the text in the game the color it currently is. Thanks!
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
Ah, looks like the window height is cutoff =) That will need adjusting also.
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
def window_height ; 128 end

or whatever number you want.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
Thank you, that worked for the sizing issues. Now, if anyone could help with the color issue, I would be all set!
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
Well what do you want to do about the color? :3

Ok for that put this in there

def draw_item(index)
    change_color(Color.new(0, 0, 0), command_enabled?(index))
    draw_text(item_rect_for_text(index), command_name(index), alignment)
  end

Use the Color.new(0, 0, 0) option to set your values for the RGB
 
Last edited by a moderator:

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
Also if you just make the word pics a smaller size until they fit would work also (instead of doing all that work there).
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
I finally got the color change to work (for anyone else who may wonder about this.

I copied this from the window_base section:

 def change_color(color, enabled = true)
    contents.font.color.set(0,0,0)
    contents.font.color.alpha = translucent_alpha unless enabled
  end

(0,0,0) is where you put in the RGB numbers for the color you want.

The reason Zane's bit of script didn't work is because it was redrawing the whole menu, thus overwriting all of the other settings I'd put in there. Thanks though for helping me see what I needed to put where! I do appreciate your help.

Also if you just make the word pics a smaller size until they fit would work also (instead of doing all that work there).
Not sure what you mean by the word pics?
 

Zane

Food for thought
Veteran
Joined
Jun 9, 2013
Messages
913
Reaction score
110
First Language
US English
Primarily Uses
I didn't realize how much was changed from that script,haha glad you found something that works though. ;)
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
Yeah, I was actually surprised it wasn't an option, with everything else that was being changed. But really, I do appreciate your help, what you posted helped me to see what needed to be done. Thanks again.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top