nextrpg

  1__version__ = "0.1.31"
  2
  3from nextrpg.animation.animation_group import AnimationGroup
  4from nextrpg.animation.animation_on_screen import AnimationOnScreen
  5from nextrpg.animation.animation_on_screens import AnimationOnScreens
  6from nextrpg.animation.base_animation import BaseAnimation
  7from nextrpg.animation.base_animation_on_screen import (
  8    BaseAnimationOnScreen,
  9)
 10from nextrpg.animation.cycle import Cycle
 11from nextrpg.animation.cyclic_animation import CyclicAnimation
 12from nextrpg.animation.fade import Fade, FadeIn, FadeOut
 13from nextrpg.animation.move import Move, MoveFrom, MoveTo
 14from nextrpg.animation.scale import Scale, ScaleFrom, ScaleTo
 15from nextrpg.animation.sequence import Sequence
 16from nextrpg.animation.timed_animation_group import TimedAnimationGroup
 17from nextrpg.animation.timed_animation_on_screens import TimedAnimationOnScreens
 18from nextrpg.animation.timed_animation_spec import TimedAnimationSpec
 19from nextrpg.animation.typewriter import Typewriter
 20from nextrpg.audio.audio_spec import AudioSpec
 21from nextrpg.audio.music import play_music, stop_music
 22from nextrpg.audio.music_spec import MusicSpec
 23from nextrpg.audio.play_music_event import PlayMusicEvent
 24from nextrpg.audio.sound import Sound
 25from nextrpg.audio.sound_spec import SoundSpec
 26from nextrpg.character.character_drawing import CharacterDrawing
 27from nextrpg.character.character_on_screen import CharacterOnScreen
 28from nextrpg.character.character_spec import CharacterSpec
 29from nextrpg.character.moving_character_on_screen import MovingCharacterOnScreen
 30from nextrpg.character.moving_npc_on_screen import MovingNpcOnScreen
 31from nextrpg.character.npc_on_screen import (
 32    NpcOnScreen,
 33    StrictNpcSpec,
 34    replace_npc,
 35)
 36from nextrpg.character.npc_spec import (
 37    EventSpec,
 38    EventSpecParams,
 39    NpcEventStartMode,
 40    NpcSpec,
 41    RpgEvent,
 42    to_strict_npc_spec,
 43)
 44from nextrpg.character.player_on_screen import PlayerOnScreen
 45from nextrpg.character.player_spec import PlayerSpec
 46from nextrpg.character.rpg_maker_character_drawing import (
 47    RpgMakerCharacterDrawing,
 48    RpgMakerCharacterDrawingDefaultFrameType,
 49    RpgMakerCharacterDrawingFrameType,
 50    RpgMakerCharacterDrawingXpFrameType,
 51    RpgMakerSpriteSheet,
 52)
 53from nextrpg.character.view_only_character_drawing import (
 54    ViewOnlyCharacterDrawing,
 55)
 56from nextrpg.config.animation_config import AnimationConfig
 57from nextrpg.config.character.behavior_config import (
 58    BehaviorConfig,
 59)
 60from nextrpg.config.character.character_config import CharacterConfig
 61from nextrpg.config.character.rpg_maker_character_drawing_config import (
 62    RpgMakerCharacterDrawingConfig,
 63)
 64from nextrpg.config.config import (
 65    Config,
 66    config,
 67    force_debug_config,
 68    initial_config,
 69    override_config,
 70    set_config,
 71)
 72from nextrpg.config.debug_config import DebugConfig
 73from nextrpg.config.drawing.drawing_config import DrawingConfig
 74from nextrpg.config.drawing.text_config import TextConfig
 75from nextrpg.config.event.cutscene_config import CutsceneConfig
 76from nextrpg.config.event.event_config import RpgEventConfig
 77from nextrpg.config.event.event_transformer_config import EventTransformerConfig
 78from nextrpg.config.event.say_event_config import (
 79    AvatarPosition,
 80    SayEventColorBackgroundConfig,
 81    SayEventConfig,
 82    SayEventNineSliceBackgroundConfig,
 83)
 84from nextrpg.config.map_config import MapConfig
 85from nextrpg.config.menu_config import MenuConfig
 86from nextrpg.config.rpg.item_config import BaseItemKey, ItemCategory, ItemConfig
 87from nextrpg.config.rpg.rpg_config import RpgConfig
 88from nextrpg.config.system.audio_config import AudioConfig
 89from nextrpg.config.system.game_loop_config import GameLoopConfig
 90from nextrpg.config.system.key_mapping_config import (
 91    KeyCode,
 92    KeyMapping,
 93    KeyMappingConfig,
 94)
 95from nextrpg.config.system.resource_config import ResourceConfig
 96from nextrpg.config.system.save_config import SaveConfig
 97from nextrpg.config.system.window_config import WindowConfig
 98from nextrpg.config.widget.button_config import ButtonConfig
 99from nextrpg.config.widget.panel_config import PanelConfig
