Package org.newdawn.slick.gui

Examples of org.newdawn.slick.gui.MouseOverArea


        fondo = ResourceManager.getImage("fondo");

        //Botón de sonido
        sonidoOff = ResourceManager.getImage("sonido3");
        sonido = ResourceManager.getImage("sonido");
        final MouseOverArea sonidoButton = new MouseOverArea(container, sonido,
                (container.getWidth() / 2) - (sonido.getWidth() / 2), 50, sonido.getWidth(), sonido.getHeight(),
                new SonidoButtonListener());
        sonidoButton.setMouseOverImage(ResourceManager.getImage("sonido2"));

        //Botón de pantalla completa
        pantallaCompletaOff = ResourceManager.getImage("pantalla_completa3");
        pantallaCompleta = ResourceManager.getImage("pantalla_completa");
        final MouseOverArea pantallaCompletaButton = new MouseOverArea(container, pantallaCompletaOff,
                (container.getWidth() / 2) - (pantallaCompletaOff.getWidth() / 2), 200, pantallaCompletaOff.getWidth(), pantallaCompletaOff.getHeight(),
                new PantallaCompletaButtonListener());
        pantallaCompletaButton.setMouseOverImage(ResourceManager.getImage("pantalla_completa2"));

        //Botón de controles
        Image controles = ResourceManager.getImage("controles");
        final MouseOverArea controlesButton = new MouseOverArea(container, controles,
                (container.getWidth() / 2) - (controles.getWidth() / 2), 350, controles.getWidth(), controles.getHeight(),
                new ControlesButtonListener());
        controlesButton.setMouseOverImage(ResourceManager.getImage("controles2"));

        //Botón atrás
        Image atras = ResourceManager.getImage("atras");
        final MouseOverArea atrasButton = new MouseOverArea(container, atras,
                (container.getWidth() / 2) - (atras.getWidth() / 2), 500, atras.getWidth(), atras.getHeight(),
                new AtrasButtonListener());
        atrasButton.setMouseOverImage(ResourceManager.getImage("atras2"));
        //Boton de la imagen de controles
        Image imgControles = ResourceManager.getImage("imgControles");
        imgControlesButton = new MouseOverArea(container, imgControles,
                (container.getWidth() / 2) - (imgControles.getWidth() / 2), (container.getHeight() / 2) - (imgControles.getHeight() / 2), imgControles.getWidth(), imgControles.getHeight(),
                new ImgControlesButtonListener());

        botones[0] = pantallaCompletaButton;
        botones[1] = sonidoButton;
View Full Code Here


        timer = new Timer(FADE_DELAY, new FadeTimerListener());

        //Botón jugar
        jugar = ResourceManager.getImage("jugar");
        jugar.setAlpha(0);
        final MouseOverArea jugarButton = new MouseOverArea(container, jugar,
                (container.getWidth() / 2) - (jugar.getWidth() / 2), 260, jugar.getWidth(), jugar.getHeight(),
                new JugarButtonListener());
        jugarButton.setMouseOverImage(ResourceManager.getImage("jugar2"));
        jugarButton.setAcceptingInput(false);


        //Botón opciones
        opciones = ResourceManager.getImage("opciones");
        opciones.setAlpha(0);
        final MouseOverArea opcionesButton = new MouseOverArea(container, opciones,
                (container.getWidth() / 2) - (opciones.getWidth() / 2), 370, opciones.getWidth(), opciones.getHeight(),
                new OpcionesButtonListener());
        opcionesButton.setMouseOverImage(ResourceManager.getImage("opciones2"));
        opcionesButton.setAcceptingInput(false);


        //Botón salir
        salir = ResourceManager.getImage("salir");
        salir.setAlpha(0);
        final MouseOverArea salirButton = new MouseOverArea(container, salir,
                (container.getWidth() / 2) - (salir.getWidth() / 2), 470, salir.getWidth(), salir.getHeight(),
                new SalirButtonListener());
        salirButton.setMouseOverImage(ResourceManager.getImage("salir2"));
        salirButton.setAcceptingInput(false);

        botones[0] = jugarButton;
        botones[1] = opcionesButton;
        botones[2] = salirButton;
