Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks

This commit is contained in:
Rémi Verschelde 2021-05-04 14:41:06 +02:00
parent 64a63e0861
commit b5e1e05ef2
No known key found for this signature in database
GPG key ID: C3336907360768E1
1439 changed files with 1 additions and 34187 deletions

View file

@ -33,7 +33,6 @@
#include <stdlib.h>
Size2 TextureButton::get_minimum_size() const {
Size2 rscale = Control::get_minimum_size();
if (!expand) {
@ -57,9 +56,7 @@ Size2 TextureButton::get_minimum_size() const {
}
bool TextureButton::has_point(const Point2 &p_point) const {
if (click_mask.is_valid()) {
Point2 point = p_point;
Rect2 rect = Rect2();
Size2 mask_size = click_mask->get_size();
@ -116,9 +113,7 @@ bool TextureButton::has_point(const Point2 &p_point) const {
}
void TextureButton::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_DRAW: {
DrawMode draw_mode = get_draw_mode();
@ -126,13 +121,11 @@ void TextureButton::_notification(int p_what) {
switch (draw_mode) {
case DRAW_NORMAL: {
if (normal.is_valid())
texdraw = normal;
} break;
case DRAW_HOVER_PRESSED:
case DRAW_PRESSED: {
if (pressed.is_null()) {
if (hover.is_null()) {
if (normal.is_valid())
@ -144,7 +137,6 @@ void TextureButton::_notification(int p_what) {
texdraw = pressed;
} break;
case DRAW_HOVER: {
if (hover.is_null()) {
if (pressed.is_valid() && is_pressed())
texdraw = pressed;
@ -154,7 +146,6 @@ void TextureButton::_notification(int p_what) {
texdraw = hover;
} break;
case DRAW_DISABLED: {
if (disabled.is_null()) {
if (normal.is_valid())
texdraw = normal;
@ -232,7 +223,6 @@ void TextureButton::_notification(int p_what) {
}
void TextureButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_normal_texture", "texture"), &TextureButton::set_normal_texture);
ClassDB::bind_method(D_METHOD("set_pressed_texture", "texture"), &TextureButton::set_pressed_texture);
ClassDB::bind_method(D_METHOD("set_hover_texture", "texture"), &TextureButton::set_hover_texture);
@ -271,61 +261,49 @@ void TextureButton::_bind_methods() {
}
void TextureButton::set_normal_texture(const Ref<Texture> &p_normal) {
normal = p_normal;
update();
minimum_size_changed();
}
void TextureButton::set_pressed_texture(const Ref<Texture> &p_pressed) {
pressed = p_pressed;
update();
}
void TextureButton::set_hover_texture(const Ref<Texture> &p_hover) {
hover = p_hover;
update();
}
void TextureButton::set_disabled_texture(const Ref<Texture> &p_disabled) {
disabled = p_disabled;
update();
}
void TextureButton::set_click_mask(const Ref<BitMap> &p_click_mask) {
click_mask = p_click_mask;
update();
}
Ref<Texture> TextureButton::get_normal_texture() const {
return normal;
}
Ref<Texture> TextureButton::get_pressed_texture() const {
return pressed;
}
Ref<Texture> TextureButton::get_hover_texture() const {
return hover;
}
Ref<Texture> TextureButton::get_disabled_texture() const {
return disabled;
}
Ref<BitMap> TextureButton::get_click_mask() const {
return click_mask;
}
Ref<Texture> TextureButton::get_focused_texture() const {
return focused;
};
void TextureButton::set_focused_texture(const Ref<Texture> &p_focused) {
focused = p_focused;
};