100from nextrpg.config.widget.widget_config import WidgetConfig
101from nextrpg.core.cached_decorator import cached
102from nextrpg.core.dataclass_with_default import (
103    dataclass_with_default,
104    default,
105    private_init_below,
106)
107from nextrpg.core.logger import (
108    LogEntry,
109    Logger,
110    MessageKeyAndDrawing,
111    pop_messages,
112)
113from nextrpg.core.metadata import METADATA_CACHE_KEY, HasMetadata, Metadata
114from nextrpg.core.module_and_attribute import (
115    ModuleAndAttribute,
116    to_module_and_attribute,
117)
118from nextrpg.core.save import (
119    HasSaveData,
120    Json,
121    LoadFromSave,
122    LoadFromSaveEnum,
123    LoadSavable,
124    SaveData,
125    SaveIo,
126    UpdateFromSave,
127    UpdateSavable,
128)
129from nextrpg.core.time import Millisecond, Percentage
130from nextrpg.core.tmx_loader import TmxLoader, get_geometry
131from nextrpg.core.util import background_thread, generator_name, type_name
132from nextrpg.drawing.color import (
133    BLACK,
134    BLUE,
135    GREEN,
136    RED,
137    TRANSPARENT,
138    WHITE,
139    Alpha,
140    Color,
141    alpha_from_percentage,
142)
143from nextrpg.drawing.drawing import EMPTY_DRAWING, Drawing
144from nextrpg.drawing.drawing_group import DrawingGroup
145from nextrpg.drawing.drawing_group_on_screen import DrawingGroupOnScreen
146from nextrpg.drawing.drawing_on_screen import (
147    EMPTY_DRAWING_ON_SCREEN,
148    DrawingOnScreen,
149)
150from nextrpg.drawing.drawing_on_screens import (
151    DrawingOnScreens,
152    drawing_on_screens,
153)
154from nextrpg.drawing.font import Font, FontSize
155from nextrpg.drawing.nine_slice import NineSlice
156from nextrpg.drawing.polygon_drawing import PolygonDrawing
157from nextrpg.drawing.polyline_drawing import PolylineDrawing
158from nextrpg.drawing.rectangle_drawing import RectangleDrawing
159from nextrpg.drawing.shifted_sprite import (
160    ShiftedSprite,
161    shifted_sprites,
162)
163from nextrpg.drawing.sprite import BlurRadius, Sprite, tick_all, tick_optional
164from nextrpg.drawing.sprite_on_screen import (
165    SpriteOnScreen,
166    animate_on_screen,
167)
168from nextrpg.drawing.sprite_sheet import SpriteSheet, SpriteSheetSelection
169from nextrpg.drawing.text import LineDrawingAndHeight, Text
170from nextrpg.drawing.text_group import TextGroup
171from nextrpg.drawing.text_on_screen import TextOnScreen
172from nextrpg.event.background_event import (
173    BackgroundEvent,
174    BackgroundEventSentinel,
175)
176from nextrpg.event.base_event import BaseEvent
177from nextrpg.event.code_transformer import ADD_PARENT, ADD_YIELD, ANNOTATE_SAY
178from nextrpg.event.cutscene import cutscene
179from nextrpg.event.event_as_attr import EventAsAttr
180from nextrpg.event.event_scene import (
181    DISMISS_EVENT,
182    EventCallable,
183    EventCompletion,
184    EventGenerator,
185    EventScene,
186    register_rpg_event_scene,
187    registered_rpg_event_scenes,
188)
189from nextrpg.event.event_transformer import (
190    register_rpg_event,
191    registered_rpg_events,
192    transform_event,
193)
194from nextrpg.event.eventful_scene import EventfulScene
195from nextrpg.event.fade_in_event_scene import (
196    BackgroundFadeInEvent,
197    FadeInEventScene,
198    fade_in,
199)
200from nextrpg.event.fade_out_event_scene import (
201    BackgroundFadeOutEvent,
202    FadeOutEventScene,
203    fade_out,
204    fade_out_character,
205)
206from nextrpg.event.io_event import (
207    KeyPressDown,
208    KeyPressUp,
209    Quit,
210    WindowResize,
211    is_key_press,
212    post_quit_event,
213    to_io_event,
214)
215from nextrpg.event.say_event.say_event_add_on import (
216    SayEventAddOn,
217    SayEventCharacterAddOn,
218)
219from nextrpg.event.say_event.say_event_scene import SayEventScene, say
220from nextrpg.event.say_event.say_event_state import (
221    SayEventFadeInState,
222    SayEventFadeOutState,
223    SayEventState,
224    SayEventTypingState,
225)
226from nextrpg.event.update_from_event import UpdateFromEvent, update_from_event
227from nextrpg.event.user_event import UserEvent
228from nextrpg.game.game import Game
229from nextrpg.game.game_loop import GameLoop, last_scene
230from nextrpg.game.game_save import GameSave
231from nextrpg.game.game_save_meta import GameSaveMeta
232from nextrpg.game.game_state import GameState
233from nextrpg.geometry.anchor import Anchor
234from nextrpg.geometry.area_on_screen import AreaOnScreen
235from nextrpg.geometry.coordinate import ORIGIN, Coordinate
236from nextrpg.geometry.dimension import (
237    Dimension,
238    Percentage,
239    Pixel,
240    PixelPerMillisecond,
241)
242from nextrpg.geometry.direction import Direction
243from nextrpg.geometry.directional_offset import (
244    Degree,
245    DirectionalOffset,
246    Radian,
247)
248from nextrpg.geometry.padding import (
249    Padding,
250    padding_for_all_sides,
251    padding_for_both_sides,
252)
253from nextrpg.geometry.polygon_area_on_screen import (
254    PolygonAreaOnScreen,
255    get_bounding_rectangle_area_on_screen,
256)
257from nextrpg.geometry.polyline_on_screen import PolylineOnScreen
258from nextrpg.geometry.rectangle_area_on_screen import RectangleAreaOnScreen
259from nextrpg.geometry.scaling import (
260    HeightScaling,
261    WidthAndHeightScaling,
262    WidthScaling,
263)
264from nextrpg.geometry.sizable import Sizable
265from nextrpg.geometry.size import (
266    ZERO_HEIGHT,
267    ZERO_SIZE,
268    ZERO_WIDTH,
269    Height,
270    Size,
271    Width,
272)
273from nextrpg.geometry.walk import Walk
274from nextrpg.gui.screen_area import (
275    bottom_left_screen_area,
276    bottom_right_screen_area,
277    bottom_screen_area,
278    left_screen_area,
279    right_screen_area,
280    screen_area,
281    screen_size,
282    top_left_screen_area,
283    top_right_screen_area,
284    top_screen_area,
285)
286from nextrpg.gui.window import Window
287from nextrpg.item.inventory import Inventory
288from nextrpg.item.item import Item
289from nextrpg.map.map_loader import MapLoader
290from nextrpg.map.map_move import MapMove
291from nextrpg.map.map_scene import MapScene, center_player
292from nextrpg.map.map_spec import MapSpec
293from nextrpg.scene.scene import Scene
294from nextrpg.scene.transition_scene import TransitionScene
295from nextrpg.scene.view_only_scene import ViewOnlyScene
296from nextrpg.widget.button import (
297    Button,
298)
299from nextrpg.widget.button_spec import BaseButtonSpec, ButtonSpec
300from nextrpg.widget.menu_scene import MenuScene
301from nextrpg.widget.panel import Panel
302from nextrpg.widget.panel_spec import PanelSpec
303from nextrpg.widget.scroll_direction import ScrollDirection
304from nextrpg.widget.sizable_widget import SizableWidget
305from nextrpg.widget.sizable_widget_spec import SizableWidgetSpec
306from nextrpg.widget.widget import Widget
307from nextrpg.widget.widget_group import WidgetGroup
308from nextrpg.widget.widget_group_spec import WidgetGroupSpec
309from nextrpg.widget.widget_interaction_result import (
310    AddChildWidget,
311    BaseWidgetInteractionResult,
312    ReplaceByWidget,
313    WidgetInteractionResult,
314)
315from nextrpg.widget.widget_loader import WidgetLoader
316from nextrpg.widget.widget_spec import WidgetSpec