Oniromancie: Scripts - Message Box Options (version 2.0.1)


Comment ça marche?

Acsiosa
Par ThrillerProd

Aëdemphia
Par Sylvanor

Chemin de Croix
Par Mr Bambou

Darkange
Par Scythe Darklight

Evil Myst
Par oxion_garden

Geex Maker
Par roys

La Légende d'Ibabou
Par Zaitan

Les Ombres d'Ymirs
Par Lakitorai

Lije
Par Gaetz

Omega Cerberus
Par Sill Valt

Oyönna
Par Tata Monos

Sarcia
Par Kaëlar

News: OFF chez Indiegames.com / Scripts: Niveau pour équiper une arme / Scripts: Anti-"No such file" [VX Ace] / Scripts: Scroll Pictures / News: Legalize our games ! /

Chat ( connectés)

Bienvenue
visiteur !





publicité RPG Maker!

Statistiques

Liste des
membres


Contact

31 connectés actuellement

4596864 visiteurs
depuis l'ouverture

10 visiteurs
aujourd'hui

Groupe Facebook

Barre de séparation

Partenaires




TOP GAMEMAKING


Les 5 plus
visités

Guelnika - E Magination

ImagieNation

Level Up!

Alex d'Or

RPG Maker Powa

Au hasard

Off Game

Rochalmex

Galfart Studio

Les deux derniers

FreankExpo

Le Palais du Making

Nos autres partenaires

Devenir
partenaire


Barre de séparation

Un site du réseau
War Paradise

Annuaires référenceurs




Message Box Options (version 2.0.1)
Script pour RPG Maker VXACE
Ecrit par Tata Monos

Nom :Message Box Options
Version : (version 2.0.1)
Auteur : Zerbu
Source : Lien

Permet de régler la largeur, la hauteur, et la position du windowskin sur Rpg Maker Vxace.
Il faut 4 variables. De base :
-Variable 2 pour la largeur de la boite de dialogue. (Ligne 18 dans le script pour modifier l'id de la variable)
-Variable 3 pour la hauteur. (Ligne 22)
-Variable 4 pour la position X (Ligne 26)
-Variable 5 pour la position Y (Ligne 31)

Si une variable à pour valeur 0, elle retour à ça fonction par défaut.
Exemple si la variable Y est égale 0, c'est l'option (Haut,Milieu, bas) qui reprend le dessus pour positionner tous ça.

image

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#==============================================================================
# Message Box Options (version 2.0.1)
# NEW FEATURES:
# - You can now quickly set variables using a script call:
# -- message_box_options(width, height, x, y)
# - You can also reset the variables quickly as well
# -- message_box_options_reset
#------------------------------------------------------------------------------
# by Zerbu
#==============================================================================
module Message_Box_Options
 
  #--------------------------------------------------------------------------
  # Options
  #--------------------------------------------------------------------------
  # Variable with the message width
  # If the variable value is 0, the full width of the window will be used
  MESSAGE_WIDTH = 2
 
  # Variable with the message height
  # If the variable value is 0, the default height will be used
  MESSAGE_HEIGHT = 3
 
  # Variable with the X position
  # If the variable value is -1, it will be centred on the screen
  MESSAGE_X = 4
 
  # Variable with the Y position
  # If the variable value is 0, the position chosen in the editor
  # (Top, Middle, Bottom) will be used
  MESSAGE_Y = 5
 
end
 
#--------------------------------------------------------------------------
# DO NOT EDIT BELOW unless you know what you're doing!
# If you are not careful, editing below could cause chaos in your game
# world, and I don't mean something the player will enjoy!
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Window_Message
#--------------------------------------------------------------------------
class Window_Message < Window_Base
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # alias method: window_width
  #--------------------------------------------------------------------------
  alias default_window_width window_width
  def window_width
    #---
    if $game_variables[MESSAGE_WIDTH] != 0
      $game_variables[MESSAGE_WIDTH]
    #---
    else
      default_window_width
    end
    #---
  end
 
  #--------------------------------------------------------------------------
  # alias method: window_height
  #--------------------------------------------------------------------------
  alias default_window_height window_height
  def window_height
    #---
    if $game_variables[MESSAGE_HEIGHT] != 0
      $game_variables[MESSAGE_HEIGHT]
    #---
    else
      default_window_height
    #---
    end
  end
 
  #--------------------------------------------------------------------------
  # alias method: update_placement
  #--------------------------------------------------------------------------
  alias default_placement update_placement
  #---
  def update_placement
    #---
    if (self.width != window_width || self.height != window_height)
      self.width = window_width
      self.height = window_height
      create_contents
    end
    #---
    default_placement
    #---
    if $game_variables[MESSAGE_X] == -1
      x_space = Graphics.width - window_width
      self.x = x_space-(x_space/2)
    #---
    else
      self.x = $game_variables[MESSAGE_X]
    #---
    end
    #---
    if $game_variables[5] != 0
      self.y = $game_variables[MESSAGE_Y]
    end
    #---
  end
 
end
 
#--------------------------------------------------------------------------
# >> Game_Interpreter
# Add message box option and message box option reset scripts
#--------------------------------------------------------------------------
class Game_Interpreter
  include Message_Box_Options
 
  #--------------------------------------------------------------------------
  # new method: message_box_options
  #--------------------------------------------------------------------------
  def message_box_options(width, height, x, y)
    $game_variables[MESSAGE_WIDTH] = width
    $game_variables[MESSAGE_HEIGHT] = height
    $game_variables[MESSAGE_X] = x
    $game_variables[MESSAGE_Y] = y
  end
 
  #--------------------------------------------------------------------------
  # new method: message_box_options_reset
  #--------------------------------------------------------------------------
  def message_box_options_reset
    $game_variables[MESSAGE_WIDTH] = 0
    $game_variables[MESSAGE_HEIGHT] = 0
    $game_variables[MESSAGE_X] = 0
    $game_variables[MESSAGE_Y] = 0
  end
 
end
 
#==============================================================================
# END SCRIPT
#==============================================================================







Aucun commentaire n'a été posté pour le moment.

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe

Plan du site:

Activité: Accueil | News | Forum | Flash-news | Chat | Commentaires | Galerie | Screen de la semaine | Sorties | Articles perso | Livre d'or | Recherche
Jeux: Index jeux séparés | Top Classiques | Top Originaux | Les autres | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | Autres | Jeux complets | Proposer
Rubriques: Le Wiki | Collection Oniro | Tutoriaux | Scripts | Guides | Gaming-Live | Tests | Previews | Making-of | Interviews | Articles perso | OST | L'Annuaire | Divers | Palmarès
Hébergés: Acsiosa | Aëdemphia | Chemin de Croix | Darkange | Evil Myst | Geex Maker | La Légende d'Ibabou | Les Ombres d'Ymirs | Lije | Omega Cerberus | Oyönna | Sarcia
Ressources: Jeux | Programmes | Packs de ressources | Midis | Eléments séparés | Sprites
RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes