Added any keybind detection to PGE and began implementing menu helper innterfaces
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
Portions of this software are copyright © 2024 The FreeType
|
||||
Portions of this software are copyright � 2024 The FreeType
|
||||
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
|
||||
All rights reserved.
|
||||
*/
|
||||
@@ -39,8 +39,12 @@ All rights reserved.
|
||||
#include "Menu.h"
|
||||
#include "MenuLabel.h"
|
||||
|
||||
using A=Attribute;
|
||||
|
||||
void Menu::InitializeNewKeybindInputWindow(){
|
||||
Menu*newKeybindWindow=CreateMenu(NEW_INPUT,CENTERED,vf2d{192,96});
|
||||
|
||||
newKeybindWindow->ADD("New Keybind Label",MenuLabel)(geom2d::rect<float>{{0.f,24.f},{192.f,24.f}},"Press a new key for {}",2.f,ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE|ComponentAttr::SHADOW)END;
|
||||
newKeybindWindow->B(A::IS_KEYBOARD)=true;
|
||||
newKeybindWindow->S(A::KEYBIND)="";
|
||||
newKeybindWindow->ADD("New Keybind Label",MenuLabel)(geom2d::rect<float>{{0.f,24.f},{192.f,96.f}},"Press a new key for '{}'\n\nPress Esc to cancel.",1.5f,ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE|ComponentAttr::SHADOW)END;
|
||||
}
|
||||
Reference in New Issue
Block a user