Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


2 participantes

    Desativar o Alt + Enter ou a função no RMXP

    Duel
    Duel
    Aldeia Friend
    Aldeia Friend


    Mensagens : 1375
    Créditos : 107

    Ficha do personagem
    Nível: 1
    Experiência:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue0/0Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (0/0)
    Vida:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue30/30Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (30/30)

    Desativar o Alt + Enter ou a função no RMXP Empty Desativar o Alt + Enter ou a função no RMXP

    Mensagem por Duel Qua Jul 26, 2017 6:41 pm

    Utilizo o sistema de resolução maior em um projeto meu, mas como sabem após dar fullscreen no game
    a resolução e a janela simplesmente buga de uma maneira incrível.
    Eu queria saber como desativar o próprio fullscreen do jogo, ou desativar a possibilidade dar Alt + Enter na janela.
    Não sei, pesquisei em outros fóruns mas não encontrei nada a respeito, quem puder me ajudar
    se disponha urgentemente. Preciso muito disso, sério.
    Eu tenho certeza que vou levar um lindo vácuo, mas agradeço mesmo assim.


    Última edição por Duel em Qua Jul 26, 2017 9:39 pm, editado 3 vez(es)


    _________________
    Jack:
    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : Desativar o Alt + Enter ou a função no RMXP ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue0/0Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (0/0)
    Vida:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue30/30Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (30/30)

    Desativar o Alt + Enter ou a função no RMXP Empty Re: Desativar o Alt + Enter ou a função no RMXP

    Mensagem por GallighanMaker Qua Jul 26, 2017 8:40 pm

    Achei isso na internet:

    Código:
    #==============================================================================
    # ** Disable Fullscreen
    #------------------------------------------------------------------------------
    # Draycos Goldaryn
    # Version 2.00
    # 9/1/07
    # SDK Version : 2.0 - Parts 1, 2, 3
    #==============================================================================
    #----------------------------------------------------------------------------
    # SDK detection
    #----------------------------------------------------------------------------
    begin
      SDK_AUTO_DETECT = SDK::Version
    rescue
      SDK_AUTO_DETECT = nil
    end

    #----------------------------------------------------------------------------
    # Begin SDK Emulation
    #----------------------------------------------------------------------------
    unless SDK_AUTO_DETECT !=nil
      module SDK
        def self.enabled?(script)
          return true if script == 'Disable Fullscreen'
        end
      end
     
    #----------------------------------------------------------------------------
    # End SDK Emulation
    #----------------------------------------------------------------------------
    else
    SDK.log('Disable Fullscreen','Draycos Goldaryn', 2.00, '9-1-07')
    SDK.check_requirements(2.0, [2, 3])
    end

    #----------------------------------------------------------------------------
    # Begin SDK Enabled Check
    #----------------------------------------------------------------------------
    if SDK.enabled?('Disable Fullscreen')

    #----------------------------------------------------------------------------
    # Disable Fullscreen
    #  - will return to windowed mode if it detects fullscreen mode.
    #----------------------------------------------------------------------------
    module Disable_Fullscreen
      GSM    = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
      KBE    = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')

      def self.resolution
        width = GSM.call(0)
        height = GSM.call(1)
        return width, height
      end

      def self.alt_enter
        KBE.call(18,0,0,0)
        KBE.call(13,0,0,0)
        KBE.call(18,0,2,0)
        KBE.call(13,0,2,0)
      end

      def self.update
        if resolution[0] == 640
          alt_enter
          Graphics.update
          sleep(1)
          Graphics.update
          sleep(1)
          Graphics.update
          sleep(1)
        end
      end
    end

    unless SDK_AUTO_DETECT == nil
    #----------------------------------------------------------------------------
    # SDK::Scene_Base
    #  - adds methods to all scenes
    #----------------------------------------------------------------------------
    class SDK::Scene_Base
      alias_method(:draycos_disablefullscreen_scenebase_update, :update)
      def update
        Disable_Fullscreen.update
        draycos_disablefullscreen_scenebase_update
      end
    end

    else 
    #----------------------------------------------------------------------------
    # module Input
    #  - is updated in every scene
    #----------------------------------------------------------------------------
    module Input
      class << self
        alias_method(:draycos_disablefullscreen_input_update,:update)
        def update
          draycos_disablefullscreen_input_update
          Disable_Fullscreen.update
        end
      end
    end

    end
    #----------------------------------------------------------------------------
    # End SDK Enabled Test
    #----------------------------------------------------------------------------
    end


    Para instalar adicione um novo script acima do MAIN.


    Eu testei no RPG Maker XP, ao modificar para fullscreen ele faz um update na tela e volta ao normal. Não achei mto legal devido ao delay nesse update ou seja ele permite a função da tecla mas ao detectar o fullscreen ele volta ao normal.


    Não achei nada para desabilitar as teclas em si mas acredito que tenha por ai.


    _________________
    Desativar o Alt + Enter ou a função no RMXP 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || Desativar o Alt + Enter ou a função no RMXP 769_heart 2D pixel games.
    Duel
    Duel
    Aldeia Friend
    Aldeia Friend


    Mensagens : 1375
    Créditos : 107

    Ficha do personagem
    Nível: 1
    Experiência:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue0/0Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (0/0)
    Vida:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue30/30Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (30/30)

    Desativar o Alt + Enter ou a função no RMXP Empty Re: Desativar o Alt + Enter ou a função no RMXP

    Mensagem por Duel Qua Jul 26, 2017 8:46 pm

    GallighanMaker escreveu:Achei isso na internet:

    Código:
    #==============================================================================
    # ** Disable Fullscreen
    #------------------------------------------------------------------------------
    # Draycos Goldaryn
    # Version 2.00
    # 9/1/07
    # SDK Version : 2.0 - Parts 1, 2, 3
    #==============================================================================
    #----------------------------------------------------------------------------
    # SDK detection
    #----------------------------------------------------------------------------
    begin
      SDK_AUTO_DETECT = SDK::Version
    rescue
      SDK_AUTO_DETECT = nil
    end

    #----------------------------------------------------------------------------
    # Begin SDK Emulation
    #----------------------------------------------------------------------------
    unless SDK_AUTO_DETECT !=nil
      module SDK
        def self.enabled?(script)
          return true if script == 'Disable Fullscreen'
        end
      end
      
    #----------------------------------------------------------------------------
    # End SDK Emulation
    #----------------------------------------------------------------------------
    else
    SDK.log('Disable Fullscreen','Draycos Goldaryn', 2.00, '9-1-07')
    SDK.check_requirements(2.0, [2, 3])
    end

    #----------------------------------------------------------------------------
    # Begin SDK Enabled Check
    #----------------------------------------------------------------------------
    if SDK.enabled?('Disable Fullscreen')

    #----------------------------------------------------------------------------
    # Disable Fullscreen
    #   - will return to windowed mode if it detects fullscreen mode.
    #----------------------------------------------------------------------------
    module Disable_Fullscreen
      GSM    = Win32API.new('user32', 'GetSystemMetrics', 'I', 'I')
      KBE    = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')

      def self.resolution
        width = GSM.call(0)
        height = GSM.call(1)
        return width, height
      end

      def self.alt_enter
        KBE.call(18,0,0,0)
        KBE.call(13,0,0,0)
        KBE.call(18,0,2,0)
        KBE.call(13,0,2,0)
      end

      def self.update
        if resolution[0] == 640
          alt_enter
          Graphics.update
          sleep(1)
          Graphics.update
          sleep(1)
          Graphics.update
          sleep(1)
        end
      end
    end

    unless SDK_AUTO_DETECT == nil
    #----------------------------------------------------------------------------
    # SDK::Scene_Base
    #   - adds methods to all scenes
    #----------------------------------------------------------------------------
    class SDK::Scene_Base
      alias_method(:draycos_disablefullscreen_scenebase_update, :update)
      def update
        Disable_Fullscreen.update
        draycos_disablefullscreen_scenebase_update
      end
    end

    else  
    #----------------------------------------------------------------------------
    # module Input
    #   - is updated in every scene
    #----------------------------------------------------------------------------
    module Input
      class << self
        alias_method(:draycos_disablefullscreen_input_update,:update)
        def update
          draycos_disablefullscreen_input_update
          Disable_Fullscreen.update
        end
      end
    end

    end
    #----------------------------------------------------------------------------
    # End SDK Enabled Test
    #----------------------------------------------------------------------------
    end


    Para instalar adicione um novo script acima do MAIN.


    Eu testei no RPG Maker XP, ao modificar para fullscreen ele faz um update na tela e volta ao normal. Não achei mto legal devido ao delay nesse update ou seja ele permite a função da tecla mas ao detectar o fullscreen ele volta ao normal.


    Não achei nada para desabilitar as teclas em si mas acredito que tenha por ai.
    Isso é um problema e ao mesmo tempo uma solução.
    Posso explorar o script e fazer alguma modificação para que se encaixe ao que eu quero. Sua ajuda valeu a pena. Muito obrigado.


    _________________
    Jack:
    GallighanMaker
    GallighanMaker
    Colaborador
    Colaborador


    Medalhas : Desativar o Alt + Enter ou a função no RMXP ZgLkiRU
    Mensagens : 985
    Créditos : 102

    Ficha do personagem
    Nível: 1
    Experiência:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue0/0Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (0/0)
    Vida:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue30/30Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (30/30)

    Desativar o Alt + Enter ou a função no RMXP Empty Re: Desativar o Alt + Enter ou a função no RMXP

    Mensagem por GallighanMaker Qui Jul 27, 2017 12:02 am

    Realmente é uma base para sua solução, mas pesquise mais sobre os inputs que talvez vc consiga retornar algum valor vazio ou 0 nas combinações de teclas e remover esse atalho. Isso não deve ser no script e sim algo na DLL. 


    Vi algumas soluções utilizando um software que lê essa dll e a galera modificava isso mas não ahcie mto seguro.


    Se precisar de algo só avisar que vou tentar ajudar!.


    Abraço e boa sorte. 


    _________________
    Desativar o Alt + Enter ou a função no RMXP 8dVK0ku
    using C# and import Python developer || Expert in Unity Engine IDE. || Desativar o Alt + Enter ou a função no RMXP 769_heart 2D pixel games.
    Duel
    Duel
    Aldeia Friend
    Aldeia Friend


    Mensagens : 1375
    Créditos : 107

    Ficha do personagem
    Nível: 1
    Experiência:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue0/0Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (0/0)
    Vida:
    Desativar o Alt + Enter ou a função no RMXP Left_bar_bleue30/30Desativar o Alt + Enter ou a função no RMXP Empty_bar_bleue  (30/30)

    Desativar o Alt + Enter ou a função no RMXP Empty Re: Desativar o Alt + Enter ou a função no RMXP

    Mensagem por Duel Qui Jul 27, 2017 2:07 am

    GallighanMaker escreveu:Realmente é uma base para sua solução, mas pesquise mais sobre os inputs que talvez vc consiga retornar algum valor vazio ou 0 nas combinações de teclas e remover esse atalho. Isso não deve ser no script e sim algo na DLL. 


    Vi algumas soluções utilizando um software que lê essa dll e a galera modificava isso mas não ahcie mto seguro.


    Se precisar de algo só avisar que vou tentar ajudar!.


    Abraço e boa sorte. 
    Vi coisas relacionadas a dll, mas mesmo modificando não resultava em nada.
    Vi em outros lugares também que a função era algo próprio já do windows, então só me deixou mais confuso hrsuhrsu.


    _________________
    Jack:

    Conteúdo patrocinado


    Desativar o Alt + Enter ou a função no RMXP Empty Re: Desativar o Alt + Enter ou a função no RMXP

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Sáb Abr 27, 2024 5:14 pm