This commit is contained in:
Henrik Rydgard 2013-07-15 18:03:34 +02:00
parent 7aa8aabc3d
commit d34495a23f
3 changed files with 2 additions and 26 deletions

View File

@ -1,8 +1,8 @@
#pragma once
#include <zlib.h>
#include <string>
bool compress_string(const std::string& str, std::string *dest, int compressionlevel = Z_BEST_COMPRESSION);
bool compress_string(const std::string& str, std::string *dest, int compressionlevel = 9);
bool decompress_string(const std::string& str, std::string *dest);

View File

@ -190,7 +190,6 @@ void Clickable::Update(const InputState &input_state) {
OnClick.Trigger(e);
}
}
OnClick.Update();
}
Item::Item(LayoutParams *layoutParams) : InertView(layoutParams) {
@ -262,14 +261,6 @@ void CheckBox::Draw(UIContext &dc) {
dc.Draw()->DrawImage(image, bounds_.x2() - 4, bounds_.centerY(), 1.0f, 0xFFFFFFFF, ALIGN_RIGHT | ALIGN_VCENTER);
}
void Slider::Draw(UIContext &dc) {
// TODO
}
void Slider::Touch(UIContext &dc) {
// TODO
}
void Button::GetContentDimensions(const UIContext &dc, float &w, float &h) const {
dc.Draw()->MeasureText(dc.theme->uiFont, text_.c_str(), &w, &h);
}

View File

@ -453,21 +453,6 @@ private:
std::string rightText_;
};
// Not really using the click action, but the background lightup works well.
class Slider : public ClickableItem {
public:
Slider(const std::string &text, int min, int max, int *value, LayoutParams *layoutParams = 0)
: ClickableItem(layoutParams), text_(text), min_(min), max_(max), value_(value) {}
virtual void Draw(UIContext &dc);
virtual void Touch(UIContext &dc);
private:
std::string text_;
int min_, max_;
int *value_;
};
class ItemHeader : public Item {
public:
ItemHeader(const std::string &text, LayoutParams *layoutParams = 0)