Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Need help with my menu - Current issue is item grid layout
#10
Thank you! Title has been updated.

Here is the code for the menu graphics.
Code:
#==============================================================================
# **Menu Graphics
#==============================================================================

class Menu_Graphics < Window_Base

#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
 
super(0, 0, 640, 480)
 self.contents = Bitmap.new(width - 32, height - 32)
 self.opacity = 0
#-----------------------------------------------------------------------
# * Draw Background
#-----------------------------------------------------------------------
  @menuback = Sprite.new
   @menuback.x = 0
   @menuback.y = 0
#-----------------------------------------------------------------------
# * Variable Graphic Changes For Background
#-----------------------------------------------------------------------
 #Background 1 
 if $game_variables[1] < 5
   @menuback.bitmap = RPG::Cache.picture('backtest1')
 #Background 2
 else $game_variables[1] >= 5
   @menuback.bitmap = RPG::Cache.picture('backtest2')
 end
#-----------------------------------------------------------------------
# * Draw Character Graphic
#-----------------------------------------------------------------------
 #Display character graphic
  @charactergraphic = Sprite.new    
   @charactergraphic.x = 375
   @charactergraphic.y = 50
#-----------------------------------------------------------------------
# * Variable Graphic Changes For Character
#-----------------------------------------------------------------------
 if $game_variables[1] == 0
   @charactergraphic.bitmap = RPG::Cache.picture('hanneutral')
 elsif $game_variables[1] == 1
   @charactergraphic.bitmap = RPG::Cache.picture('hanworry')
 elsif $game_variables[1] == 2  
   @charactergraphic.bitmap = RPG::Cache.picture('penneutral')
 elsif $game_variables[1] == 3
   @charactergraphic.bitmap = RPG::Cache.picture('penhappy')
 elsif $game_variables[1] == 4
   @charactergraphic.bitmap = RPG::Cache.picture('penworry')
 elsif $game_variables[1] == 5
   @charactergraphic.bitmap = RPG::Cache.picture('penpsych')
 else $game_variables[1] == 6
   @charactergraphic.bitmap = RPG::Cache.picture('penaffect')
 end
#-----------------------------------------------------------------------
# * Character Names And Changes
#-----------------------------------------------------------------------
@charactername = Sprite.new    
 @charactername.x = 310
 @charactername.y = 15
 if $game_variables[1] <= 2
   @charactername.bitmap = RPG::Cache.picture('testname1')
 else $game_variables[1] > 2
   @charactername.bitmap = RPG::Cache.picture('testname2')
 end
 end
end
I then call it on the Scene_Menu (replacement) script like
@menu_graphics = Menu_Graphics.new

    @menu_graphics.x = 0
    @menu_graphics.y = 0

Which I don't know if it's the best way to do it, but it functions okay so far
Here's an example of $game_variables[1] at 0, versus at 5, just to give a visual. (All I did was change the colors around. The filenames are just specific for my own reference.)
Content Hidden
That is pretty much exactly what I'm trying to do. Kind of a mix of point and click and visual novel. I haven't tried playing around with mouse scripts just yet (I plan to), but I will take just about anything over the default control scheme. Any items collected will be pretty much exclusively for puzzles or referencing things like passwords. 

I'm having a lot of trouble figuring out how the placement of icons and selection stuff works on the item window though. It may be down to me being absolutely terrible at math, but I can't figure out how to get the selection box to actually line up properly with the icons. I'm legitimately at a loss. It's all been trial and error and comparing different menu edits to the base code, but I can't actually understand which numbers do what and why. So I just keep having this same issue but in slightly different ways:
Content Hidden

I'm also not sure if it's even possible to put them horizontally closer together and/or vertically further apart.
Reply }


Messages In This Thread
RE: Need help with my menu - Current issue is item grid layout - by LilyFrog - 09-04-2018, 10:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   I want to merge item classification and description extensions. zlsl 7 8,186 11-25-2019, 06:46 AM
Last Post: kyonides
   Handling very long Item Names Melana 4 7,397 09-24-2018, 06:37 PM
Last Post: Melana
   Special Items Separate Menu Diorm 41 36,263 02-10-2018, 06:06 PM
Last Post: Diorm
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 8,602 05-31-2017, 05:10 AM
Last Post: Zachariad
   A fourth column in MOG Scene Item Laura V1.2 Noctis 13 17,411 11-27-2016, 05:12 PM
Last Post: DerVVulfman
   Bizarre issue with Lanzer counter script. Steel Beast 6Beets 2 6,596 10-04-2016, 11:46 AM
Last Post: Steel Beast 6Beets
   XAIL MENU from RPG VX ACE to RPG XP RASHIDA12 46 44,867 05-02-2016, 08:08 PM
Last Post: RASHIDA12
Tongue  Healing Spell doesn't work right in Menu? Bounty Hunter Lani 8 11,006 01-15-2015, 07:45 PM
Last Post: Bounty Hunter Lani
   My Options Menu needs help firestalker 0 2,977 08-11-2014, 02:31 PM
Last Post: firestalker
   Vx Ace Custom Menu help? Skitzen 1 4,889 10-07-2013, 03:10 PM
Last Post: JayRay



Users browsing this thread: