mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
V3.5.0 create window (#10481)
* 1. Modify the parameters of the creation window 2. Modify the relationship between platform and interface 3. Rename vibrate to vibrator in linux and QNX * Fix empty platform implementation * Fix empty platform implementation * Modify mac and ios createwindow interface * Create a centered window by default * Mobile platforms do not require window creation
This commit is contained in:
@@ -45,24 +45,8 @@ SystemWindow::SystemWindow() {
|
||||
SystemWindow::~SystemWindow() {
|
||||
}
|
||||
|
||||
bool SystemWindow::createWindow(const char *title,
|
||||
int x, int y, int w,
|
||||
int h, int flags) {
|
||||
// Create window
|
||||
|
||||
EmptyPlatform *platform = dynamic_cast<EmptyPlatform *>(BasePlatform::getPlatform());
|
||||
CCASSERT(platform != nullptr, "Platform pointer can't be null");
|
||||
platform->createWindow(title, x, y, w, h, flags);
|
||||
_width = w;
|
||||
_height = h;
|
||||
return true;
|
||||
}
|
||||
|
||||
uintptr_t SystemWindow::getWindowHandler() const {
|
||||
//return _handle;
|
||||
EmptyPlatform *platform = dynamic_cast<EmptyPlatform *>(BasePlatform::getPlatform());
|
||||
CCASSERT(platform != nullptr, "Platform pointer can't be null");
|
||||
return platform->getWindowHandler();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SystemWindow::setCursorEnabled(bool value) {
|
||||
|
||||
Reference in New Issue
Block a user