Compare commits
No commits in common. "9fb86c4cf8bf068edc9c12294efa7902cfafcdfc" and "3036a8c97de89aebd1e829ecf28ad7387e041130" have entirely different histories.
9fb86c4cf8
...
3036a8c97d
2 changed files with 7 additions and 9 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020-2021,2023-2024 Stephen Seo
|
||||
Copyright (c) 2020-2021,2023 Stephen Seo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -223,17 +223,15 @@ void Tri::State::handle_events() {
|
|||
int mx = GetMouseX();
|
||||
int my = GetMouseY();
|
||||
if(mx < 0) { mx = 0; }
|
||||
else if(mx >= drawImage.width) { mx = drawImage.width - 1; }
|
||||
else if(mx >= (int)width) { mx = width - 1; }
|
||||
if(my < 0) { my = 0; }
|
||||
else if(my >= drawImage.height) { my = drawImage.height - 1; }
|
||||
else if(my >= (int)height) { my = height - 1; }
|
||||
|
||||
my = drawImage.height - my;
|
||||
|
||||
colorPickerColor[0] = (float)(colors[mx + my * drawImage.width].r) / 255.0F;
|
||||
colorPickerColor[1] = (float)(colors[mx + my * drawImage.width].g) / 255.0F;
|
||||
colorPickerColor[2] = (float)(colors[mx + my * drawImage.width].b) / 255.0F;
|
||||
colorPickerColor[0] = colors[mx + my * width].r;
|
||||
colorPickerColor[1] = colors[mx + my * width].g;
|
||||
colorPickerColor[2] = colors[mx + my * width].b;
|
||||
colorPickerColor[3] = 1.0f;
|
||||
pointCircle.fillColor = colors[mx + my * drawImage.width];
|
||||
pointCircle.fillColor = colors[mx + my * width];
|
||||
flags.reset(F_COPY_COLOR_MODE);
|
||||
set_notification_text("Color set");
|
||||
|
||||
|
|
Loading…
Reference in a new issue