View Full Code Here

    public final void init(final GameContainer container, final StateBasedGame game) throws SlickException {
        super.init(container, game);

        //Botón de reanudar el juego
        final Image reanudar = ResourceManager.getImage("reanudar");
        final MouseOverArea reanudarButton = new MouseOverArea(container, reanudar,
                (container.getWidth() / 2) - (reanudar.getWidth() / 2), 260, reanudar.getWidth(), reanudar.getHeight(),
                new ReanudarButtonListener());
        reanudarButton.setMouseOverImage(ResourceManager.getImage("reanudar2"));

        //Botón de salir al manu principal
        final Image opciones = ResourceManager.getImage("opciones");
        final MouseOverArea opcionesButton = new MouseOverArea(container, opciones,
                (container.getWidth() / 2) - (opciones.getWidth() / 2), 370, opciones.getWidth(), opciones.getHeight(),
                new OpcionesButtonListener());
        opcionesButton.setMouseOverImage(ResourceManager.getImage("opciones2"));

        //Botón de salir al manu principal
        final Image salir = ResourceManager.getImage("salir");
        final MouseOverArea salirButton = new MouseOverArea(container, salir,
                (container.getWidth() / 2) - (salir.getWidth() / 2), 470, salir.getWidth(), salir.getHeight(),
                new SalirButtonListener());
        salirButton.setMouseOverImage(ResourceManager.getImage("salir2"));

        botones[0] = reanudarButton;
        botones[1] = opcionesButton;
        botones[2] = salirButton;
    }
View Full Code Here

        super.init(container, game);

        //Botón responder
        responder = ResourceManager.getImage("responder");
        responder.setAlpha(0);
        final MouseOverArea responderButton = new MouseOverArea(container, responder,
                (container.getWidth() / 2) - (responder.getWidth() / 2) - 300, 665, responder.getWidth(), responder.getHeight(),
                new ResponderButtonListener());
        responderButton.setMouseOverImage(ResourceManager.getImage("responder2"));
        responderButton.setAcceptingInput(false);

        //Botón estudiar
        estudiar = ResourceManager.getImage("estudiar");
        estudiar.setAlpha(0);
        final MouseOverArea estudiarButton = new MouseOverArea(container, estudiar,
                (container.getWidth() / 2) - (estudiar.getWidth() / 2), 665, estudiar.getWidth(), estudiar.getHeight(),
                new EstudiarButtonListener());
        estudiarButton.setMouseOverImage(ResourceManager.getImage("estudiar2"));
        estudiarButton.setAcceptingInput(false);


        //Botón divertirse
        divertirse = ResourceManager.getImage("divertirse");
        divertirse.setAlpha(0);
        final MouseOverArea divertirseButton = new MouseOverArea(container, divertirse,
                (container.getWidth() / 2) - (divertirse.getWidth() / 2) + 300, 665, divertirse.getWidth(), divertirse.getHeight(),
                new DivertirseButtonListener());
        divertirseButton.setMouseOverImage(ResourceManager.getImage("divertirse2"));
        divertirseButton.setAcceptingInput(false);

        botones[0] = responderButton;
        botones[1] = estudiarButton;
        botones[2] = divertirseButton;
View Full Code Here

   
    if (container!=null){
    background = new Image("res/img/gui/gui_infobox.png");
   
    //Jeweils Zuweisung von MOAs und Rollover-Images für die Buttons
        gui_btn_up = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_up_1.png"), posX+200, posY+20, 20, 20, this);
        gui_btn_up.setMouseOverImage(new Image("res/img/gui/gui_btn_up_2.png"));
       
        gui_btn_down = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_down_1.png"), posX+200, posY+50, 20, 20, this);
        gui_btn_down.setMouseOverImage(new Image("res/img/gui/gui_btn_down_2.png"));
    }
      }
View Full Code Here

    gui_minimap = new Image("res/img/gui/gui_minimap.png");
    gui_quickslots = new Image("res/img/gui/gui_quickslots.png");
   
   
    //button initialisation
    gui_btn_menu = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_menu_1.png"), 936, 621, 29, 27, this);
    gui_btn_menu.setMouseOverImage(new Image("res/img/gui/gui_btn_menu_2.png"));
       
    gui_btn_questlog = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_questlog_1.png"), 508, 768, 195, 96, this);
    gui_btn_questlog.setMouseOverImage(new Image("res/img/gui/gui_btn_questlog_2.png"));
   
    initMenu();
   
    minimap = new Minimap(TyrelionContainer.getInstance().getContainer(), TyrelionContainer.getInstance().getMap(), Player.getInstance());
View Full Code Here

    charinfo = new Charinfo(TyrelionContainer.getInstance().getContainer());
  }
 
  private void initMenu() throws SlickException{
    //Jeweils Zuweisung von MOAs und Rollover-Images für die Buttons
    gui_btn_back = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_back_1.png"), 983, 296, 160, 30, this);
    gui_btn_back.setMouseOverImage(new Image("res/img/gui/gui_btn_back_2.png"));
   
    gui_btn_save = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_save_1.png"), 983, 326, 160, 30, this);
    gui_btn_save.setMouseOverImage(new Image("res/img/gui/gui_btn_save_2.png"));
       
    gui_btn_load = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_load_1.png"), 983, 356, 160, 30, this);
    gui_btn_load.setMouseOverImage(new Image("res/img/gui/gui_btn_load_2.png"));
   
    gui_btn_settings = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_settings_1.png"), 983, 386, 160, 30, this);
    gui_btn_settings.setMouseOverImage(new Image("res/img/gui/gui_btn_settings_2.png"));
   
    gui_btn_quit = new MouseOverArea(gameContainer, new Image("res/img/gui/gui_btn_quit_1.png"), 983, 416, 160, 30, this);
    gui_btn_quit.setMouseOverImage(new Image("res/img/gui/gui_btn_quit_2.png"));
  }
View Full Code Here

    }
  }
 
  private void initGUI() throws SlickException{   
    //Jeweils Zuweisung von MOAs und Rollover-Images für die Buttons       
        btn_back = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_back_1.png"), 720, 790, 400, 50, this);
        btn_back.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_back_2.png"));
  }
View Full Code Here

  private void initGUI() throws SlickException{
    //Hintergrund Grafik für den Button-Bereich festlegen
    button_field_background = new Image("res/img/menu/main/mainmenu_box.png");
   
    //Jeweils Zuweisung von MOAs und Rollover-Images für die Buttons
        btn_new = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_new_1.png"), 490, 455, 400, 50, this);
        btn_new.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_new_2.png"));
       
        btn_load = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_load_1.png"), 490, 505, 400, 50, this);
        btn_load.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_load_2.png"));
       
        btn_set = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_opt_1.png"), 490, 555, 400, 50, this);
        btn_set.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_opt_2.png"));
       
        btn_cred = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_cred_1.png"), 490, 605, 400, 50, this);
        btn_cred.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_cred_2.png"));
       
        btn_quit = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_quit_1.png"), 490, 655, 400, 50, this);
        btn_quit.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_quit_2.png"));
  }
View Full Code Here

    volume_header = new Image("res/img/menu/settings/settings_volume.png");
    //Fullscreen heading
    fullscreen_header = new Image("res/img/menu/settings/settings_fs.png");
   
    //Jeweils Zuweisung von MOAs und Rollover-Images für die Buttons
    btn_fs_on = new MouseOverArea(gameContainer, new Image("res/img/menu/settings/buttons/settings_fs_off_1.png"), 615, 610, 30, 30, this);
        btn_fs_on.setMouseOverImage(new Image("res/img/menu/settings/buttons/settings_fs_off_2.png"));
        btn_fs_off = new MouseOverArea(gameContainer, new Image("res/img/menu/settings/buttons/settings_fs_on_1.png"), 615, 610, 30, 30, this);
        btn_fs_off.setMouseOverImage(new Image("res/img/menu/settings/buttons/settings_fs_on_2.png"));
        btn_keys = new MouseOverArea(gameContainer, new Image("res/img/menu/settings/buttons/settings_button_controls_1.png"), 500, 655, 400, 50, this);
        btn_keys.setMouseOverImage(new Image("res/img/menu/settings/buttons/settings_button_controls_2.png"));       
        btn_back = new MouseOverArea(gameContainer, new Image("res/img/menu/main/buttons/mainmenu_button_back_1.png"), 720, 790, 400, 50, this);
        btn_back.setMouseOverImage(new Image("res/img/menu/main/buttons/mainmenu_button_back_2.png"));
       
        Container slider = new Container();
        slider.setSize(250, 10);
        slider.setLocation(575, 575);
View Full Code Here

TOP

Related Classes of org.newdawn.slick.gui.MouseOverArea

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.